I have a main movie with 5 buttons that launch seperate .swf’s (loadMovie).
They are draggable, but I can’t get the swapdepths to work.
Main movie button 1:
on(release){
loadMovie("pop1.swf", 40)
}
Main movie button 2:
on(release){
loadMovie("pop2.swf", 41)
}
popup 1:
on (press) {
_root.pop1.startDrag();
_level0.mydepth += 20;
_root.pop1.swapDepths(_level0.mydepth);
}
on (release) {
_root.pop1.stopDrag();
}
popup2:
on (press) {
_root.pop1.startDrag();
_level0.mydepth += 20;
_root.pop2.swapDepths(_level0.mydepth);
}
on (release) {
_root.pop2.stopDrag();
}
I attached my .fla’s
system
2
Just wanted to add that I followed Kirupa’s and a few other tutorials, but couldn’t get it to work…
Any thoughts?
is it a _level issue?
system
3
Levels are something different as depths.
I’ve changed the code a little, the swf are now loaded in empty mc’s
on(release){
box1.loadMovie("pop1.swf")
}
and the code in pop1:
on (press) {
this._parent.startDrag();
_level0.mydepth += 20;
this._parent.swapDepths(_level0.mydepth);
}
on (release) {
this._parent.stopDrag();
}
scotty(-:
system
4
Thank You,
Works perfect.
If anybody needs a swapdepths sample using loadmovie, download scotty’s zip file above this post.
system
6
the swap depth work but when you close the popups the buttons disappears.
system
7
You’re right, I never looked at the close button:stunned:
Replace the code on the button with this one
on (release) {
this._parent._visible = 0;
}
scotty(-: