PDA

Click to See Complete Forum and Search --> : Developer Q: What is max depth level?



Ross MacGregor
08-10-2000, 08:40 PM
I seem to get problems when creating SWFs with depth levels over 16383, is this Flash's maximum depth level?

Shant
08-11-2000, 02:27 AM
unsigned 16 bits to so theoretically the max should be 2^16 = 64K.






Originally posted by Ross MacGregor
I seem to get problems when creating SWFs with depth levels over 16383, is this Flash's maximum depth level?

Ross MacGregor
08-11-2000, 04:19 PM
Thanks, I understand the theory, but in practice it RemoveObject2 seems to not function properly with levels beyond 16k.

Maybe its my problem, but i wish someone was actually knew if there is a level limit.

JAEzell
08-11-2000, 07:06 PM
The player does have many "undocumented" limits. The problem with many is that the Flash programming team wrote the format for their program and their player, not for the SDK. Flash files never contain 16,000+ depths. You don't need them. The documented limit si 2^16 = 64k, however, the player does have problems with large amounts of objects or large file sizes also.

Remember, you don't need a depth layer for every object. You can have 1000 objects at depth 1...

Why do you need that many depths? It seems like you would have one heck of a slow SWF with that many objects displayed per frame.

--Jesse

Ross MacGregor
08-11-2000, 07:52 PM
We are concatinating many flash files together into one large one. One reason we are getting the large levels is due to our simple merging algorithm, we take the highest depth of each movie and then reserve this many levels when it is added. I guess this is in fact not necessary since each file is being displayed separatly, but we are reusing the same code we used to merge multiple SWF files (being displayed simultaneously).

A depth optimizer would help us greatly.

Another problem seems to be the Flash authoring tool, it does no depth optimization. We found one movie with depth levels in the 7000 range! It does seem to optimize the IDs it writes out though.

-ross

JAEzell
08-12-2000, 01:22 PM
I have not seen that limit...are you writing 64k+ of objects? To me, it seems far more likely that you are exceeding the maximum object limit of 64k rather than a depth limit (this can cause lock-ups and other strange side effects).

I think I have a way to fix your whole problem though. DON'T COMBINE THE MOVIES INTO ONE! The fact is that Flash already contains the functionality to do that (for large movies like you are describing). Basically, the command from the Flash program is called "Load Movie." You can also do this with the SDK by using Tell Target action commands with _level0 and _level1 for the respective levels. Movies are then stacked on top of each other in the order that you specify (Check the file format DOCS for a complete description).

--Jesse