ENTER_FRAME event over ENTER_FRAME event?

From a performance point of view, it's always best to only listen for ENTER_FRAME in a single location (e.g. In your main application class) and to then invoke custom update() methods on all the objects that need to be updated. That's a very common approach for games for instance. One reason why this is greatly superior from a performance point of view is that no new instances of Event need to be created.

If you have 100 listeners (which is not uncommon when using the approach you outline) that means 100 new instances of the Event class every frame, and instantiating classes is among the heaviest things that you can do in Flash. You rarely actually need the Event object in ENTER_FRAME handlers, so using the update() approach instead makes a lot of sense. If you can, try centralizing other events as well in performance critical applications like games.

As Richard says, it is much more efficient to use a single update (Game Loop) method when creating games. Not only from the performance point of view, but also because you get a lot more control using a single update. Like this: public function update(deltaTime : Number) : void { var gameObject : IGameObject; for(var I : int = 0 ; I Length ; i++) { gameObject = _gameObjectsi; gameObject.

Update(deltaTime); } ... }.

From a performance point of view, it's always best to only listen for ENTER_FRAME in a single location (e.g. In your main application class) and to then invoke custom update() methods on all the objects that need to be updated. That's a very common approach for games for instance.

As Richard says, it is much more efficient to use a single update (Game Loop) method when creating games. Not only from the performance point of view, but also because you get a lot more control using a single update. Like this.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions