For flash actionscript beginners, i think handling levels are one of the most confusing topics.
Levels are something that is not layers but something with hierarchic nature. this further confuse people. but big terms like these are always easy once you understand it.
when you create movie clip via ActionScript with createEmptyMovieClip(), attachMovie() functions you are always asked to enter this Levels, which is extremely crucial in development of flash web site as it allows you to give your movieclips some sort of hierarchy.
so the question is what is the difference between Levels and Layers.
- Layers: This is used when you are developing. Meaning you have no programatic control over this one. but unlike Levels you can have multiple object in layers.
- Levels: Levels are controllable with ActionScript. This is used like _level5.movieClip.actions. You can swap depth with swapDepth() function. also when you put MovieClip object via ActionScript you can use this.getNextHighestDepth() method to just place it on top of the previous object you've created on run time(programatically)
- Is that all?: No, actually there is one more point that i'd like to mention, which is Levels can stack movie clips meaning other SWF files. i mean Layers can be included inside of Levels but Levels cannot exist inside of each layer.
Things are getting complicated for you now but i mean Layers should be though as way to create separation inside of MovieClips and Levels should be thought of as creating separation between different MovieClips.
i hope it made sense to you and please feel free to give me a comment.
No comments:
Post a Comment