|
|
|
#1 |
|
Senior Member
Join Date: Sep 2004
Location: Sweden, stockholm
Posts: 124
|
AS explanation
I want to know what this.getNextHighestDepth() does in this code Thanks!
__________________
Area restricted- Tresspassers will be shot. Survivors will be shot again... http://www.geocities.com/legg3r |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Feb 2004
Location: Los Angeles
Posts: 2,920
|
_root.po.attachMovie("gun2", "gun2", this.getNextHighestDepth(), {_x:30, _y:0});
the call attachMovie makes a new symbol by copying one from your library. The third argument (which getNextHighestDepth() is being used for) is the depth of the movie which controls layering. If two symbols are placed at the same depth, the second symbol obliterates the first one, so getNextHighestDepth() is used to insure that the symbol is placed on a unique depth, without obliterating any preexisting symbols, and it insures that the symbol is placed in front of any other symbols. There's a possible mistake in the code, in that 'this' refers to the default timeline, but the movie is being attached to _root.po (which might not be the same thing). Since each timeline has it's own set of depths, you might want to use _root.po.getNextHighestDepth() instead of this.getNextHighestDepth(). |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Sep 2004
Location: Sweden, stockholm
Posts: 124
|
Thanks!
__________________
Area restricted- Tresspassers will be shot. Survivors will be shot again... http://www.geocities.com/legg3r |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|