Newbie Button Question

Hi, I’ve got some images that I want to animate into a button - but I can’t get the effect I want.

I can set up a movie to play the animation - but I don’t know the coding to get it to act like I want. With no mouse over, I just want to the plain circle. then, with mouse over I want the words to appear, and the man (with lines), to fall in from above. then I want another animation to occur once the button has been clicked on.

So how do I code this?

make it a movieclip with an instance name like webImersion, put a stop action on the first frame of that movieclip timeline, then add that code to the actions for this movieclip on main stage:

on (rollOver) {
	_root.webImersion.play();
}
on (press) {
	another animation
}

by another animation I mean, another movieclip or other frames of the same movie clip.

=)

thanks a lot! what coding do I put in if I want it to play some frames that come later in the movieclip? at the moment it won’t let me add the script because it says it contains syntax errors.

I also get output errors:

Scene=Scene 1, Layer=Layer 5, Frame=40: Line 1: Mouse events are permitted only for button instances
on (rollOver) {

Scene=Scene 1, Layer=Layer 5, Frame=40: Line 4: Mouse events are permitted only for button instances
on (press) {

So what do I do? please help!

:slight_smile:

let say you want to skip to frame 10 when the button(mc) is pressed

on (rollOver) {
	_root.webImersion.play();
}
on (press) {
	_root.webImersion.gotoAndPlay(10);
}

now it will works =)

no, i still get the output problems - the “on (rollOver)” is for buttons only - this is a movieclip… :confused:

I can’t get this to work - can someone help me please?! I’ve left the fla with the movie in it here. It has more time than it needs, but I just want it to animate properly!

I didn’t get a chance to read all of the post above, but I think this is how you wanted it. Here is your fla, hope it helps. =)

omg! thanks so much! that’s fantastic! wow, and without reading all that other stuff! nice one m8! Oh, I checked out your site earlier… strange coincidence… it’s really great, I hope I can get as efficient as you in flash!

thnx m8, I’ll let you know when I’ve finished my site :]

I’ve checked over your fla - and I can see those small ‘a’ action symbols, but when I look at the actions for that frame - there is no coding… how did you do it?

*Originally posted by asphaltcowboy *
**omg! thanks so much! that’s fantastic! wow, and without reading all that other stuff! nice one m8! Oh, I checked out your site earlier… strange coincidence… it’s really great, I hope I can get as efficient as you in flash!

thnx m8, I’ll let you know when I’ve finished my site :]

I’ve checked over your fla - and I can see those small ‘a’ action symbols, but when I look at the actions for that frame - there is no coding… how did you do it? **

No probelm, I’m glad I solved your problem which was a pretty simple one. The problem was that you were placing your button actions on the timeline which was the reason why you were recieving those error messages. Button handlers only work if they’re placed on buttons or a movie clip itself. If you click on your webImersion movieclip to select it then open your actions panel, you’ll see that I directly applied the button actions to the movieclip itself and not on the timeline. I hope that clears it up for you, good luck and I look forward to see your site when it’s done. =)

ah, i see now… I think guigo was saying the same thing, i just couldn’t understand because I didn’t give an example to work with. thanks so much electrongeek, you’ve just saved me HOURS of work! nice one. Can I just ask? How long did it take you to create your site?

It took me about a month, about 3-5 hours each day. It wasn’t an over night thing, I struggled too, but this forum was a lifesaver. =)

Hey geek, thanks for the help!:slight_smile:

asphaltcowboy: sorry about the delay, My computer is on repair.:frowning:

[EDIT]typo´s

No problem Guigo, good to have you back. =)

*Originally posted by Guig0 *
**Hey geek, thanks for the help!:slight_smile:

asphaltcowboy: sorry about the delay, My computer is on repair.:frowning:

[EDIT]typo´s **

No worries Guigo, thanks for your help!