PDA

View Full Version : Very simple question: Event.ENTER_FRAME from within function



Aneurin, Mark II
February 17th, 2008, 03:40 PM
ActionScript Code:

function beginGame (Event:MouseEvent):void {
// Add gameplay listeners
addEventListener (Event.ENTER_FRAME, otherFunction);
}





Don't work.

Want Event.ENTER_FRAME run from root.

How make work?

Thank.

Aneurin, Mark II
February 17th, 2008, 04:08 PM
I'm not actually a call-center Indian, by the way. Just thick.

Aneurin, Mark II
February 17th, 2008, 05:14 PM
Putting addEventListener in a separate function seems to work.