Buttons for Movieclips!

2 posts

Flag Post

Ok I’m here to teach those who don’t know, a method used in dress-up games and such, a trick that when you to click a button, it will make a Movieclip change frame. It may sound simple; well that’s becasue it is.

First off:

Make a new Flash document. Any dimensions will do. Now create a new symbol (Insert>New Symbol…) and select Movieclip. Name is anything you want. On you first frame put a


command in the ActionScript (AS) box (F9). Now go to your stage. Draw, for example, a person. Hit F7 to insert a blank keyframe, and draw that same person in a different pose (or different colour, it’s up to you). Make as many keyframes as you like. Once you’ve finished go back to your main timeline and drag your MC onto the stage. Give it an Instance Name of ‘person’, without the quotations.

The Buttons:

Make 2 buttons, one Next and one Back. In the ‘Next’ button put this code in the AS box:

on (release) {
tellTarget ("person") {

(Thats for older Flash versions like Flash 5, but if you want the new code it’s:)


That means when you click and release that button, it will go to the next frame inside the MC ‘person’. Now in your ‘Back’ button it’s pretty much the same code only with a prevFrame(); difference. Here’s the code:


Now hit Crtl>Enter to test your movie.


Flag Post

I laready know how to do this but thanks anyways…