# Newbie Button Question

**URL:** https://forum.kirupa.com/t/newbie-button-question/10240
**Category:** Uncategorized
**Created:** [December 27, 2002, 6:51pm UTC](https://forum.kirupa.com/t/newbie-button-question/10240 "2002-12-27T18:51:24Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![asphaltcowboy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/asphaltcowboy/32/128_2.png) [@asphaltcowboy](https://forum.kirupa.com/u/asphaltcowboy)
#### Post date: [December 27, 2002, 6:51pm UTC](https://forum.kirupa.com/t/newbie-button-question/10240/1 "2002-12-27T18:51:24Z")

</div>

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

![](http://www.asphaltdesign.pwp.blueyonder.co.uk/ad1.jpg) ![](http://www.asphaltdesign.pwp.blueyonder.co.uk/ad2.jpg) ![](http://www.asphaltdesign.pwp.blueyonder.co.uk/ad3.jpg)

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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 27, 2002, 7:20pm UTC](https://forum.kirupa.com/t/newbie-button-question/10240/2 "2002-12-27T19:20:04Z")

</div>

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:

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

```

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

=)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 27, 2002, 7:42pm UTC](https://forum.kirupa.com/t/newbie-button-question/10240/3 "2002-12-27T19:42:03Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 27, 2002, 7:56pm UTC](https://forum.kirupa.com/t/newbie-button-question/10240/4 "2002-12-27T19:56:42Z")

</div>

🙂

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

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

```

now it will works =)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 27, 2002, 10:09pm UTC](https://forum.kirupa.com/t/newbie-button-question/10240/5 "2002-12-27T22:09:40Z")

</div>

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

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!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 27, 2002, 10:19pm UTC](https://forum.kirupa.com/t/newbie-button-question/10240/6 "2002-12-27T22:19:02Z")

</div>

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. =)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 27, 2002, 10:24pm UTC](https://forum.kirupa.com/t/newbie-button-question/10240/7 "2002-12-27T22:24:37Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 27, 2002, 10:29pm UTC](https://forum.kirupa.com/t/newbie-button-question/10240/8 "2002-12-27T22:29:26Z")

</div>

> \*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. =)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 27, 2002, 10:35pm UTC](https://forum.kirupa.com/t/newbie-button-question/10240/9 "2002-12-27T22:35:47Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 27, 2002, 10:38pm UTC](https://forum.kirupa.com/t/newbie-button-question/10240/10 "2002-12-27T22:38:59Z")

</div>

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. =)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 30, 2002, 11:17am UTC](https://forum.kirupa.com/t/newbie-button-question/10240/11 "2002-12-30T11:17:05Z")

</div>

Hey geek, thanks for the help!🙂

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

[EDIT]typo´s

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 30, 2002, 11:38am UTC](https://forum.kirupa.com/t/newbie-button-question/10240/12 "2002-12-30T11:38:16Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 31, 2002, 12:24pm UTC](https://forum.kirupa.com/t/newbie-button-question/10240/13 "2002-12-31T12:24:37Z")

</div>

> \*Originally posted by Guig0 \*  
> \*\*Hey geek, thanks for the help!🙂

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

[EDIT]typo´s \*\*

No worries Guigo, thanks for your help!
