Friday, August 27, 2010

Flash Questions

1 Q: what is the use of depth?
A: depth works as layers works in flash.
Depths used for determining stacking order of objects on the stage.

Methods of depth are:
swapDepths()
getNextHighestDepth()
getInstanceAtDepth()

2 Q: difference between _root and _level
A: _root refers to the main timeline of the movie from which the property was referenced, or the top-most timeline within the current hierarchy of timelines.
_level0 references the main timeline of the
movie loaded into level 0. This property can be referenced
from any level and still reference the same timeline, that
on level 0.

We use levels whenever we need to load new swf, jpg or gif
files inside our current working swf but not in a movieclip
and need to be placed above the current elements without
replacing any.

Any swf loaded in at level0 will replace all the contents
with the new but placed in level1 with bring every new
content above the old.

So level0 refers to one root of his own and level1 refers
to another root of his own. Every level has a root and then
corresponding child movieclips and elements inside one
another.






No comments:

Post a Comment