Rollover button

hello all,\r\rI consider myself a newbie, and my skill is limited\rwith creating simple animation and buttons. But \rjust recently, I tried to play around with animation rollover button, but it seems to be not working !\r\rbasically I have one button and one animation, and\rwhat I want is, when the button get ‘mouse-overed’ \rthe animation plays. \r\rquestion is : in the ‘goto and play’ function there’s\rthis field that ask for the label. and I see the same \r’label’ on the FRAME pane. I am just confused, should\rI label the animation, or the frame where the animation \ris placed at ? \r\rand do we put the animation and the button on a same layer, or on separate layer ? \r\rI tried to look at the tutorial, but there’s no fla’s to look\rat ! (and the picture is pretty small - I can’t see the timeline clearly) \r\rany help appreciated :slight_smile: \r\r

Well the “Label” in the gotoAndPlay function refers to the frame’s label. That frame label is where you can , Label Frames. This actually can be an extreme help.\r\rSuppose you had 3 different frames you needed to goto, well instead of remembering wether goto Frame 1 , or frame 2 etc… you can label them according to what it is. So i could label frame 1 as, “home”, and whenever i needed to gotoAndStop, or GotoAndPlay you can do this…\r\rgotoAndStop(“home”);\r\rJust makes life alot easier in some projects. =)\r\rNow what i think what you need to do is, make an Animation play when you roll over a button (And im assuming this animation is in a movie clip?).\r\rOk, first we need to give this movie clip an instance name, what this does is create a name for it so that you can access through code. To give it an instance name, click on the movie clip (select it) then in one of your panels there should be a Tab that says “instance”. (if your panel is not showing, hit Crtl+ I ) you should see your symbol name and a drop down box that says “Movie Clip” and below that should be a name Field. In that name field type a name, for now lets give it “myanim”.\r\rOk, a few more steps… =)\r\rAll you need to do now is, Right hand click on your button and Select the “Actions”. This will open up your Action editor for that button.\r\rJust simply add this code for a roll over:\r----------------Begin Copy-------------------------\r\r// we need it to play on roll over.\ron (rollOver){\;\r}\r\r// we need it to stop and go to \r// the original position when we roll out\r\ron (rollOut){\r_root.anim.gotoAndStop(1);\r\r}\r\r---------------End Copy---------------------------\r\rAnd there you go! That should give you the result you’re looking for, its a bit lengthy, but once you get this down, you’re on your way. =)\r\r~D