Jump to content
Search Community

Is replacing Enter_Frame Event listener with Greensock Faster?

Fitchett Developments test
Moderator Tag

Recommended Posts

Hey everyone so I am moving a Movie Clip across the stage using Animate CC/AS3 and I was wondering which way is faster or if it even matters?

 

The initial method I would use was straight forward using an ENTER_FRAME Event Listener like so

addEventListener(Event.ENTER_FRAME, platformLoop);
private function platformLoop(e:Event):void 
		{
			this.x -= 8.0;
		}

the Second Method which i am currently using now is like so:

 

private function init():void 
		{
			TweenLite.delayedCall(0.001, moveChar);
		}
		
		private function moveChar():void 
		{
			TweenLite.delayedCall(0.001, moveChar);
			this.x -= 8.5;
		}

This method using Greensock works just fine and moves the player across the screen pretty smooth. But I was thinking does it even matter is one faster or more efficient than the other?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...