Hey
I'm so use to timeline code, that this baffles me. How do I get a button
class to recognize a button instance on stage?
Please help.
...Just revised
Buttons.fla
Class: 'Buttons'
Button with instance name placed on stage
Buttons.as
package {
import flash.display.MovieClip;
public class Buttons extends MovieClip {
public function Buttons() {
mc.addEventListener(MouseEvent.MOUSE_DOWN, onClick);
stage.addChild(this);
}
public function onClick(event:MouseEvent):void{
trace("Hello World");
}
}
}
Error:
1120: undefined property
The error indicates it's the mouse event, not my instance name mc.