Hi there
i'm new in action script but i'm trying to make a menu by my self, and i manage to do a part but i'm stuck.
Here is my problem maybe some one can help me:
i have 2 bt in a mc(option_mc) and 3 global variables on the stage.
here is the vars in first frame on _root
code:
_global.test = 1;
_global.bt1_var = 1;
_global.bt2_var = 1;
the script for the first button when the second one is open
code:
on (release) {
test = 2;
bt2_var = 1;
_root.option_mc.onEnterFrame = function() {
_root.option_mc.prevFrame();
if (_root.option_mc._currentframe == 25) {
delete _root.option_mc.onEnterFrame;
}
};
}
that plays the movie back to the frame 25 and make var test = 2
----------
on the second button i have this script
code:
on (release) {
bt2_var = 1;
_root.option_mc.onEnterFrame = function() {
_root.option_mc.prevFrame();
if (_root.option_mc._currentframe == 25) {
delete _root.option_mc.onEnterFrame;
}
};
}
that dosent have test = 2; so the test var should remain = 1
----------
in the option_mc , on frame 25 i have this action script
code:
if (test = 2) {
gotoAndPlay(2);
}
that opes the bt one
My problem is that if i press the second bt after its open,the movie it's playing back but when is on frem 25 the "IF" script is executed no matter what is the condition, and the condition is "test = 2"
Here is a link to my menu
my menu
press 2 time the second button
Please excuse my english
Thank you for your time




Reply With Quote