View Full Version : Explanation of the "LEVELs" parameter...???
kaanuki
July 25th, 2005, 03:27 AM
Would someone please be so kind, and explain the concept of the Levels parameter... For some reason i just cant grasp it, and feeling pretty dumb :block:
I learned Flash by just "jumping right into it" (by need), and unfortunately I find myself bumping into terms I dont quite grasp.
*Example:
loadVariablesNum ("url" ,level [, variables])
My current project includes trying to load a movie/swf when a user presses a button. The Flash Help says:
"If you want to load a SWF or JPEG file into a specific level, use loadMovieNum() instead of loadMovie()."
I'm not quite sure of which to use.
Any help / examples would be appreciated.
Thanks.
-kaanuki-
devonair
July 25th, 2005, 05:29 AM
Levels, layers, and depths can be very confusing concepts.. Actually layers are a pretty easy concept as they're right there in front of you in the IDE. Levels can be thought of as layers, but created during runtime rather than something you can access at authoring time. They start from 0 (your _root level) and go up from there. Basically any movie clip loaded into level 0 will replace the _root timeline of your current movie, so if using levels and you don't want to do that, go up from 0. Depths are basically z stacking order numbers - the lower the number, the farther behind other items these items will be (I know you didn't ask about depths, but it's easy to group them in with levels).
To answer your question, unless you're using Flash 5 or lower, loadVariablesNum() has been replaced with the LoadVars() object, and I would suggest using it instead. And for loading .swf or jpg files, using the MovieClip.loadMovie() method is much simpler to both use and understand - well, at least for me.. Personally, I've been using Flash for about 7 years or so and haven't touched loadMovieNum() or loadVariablesNum() since Flash 5..
kaanuki
July 25th, 2005, 11:24 AM
Thanks alot for the info. I'll definitely take your advice on loading those images.
Is there somewhere that shows me which level I'm currently on?
Thanks.
jwopitz
July 25th, 2005, 01:28 PM
Try looking up these terms to help you out (my_mc is the MovieClip in question):
my_mc.getDepth();
my_mc.getInstanceAtDepth();
my_mc.getNextHighestDepth();
my_mc.swapDepths(depth or target_mc);
Hope that helps
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.