# Changing a movie into a button

**URL:** <https://forum.kirupa.com/t/changing-a-movie-into-a-button/28668>\
**Category:** flash\
**Created:** [August 16, 2003, 2:06pm UTC](https://forum.kirupa.com/t/changing-a-movie-into-a-button/28668 "2003-08-16T14:06:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbadmilkman](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bigbadmilkman](https://forum.kirupa.com/u/bigbadmilkman)\
**Post date:** [August 16, 2003, 2:06pm UTC](https://forum.kirupa.com/t/changing-a-movie-into-a-button/28668/1 "2003-08-16T14:06:15Z")

</div>

Hi i have a problem, I have a set of pictures that come onto the screen in a flashy way (as movies) , anyway after they come in, i want them to behave as buttons , how would i go about doing this? Any help would be greatful, cheers!!

---

<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:** [August 16, 2003, 3:12pm UTC](https://forum.kirupa.com/t/changing-a-movie-into-a-button/28668/2 "2003-08-16T15:12:15Z")

</div>

Change them to buttons on the last keyframe

---

<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:** [August 16, 2003, 6:02pm UTC](https://forum.kirupa.com/t/changing-a-movie-into-a-button/28668/3 "2003-08-16T18:02:18Z")

</div>

that didn’t work

---

<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:** [August 16, 2003, 6:12pm UTC](https://forum.kirupa.com/t/changing-a-movie-into-a-button/28668/4 "2003-08-16T18:12:28Z")

</div>

what do you mean by “behave as buttons” ?

---

<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:** [August 16, 2003, 6:15pm UTC](https://forum.kirupa.com/t/changing-a-movie-into-a-button/28668/5 "2003-08-16T18:15:41Z")

</div>

well i have pictures, that appear, (they are movies) anyway, when they stop moving, I want the user be able to click on them so they can be taken to another page, i also want them to like have a rollover indicator.

---

<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:** [August 16, 2003, 11:15pm UTC](https://forum.kirupa.com/t/changing-a-movie-into-a-button/28668/6 "2003-08-16T23:15:00Z")

</div>

Here is the complete list of movie clip event handlers:

MovieClip.onData  
MovieClip.onDragOut  
MovieClip.onDragOver  
MovieClip.onEnterFrame  
MovieClip.onKeyDown  
MovieClip.onKeyUp  
MovieClip.onKillFocus  
MovieClip.onLoad  
MovieClip.onMouseDown  
MovieClip.onMouseMove  
MovieClip.onMouseUp  
MovieClip.onPress  
MovieClip.onRelease  
MovieClip.onReleaseOutside  
MovieClip.onRollOut  
MovieClip.onRollOver  
MovieClip.onSetFocus  
MovieClip.onUnload

---

<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:** [August 17, 2003, 7:49am UTC](https://forum.kirupa.com/t/changing-a-movie-into-a-button/28668/7 "2003-08-17T07:49:46Z")

</div>

what do you mean by ‘movies’ -movie clips or externally loaded swfs?

---

<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:** [August 17, 2003, 10:29am UTC](https://forum.kirupa.com/t/changing-a-movie-into-a-button/28668/8 "2003-08-17T10:29:05Z")

</div>

You can make a movie clip symbol behave like a button. Use the same Actionscript as you would for a button, but add on(rollOver), on(rollOut) and on(press) actions to give you the up, over and down states.

You need to give your movieclip an instance name and use it in your actionscript. Here is an example using frame labels within the movie clip, which has been given an instance name of “buttonMC1”.

on(rollOver){  
\_root.buttonMC1.gotoAndPlay(“over”);  
}  
on(press){  
\_root.buttonMC1.gotoAndPlay(“down”);  
}  
on(release){  
\_root.gotoAndStop(“frameLabel”);  
}

You can get creative with what happens in the buttonMC1 timeline at the “over” and “down” frame labels.

You need to give each movieclip you add the script to its own unique instance name.

I hope that’s what you’re looking for.

Regards  
Carixpig

---

<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:** [August 19, 2003, 2:13am UTC](https://forum.kirupa.com/t/changing-a-movie-into-a-button/28668/9 "2003-08-19T02:13:13Z")

</div>

Hey what about throwing a transparent button on top of them? I dont know how complicated of an effect you are trying to achieve is but it may work. Although you wont neccesaarily be able to do the up down and over stuff as easy…ahh i dunno
