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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gotoAndStop on a button's "Over" state

Status
Not open for further replies.

DeepBlerg

Technical User
Jan 13, 2001
224
AU
Hi,

In my main movie I'm wanting to have a gotoAndStop on a button's "Over" state to help the user know which menu they are in. I've given the button an instance name of menu1 and the button's "Over" state a frame label of menustop1.

The following actionscript is in the main movie but doesn't do anything:

gotoAndStop("menu1.menustop1");

Any ideas?
 
menu1.onRollover = function(){
//what you want here
}

code on main timeline

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
You won't be able to manipulate the buttons directly like that. You can create a movie clip object, which you put ontop of your button. The only frame of this movie clip looks like your button's over frame. Then change the clip's ._visible to make it appear and disappear when you need it to.
 
maybe im way out to lunch here, but i build buttons totally different....

usually i make the button just a MC so i can make various animations and tweens, doodads, etc. on the areas where i need the user to be able to click the button, i just create a new button symbol (usually a square box) over the hit area, and just edit the content of the button so there are no "up" "over" or "down" states, just the hit area (the box)
put the hit area button in the frames where you need to be able to click the button (usually in a different MC all together) and then create the actions to tell the 'fake' button what to do or where to animate, change color etc.
actions for hit area

on('release'){
_root.myFakeButton.gotoAndPlay("danceAround");
etc...
}

i find it waaaay easier to manipulate buttons that way, make them move around, disappear when i dont need them....

maybe its just me;)
cheers
paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top