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!

flash buttons using actionscript - help please

Status
Not open for further replies.

tytinman

Technical User
Oct 21, 2006
2
CA

I am having an issue with the above setup, I would appreciate any help I could get with this please.

Basicly what I need is:

When you rollover the button, I want it to go to the "over" keyframe, and when you rollout of the button I want it to go to the "back"key frame. I had these in and took them out as they were conflicting with the next problem:

When you click on one of the buttons for example the "quilt" one, I need it to stay in the state after the the over animation is done so basicly I need it to stop at frame 9. Now if you click on one of the other buttons I need the "quilt" button to go and play the "back" keyframe, which makes it slide back to the default position.

So if one button is currently active (meaning that section is what you are viewing, it needs to stay at keyframe 9 (which has a stop on it), and as soon as any of the other buttons are clicked, the button that was previously active (section that was being viewed) should go and play the "back" keyframe so it slides back to default. However, As I have it now I don't have the rollover and rollout functions in because they were causing issues, also every single button even if it wasn't active goes and plays the "back" frame when another button is clicked. So there must be some sort of "if" condition that I can use but I am really not certain how I can do this, your help is appreciated.

Also not forgetting that I need it to also have rollover and rollout effects, so on over play "over", and on rollout play "back"

I can be emailed at tyler_tinney@hotmail.com, I would greately appreciate your help with this matter, I've been stuck on it for days now.
 
I now have it working except for it still acts weird:

When you click on a button, all buttons still go and play the "back" keyframe. I need there to be some sort of condition in there that if the frame /=9 then do nothing, if frame = 9 then play the "back" keyframe ...

The code now looks like:

on (rollOver) {
gotoAndPlay("over");
}
on (rollOut, release) {
gotoAndStop(9);
gotoAndPlay("back");
}
on (release) {
_parent["art"].gotoAndPlay("back");
_parent["quest"].gotoAndPlay("back");
_parent["rules"].gotoAndPlay("back");
_parent["eyria"].gotoAndPlay("back");
_parent["about"].gotoAndPlay("back");
_parent["home"].gotoAndPlay("back");
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top