ENTER_FRAME does not fire off display list

Bug #701202 reported by brettPeriscopic
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
jeash
Confirmed
Low
Unassigned

Bug Description

Shape (& Sprite) instances do not fire Event.ENTER_FRAME events when not added to the display list.
When targeting Flash they do. Creating un-displayed instances that fire these events specifically useful
for most tweening engines. Test code:

package ;

import flash.display.Sprite;
import flash.display.Shape;
import flash.Lib;
import flash.events.Event;

class Main extends Sprite{

 public static function main() {
        Lib.current.stage.addChild(new Main());
 }

 private var _ticker:Shape;

 public function new(){
  super();
  _ticker = new Shape();
  _ticker.addEventListener(Event.ENTER_FRAME,handleFrame);
  //In Jeash you must add _ticker to display list to receive Event.ENTER_FRAME
  //while in Flash you do not
  //addChild(_ticker);
 }
 private function handleFrame(e:Event):Void{
  trace("handleFrame");
  _ticker.removeEventListener(Event.ENTER_FRAME,handleFrame);
 }
}

Changed in jeash:
status: New → Confirmed
Changed in jeash:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.