Question : in as3 how do I trigger a function each frame (when stopped)

I have a AS in flash on a frame that ends with stop(); so doesn't move, but I would like a function to fire every frame.

I think its doable without using another movieclip, with a event listener, but I am unsure which to use.

Answer : in as3 how do I trigger a function each frame (when stopped)

Try this:



-V
1:
2:
3:
4:
5:
6:
7:
stage.addEventListener(Event.ENTER_FRAME, doSomething);
 
function doSomething(event:Event):void {
  trace("hi");
}
 
stop();
Open in New Window Select All
Random Solutions  
 
programming4us programming4us