General Question

rawpixels's avatar

Any Flash Actionscript 3.0 experts out there?

Asked by rawpixels (2668points) November 2nd, 2008

Hi. Since, you can’t add actions to buttons in Actionscript 3.0, I need help. When I refer to something with (), I’m giving it’s instance name.

When I click on button (MyButton), I want it to:

- Play a Movie Clip (MyClip) on my main timeline, starting at a frame named “start” within it’s timeline

and

-Move the playhead on my main timeline to a frame labeled “one”

If anyone can tell me what code I need, I’d greatly appreciate it!

Observing members: 0 Composing members: 0

1 Answer

papachan's avatar

well its pretty easy you have to create two assets at your library with the name MyClip and MyButton.
At your Main Class use this =

btn = new MyButton();
addChild(btn);
btn.x = 200;
btn.y = 20;
btn.addEventListener(MouseEvent.CLICK, function():void {
// something here
});

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther