General Question

rawpixels's avatar

Any Flash Actionscript 3.0 experts out there?

Asked by rawpixels (2668points) November 2nd, 2008
1 response
“Great Question” (0points)

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

Answers

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.

Mobile | Desktop


Send Feedback   

`