FORUMS: list search recent posts

AS3 Step by step button advice

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
brandon Baldauf
AS3 Step by step button advice
on Nov 2, 2011 at 11:06:24 pm

Hey I am an animator that is having boat loads of issues with making a simple button...

Goal: on pressing a button named madness gotoandplay frame 1297

Can anyone hold my hand through this since no matter how I write it, it goes wrong.

Return to posts index

Simone Salerno
Re: AS3 Step by step button advice
on Nov 3, 2011 at 9:55:51 pm

Here it is:

- in the button's parent 'import' declarations, write:
- in the button's parent class constructor (or better in the 'ADDED_TO_STAGE' event handler), write:
madness.addEventListener(MouseEvent.CLICK, onClick);
- create a function called 'onClick' like this:
private function onClick(e:MouseEvent) {
//your code here

- instead of '...', write:

I hope this was useful.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved