PDA

View Full Version : Action scripted layers always act as top layers?



hisham
September 10th, 2005, 10:15 PM
I used this snow effect from kirupa...
<A href="http://http://www.kirupa.com/developer/mx/snow.htm (/" target=_blank>[url="http://http://www.kirupa.com/developer/mx/snow.htm")

However, the snow effect always acts like the top layer, ok what i mean is, i have 3 layers, (1)toplayer= a car, (2)middle= snow, (3)low= background.

I want to make the snow to be seen behind the car...i hope you understand what i mean :-/, whenever i put the code from the link above it acts as the top layer and appears in front of everything.

Any help is appreciated...

TheCanadian
September 10th, 2005, 10:58 PM
Timeline objects have depths from something like -1 to -16000. Dynamically created objets have depths from 0 to 16000 or something like that. This means that any dynamically created movie clips will appear higher than all timeline objects. If the car is a movie clip, put this code on it:


onClipEvent (load) {
swapDepths(10000);
}


Read this (http://www.kirupa.com/developer/actionscript/depths.htm) :).

ElectricGrandpa
September 10th, 2005, 11:07 PM
Either

A. Create a movie clip below the car and then create all the snowflakes in it.

B. Do what TheCanadian suggested and set the car to a higher depth.

C. Create all the snowflakes at a depth that is below -65536(which is I believe where timeline stuff is created - probably not your best bet)

-Matt

stringy
September 11th, 2005, 02:36 AM
I made this for someone else a while ago, see if it helps.Just uses the "A" suggestion of Elec G.
There is also an added function to remove the snow.
(if i were making this for myself would probably go with Canadians solution but you have to be careful with swapDepths() or you can end up with more than one instance)

hisham
September 11th, 2005, 07:14 AM
Thanks for the help mates! It works perfectly! and Canadian you are a genius! :thumb: