Resizing your browser window will cause them to snap to the center and scale down so they are all visible. Clicking on the background canvas will start them rotating. I use a frame enter event and increment .rotation of the main MovieClip.
It all seems pretty straightforward to me, but as soon as it starts rotating, I get visible artifacting, and then my browser locks up. Debug and Profile views haven’t given me any insight into what could be causing this.
Repeating, for safety’s sake:**
Clicking on the background to start the clips rotating causes my browser to lock up, and will likely do the same for you.
**
Any help/advice is appreciated.
Hm… IE shows artifacts, FF crushes and shows artifacts. I think it’s just to many clips to redraw, may be try to draw the clips into single bitmap and rotate the bitmap… And, there’s no way to know what’s your code looks like, there may be other problems…
This is a great candidate for doing using either the drawing API or dumping them to a bitmap. You’re just running into performance issues from the sheer number of movie clips. Is there any good reason to have that many individual clips?
I’m nesting the clips one inside another so that when a user clicks on a link in a chain, that chain zooms in and straightens itself out. When they click it again, it returns to the original size and “re-crookens” itself.
It’s the repositioning and moving around of the individual links is what is keeping me from using the drawing api to just draw out each chain, instead I am drawing each link, and then nesting them one inside another, so when I pass a command up the chain to rotate to zero, or back to their original position, it’s a lot easier. I didn’t include all the functionality in these files because it didn’t pertain the crashing issue, and I was hoping to keep the code as small as possible so people wouldn’t need to sort through a lot of stuff unrelated to the crashing
This example is in Flex 3, I did this same thing in Flash 8 in as2 a while back and didn’t have the same performance problems.
I caching the chains as bitmaps seems to be working for the moment. I had no idea the performance would be hit so hard, in the static example I posted there are less than 200 movie clips, I guess I just expected more!
Well if it worked in AS2, and has performance issues in AS3 there’s definitely something wrong. Everything I’ve seen indicates that AS3 performance should be significantly better. What are the main differences (aside from code target) between the AS2 and AS3 versions?
EDIT: Have you tried Sprites vs. Movieclips? (thread)