

Don't forget to activate the necessary plugins, that's all (TweenMax did that for you, but TweenLite doesn't automatically activate things like BezierPlugin). Since you're not using any TweenMax-specific features, switch to TweenLite. Also, TweenLite is slightly faster than TweenMax.

You're wasting a lot of resources by using a Loader for each Circle and reloading the same image over and over. png once and drew it to a BitmapData which you reused in a bunch of Bitmap objects, I think you'd see a big performance improvement.

That way, Flash doesn't have to worry about compositing all those overlapping DisplayObjects or managing hundreds of Loaders. Literally use one big BitmapData and draw() your assets to that BitmapData. One thing that can really help is to utilize BitmapData instead of just putting a bunch of Loaders on the stage which it looks like you're doing. One thing to keep in mind is that graphics rendering in the Flash Player is usually by FAR the biggest CPU hog, not ActionScript code execution. Optimization is a pretty broad topic with lots of possibilities. TweenPlugin.activate() ĬurCircle.x = Math.random() * stage.stageWidth ĬircleTimeline.insert(new TweenMax(curCircle, curCircle.rand*0.5+3, Stage.addEventListener(Event.ACTIVATE, Init) īg.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight) Private var CircleTimeline:TimelineMax = new TimelineMax() Here is my complete code (except the Circle class, but that just draws a simple Circle with random size)
