Buttons on Stage are setting a variable to their names like (aboutus, products, portfolio, etc.). But Actionscript on frame isn't make a jump to related location.
It's not one but two things that are throwing you off.
First is a simple one in your if/else if statements. You're using a single equals (=) which sets a variable when you should be using double equals (==) to compare values.
PHP Code:
onEnterFrame = function () {
if (_root.jtl == "aboutus") {
gotoAndPlay("Abt");
} else if (_root.jtl == "products") {
gotoAndPlay("Pdc");
} else if (_root.jtl == "portfolio") {
gotoAndPlay("Pfo");
} else if (_root.jtl == "clients") {
gotoAndPlay("Clt");
} else if (_root.jtl == "contactus") {
gotoAndPlay("Cnt");
}
};
Secondly your variable of jtl is being stored in multiple locations. Each button object was setting it's own value of jtl in it's own properties instead of everyone looking at a common variable. For simplicity I just set it to _root.jtl but you can change that to wherever you may want. Below is the code for each of the buttons.
here is the code for the frame...
this.onEnterFrame = function () {
if (jtl=="aboutus") {
gotoAndPlay("Abt");
} else if (jtl=="products") {
//trace(jtl);
gotoAndPlay("Pdc");
} else if (jtl=="portfolio") {
gotoAndPlay("Pfo");
} else if (jtl="clients") {
gotoAndPlay("Clt");
} else if (jtl=="contactus") {
gotoAndPlay("Cnt");
}
};
here's the code for one of the mc's
on(release){
_parent.jtl = "products";
}
make your "buttons" movie clips for this to work. hth
Jumping is OK but when it reaches its destination the Timeline stops itself even thought I've put the code gotoAndPlay() in the jumping frame and there is not stop() in the destination frame.
Please guys I need your help once again ... (FLA) is attached in this post ...
Many Thanks
Last edited by Mr.FlashKit; 01-22-2008 at 02:01 AM.
looks fine to me, you need to have navigation in all the destination frames. otherwise you'll just be stuck like you are now. you do have stops in your destination frames (17, 23,29,36 and 41) you need to... otherwise your movie would loop right through them. hth