blaablaa69
Technical User
i have used the following code for a menu script. basically when one of the menu items is selected, i want the other 4 to fade off. when i have just one of the functions, and one onmouseup command, it works, but when i add in the rest they all fade off at once? can some pls help?
stop();
var startpos = 198;
var currentpos = 0;
var prevpos = 0;
var startscale = 140;
var currentscale = 0;
_root.slide._x = 780;
var toggle = Boolean(false);
var section = "home";
var easeType = mx.transitions.easing.None.easeNone;
var time = 1;
function one() {
_root.section = "profile";
_root.products._alpha = "100";
startAlphaTween = new mx.transitions.Tween(whyus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(products, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(contactus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(catalogue, "_alpha", easeType, 100, 0, time, true);
};
function two() {
_root.section = "whyus";
_root.whyus._alpha = "100";
startAlphaTween = new mx.transitions.Tween(profile, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(products, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(contactus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(catalogue, "_alpha", easeType, 100, 0, time, true);
};
function three() {
_root.section = "products";
_root.whyus._alpha = "100";
startAlphaTween = new mx.transitions.Tween(profile, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(whyus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(contactus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(catalogue, "_alpha", easeType, 100, 0, time, true);
};
function four() {
_root.section = "contactus";
_root.whyus._alpha = "100";
startAlphaTween = new mx.transitions.Tween(profile, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(whyus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(products, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(catalogue, "_alpha", easeType, 100, 0, time, true);
};
function five() {
_root.section = "catalogue";
_root.whyus._alpha = "100";
startAlphaTween = new mx.transitions.Tween(profile, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(whyus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(products, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(contactus, "_alpha", easeType, 100, 0, time, true);
};
_root.profile.onMouseUp = function () {
one();
};
_root.whyus.onMouseUp = function () {
two();
};
_root.products.onMouseUp = function () {
three();
};
_root.contactus.onMouseUp = function () {
four();
};
_root.catalogue.onMouseUp = function () {
five();
};
stop();
var startpos = 198;
var currentpos = 0;
var prevpos = 0;
var startscale = 140;
var currentscale = 0;
_root.slide._x = 780;
var toggle = Boolean(false);
var section = "home";
var easeType = mx.transitions.easing.None.easeNone;
var time = 1;
function one() {
_root.section = "profile";
_root.products._alpha = "100";
startAlphaTween = new mx.transitions.Tween(whyus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(products, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(contactus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(catalogue, "_alpha", easeType, 100, 0, time, true);
};
function two() {
_root.section = "whyus";
_root.whyus._alpha = "100";
startAlphaTween = new mx.transitions.Tween(profile, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(products, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(contactus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(catalogue, "_alpha", easeType, 100, 0, time, true);
};
function three() {
_root.section = "products";
_root.whyus._alpha = "100";
startAlphaTween = new mx.transitions.Tween(profile, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(whyus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(contactus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(catalogue, "_alpha", easeType, 100, 0, time, true);
};
function four() {
_root.section = "contactus";
_root.whyus._alpha = "100";
startAlphaTween = new mx.transitions.Tween(profile, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(whyus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(products, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(catalogue, "_alpha", easeType, 100, 0, time, true);
};
function five() {
_root.section = "catalogue";
_root.whyus._alpha = "100";
startAlphaTween = new mx.transitions.Tween(profile, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(whyus, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(products, "_alpha", easeType, 100, 0, time, true);
startAlphaTween = new mx.transitions.Tween(contactus, "_alpha", easeType, 100, 0, time, true);
};
_root.profile.onMouseUp = function () {
one();
};
_root.whyus.onMouseUp = function () {
two();
};
_root.products.onMouseUp = function () {
three();
};
_root.contactus.onMouseUp = function () {
four();
};
_root.catalogue.onMouseUp = function () {
five();
};