Sorry, I am a total AS3 noob.
I am creating a small file, using procedural programming, not ready for OOP.
I have button that adds a MC to the stage from the library. Is there a way to re-use the same function on page load?
function addCard(evt:Event):void
{
//do stuff
addChild(card);
}
mybutton.addEventListener(MouseEvent.MOUSE_UP, addCard);
is there a way to re-use addCard()? AS2 allowed for just calling the function
// doesn't work
addCard();
// not sure what to use for this, or if that will even work
addEventListener(??, addCard);