This content has been marked as final. Show 3 replies
Your map is really too big but when it doesn't loaded any external jpg "it should take normal cpu usages". please check few things in your script .
1.Any "onEnterFrame" command is running .--it should be delete after loading.
2. Any "setInterval" is running.-it should be cleared after loading "clearInterval( ).
The reason i know the problem is with the map itself is that I deleted all the code and there was no change in the CPU usage..
I can't think of any other way to create such an application without having such a big scale MC..
I had a similar problem when I needed a really big area. I think the cpu usage wasn't that bad in Flash Player 7 and 8.5 (now 9), but in Flash 8 it was really high. I decided to not move the big MC around, only the smaller parts that where needed. I guess the whole map is never shown completely, only parts of it, so you can write a scroll function that determines the active MCs and only moves those around instead of the big holder MC. To achieve this, I added a variable to each MC that holds the position of that part in the big MC. Then I kept track of the position of the display in the map, and used this to decide which parts are actually displayed. Only these MCs have to be moved when scrolling, reducing the cpu usage a lot. When a part moves out of the display, I set its real position to -5000, and when a new part comes into display, its position is set from -5000 to the proper _x value so it gets displayed.