all groups > flash actionscript > september 2006 >
You're in the

flash actionscript

group:

MovieClip Depth


MovieClip Depth sbryner
9/20/2006 10:13:19 PM
flash actionscript:
Hello,

I have a MovieClip.... extraInfo_mc
I want it to, when loaded into a component loader to display above all other
graphics/text.
It displays above some but not all (don't know why) they are all on the bottom
layer of the main .swf.

I've tried in my Loader.swf's actionscript:


// when moreInfo_mc is released extraInfo_mc will be visible to display on top
of all mc's and text \\

moreInfo_mc.onRelease = function () {
extraInfo_mc._visible = true;
extraInfo_mc.swapDepths(_level0.getNextHighestDepth());
}

// also trie \\
moreInfo_mc.onRelease = function () {
extraInfo_mc._visible = true;
_root.x +=200;
_root.extraInfo_mc.swapDepths(_root.x);
}


can somebody tell me what the right way to place the mc on top of the main
timeline would be?

thanks,

sky
Re: MovieClip Depth coldMiner
9/20/2006 10:26:53 PM
1. maybe there are some movieclips loaded into a higher _level?
2. Or maybe extraInfo_mc is not a dynamic movie, but a movieclip on the
timeline?

if 1 - load extraInfo_mc on a higher _level
if 2 - link from libary and use attachMovie()
Re: MovieClip Depth I tried
9/20/2006 10:37:55 PM
The way things are placed in the movieclip hierarchy makes a big difference.
Swapping depths or other methods of setting depth only work if the two or more
movieclips you are working with are in the same level in the movieclip
hierarchy. You may be trying to set a movieclip within a movieclip to a higher
depth than something one level back in the hierarchy. It can get confusing
pretty quickly and it is imperative that you have a firm grasp on how your
movieclips are arranged. For help with that, I like to use x-ray, found at
http://osflash.org/xray.
Re: MovieClip Depth sbryner
9/21/2006 10:24:12 PM
Thanks,
I got it. I can see how quickly it gets confusing. I just linked it to the
loader and made sure the loaders depth was the highest on the "main" timeline.

not sure if it's proper but I didn't really attach it to a movie clip
I just used:

attachMovie("moreInfo", "extraInfo_mc",20);

without a movieClip in front of it. Will I have troubles later or is it just
attaching it to the timeline somehow?

anyway, it works.

Thanks all that replied.

sky
AddThis Social Bookmark Button