Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Complex Flash Buttons

Status
Not open for further replies.

z35

Programmer
Dec 21, 2001
206
US
Hi. I want to program a button to go to a certain frame 10 of a movie clip when the "on mouse over" happens. It should go to frame 20 when "on mouse press" happens. For "on mouse out" it should go to frame 1, if the mouse was never pressed (just a roll over.) If it was pressed, it should tell the movie to go to frame 30 and stop. Is this possible?
 
Yes!
You have to separately create your button and movie clip, and then drag them both on stage from the library.
You should have a stop action on the first blank keyframe of your movie clip so that it doesn't appear until you decide so.
With both elements on stage, select the movie clip, and give it an instance's name in the Instance panel. This is the target you will refer to from your button. Once that done, right-click your button and select Actions from the popup menu. This will open up the Object Actions box. From the list of actions on the left, double-click the on action followed by the goto action.
Edit both actions for what you're aiming for, something like:

on (rollOver) {
_root.mcinstance'sname.gotoAndStop (10);
}
on (rollOut) {
_root.mcinstance'sname.gotoAndStop (1);
}
on (press) {
_root.mcinstance'sname.gotoAndStop (30);
}

Regards,
wink4.gif
ldnewbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top