...

View Full Version : Action Script Help in Macromedia



BobDoleX
04-24-2004, 03:58 PM
I recently just starting learning Flash and i think it's great. I have Macromedia Flash MX 2004, and i'm trying to do a project for school. I'm doing pretty good in it so far except for the fact that i can't get buttons to work. I have three buttons which link to three different scenes. On release, i want the buttons to do two different things. I put a stop() command in on
around frame 230, but when the button's clicked, i want it to play the rest of the scene which is just a fade out. Then, of course, i want it to go to the scene indicated by the button. I've been able to get it partly to work, but i'm not too familiar with action script and I can't get all parts of it to work. Could somebody provide me some insight on how to do this? Thanks.

firepages
04-29-2004, 04:02 PM
set a variable say _root.where_now , in the button action
so eg for the button that links to scene_1



on release{
_root.where_now = scene_1 ;
gotoAndPlay(230);
}


now in the frame that your fadeout ends, add an action



gotoAndPlay(_root.where_now,1) ;


e.g. use the variable you set onclick to decide which frame to goto ... if my syntax is back to front I apologise, setting the variable as at the root seems to stop most variable scoping issues.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum