Jump to content
Search Community

Search the Community

Showing results for tags 'timerevent'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


X


CodePen


Company Website


other


Location


Interests

Found 1 result

  1. Hey everyone so maybe you can help I have created a game using Flash CS6 and Flash Develop. I have objects that are added to the stage by a timer Event named "_Obstacles". These _Obstacles are all added Randomly to the stage. Now they get pushed onto the stage like so: private function addObstacle(e:TimerEvent):void { _Obstacles = new mcObstacles(); stage.addChild(_Obstacles); aObstacleArray.push(_Obstacles); trace(aObstacleArray.length); //TweenLite.to(_Obstacles, 2.7, {x: - 300}); } In my _obstacle class I removed this: if (sDirection == "R") { //Move obstacle left this.x -= nSpeed; } and added the line as shown above to my Main Engine class instead but its still be controlled by the timer: TweenLite.to(_Obstacles, 2.7, {x: - 300}); Now this works fine and they move across the stage correctly. But I am still experiencing major lag. I dont understand why. So I was thinking maybe it could be the TIMER_EVENT that is causing the lag and if i figure out how to push out the random array of objects every 2.7 seconds and remove the TIMER_EVENT someo how it will stop the lag. My game is simple and i dont understand why its lagging this is the only thing i can think of. Its a basic player jumping over the obstacles added to the stage by the timer. So I'm sure that the timer is the corporate. Please help.
×
×
  • Create New...