Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Swapping Depths?



Ok I have 6 buttons, on click of each button a new graphic masks in. I have put these 6 masked graphics in 6 mclips. I have also added an empty mclip to be used as the target mc to load these 6 mcs into.

I am not using external swfs so how can I make the corresponding mc load into the empty mc on click of a button? I am trying to use swap depths but it is not working.



Ultrashock Forums > Flash > ActionScript
Posted on: 2002-05-31


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Swapping Depths
I'm looking for a solution to my little problem.

What I am trying to do is to swap the depths of two clips I attach to stage in the runtime
http://galileo.spaceports.com/~skd/scr.swf
'Craft Window' attaches a new 'window' clip to the stage with a name of "newindowX" (where X is the accumulator var) on depth equal to X.

What I want to achieve is on press of the drag bar (A button inside the window clip), I want to switch the depths of the clip on which I activate the button with the clip on top (it's depth is equal to the current value of X), thus bringing the needed clip on top of the stash.

What my problem is - I cannot yet get how to call swapDepths for the clip A by activating the event from inside the clip A (with the help of button, in my case).

Any help would be deeply appreciated.

Swapping Depths
How can swap depths between more than two movieclips.. Please help

Swapping Depths Of .swf's
i have three buttons...when clicked i want each button to open a window with more buttons, which when clicked on open other windows...

the first one i managed to do...it is draggable and collapsable, but i would like to know how to open the other windows, and then bring a window to the front when clicked on (i woud also love it if the ones in the background could by less opaque as well!)

thanks anyone and everyone!

Swapping Depths...
I'm trying to create this 3D effect kinda on character in flash that looks at the direction of your mouse, but to make it happen I need to make the ears have a lower depth so they get behind the rest and so on... how do I do this?
I've tried to just use swapDepths and put a high number if I want to bring it forward... but it doesnt work, look below for how I've tried...

_root.faceMC.swapDepths(1);
_root.NoseMC.swapDepths(98);
_root.LearMC.swapDepths(49);
_root.FaceMC.swapDepths(50);
_root.LeyeMC.swapDepths(90);
_root.ReyeMC.swapDepths(91);
_root.LeyebrowMC.swapDepths(92);
_root.ReyebrowMC.swapDepths(93);
_root.HairMC.swapDepths(94);
_root.LpupMC.swapDepths(95);
_root.RpupMC.swapDepths(96);
_root.MouthMC.swapDepths(97);
_root.RearMC.swapDepths(99);
_root.LchinMC.swapDepths(104);
_root.RchinMC.swapDepths(105);
}

The depth level of the movieclips seems to be random at best :P

here's a link to my project http://lillebo.org/misc/afterMouseAni.html

Swapping Depths
This ist my code in the first frame of my MC, but it doesn't work! What I want to do ist putting the Symbol/MC in front of the water.swf i've loaded!

loadMovieNum("water.swf", 1);
this.onEnterFrame = function() {
_level1._x = 190;
_level1._y = -60;
_level1._xscale = 125;
_level1._yscale = 125;
duplicateMovieClip(_root.backgroundimage, "backgroundimage2", 2);
removeMovieClip(_root.backgroundimage);
_root.backgroundframe2.swapDepths(1);
};

thanks for helping

Swapping Depths Of Two Mc's At Once
Hi All,

Does anyone know/tell me how to do the following please?

I have an .fla (attached) that contains six mc's - three blocks (titled A,B & C) and three shadows (titled shad1, shad2 & shad3) for the blocks.

At the moment each of three blocks reacts to a mouseover and looks as though it is sticking to the cursor before springing back to it's origin.
The code that controls this is placed within each of the blocks and looks like this:

PHP Code:




// custom variables
graphic.elasticity = 20;
graphic.resistance = .1;


// internal variables
graphic._xvelocity = 20;
graphic._yvelocity = 20;

function followMouse(){
    this._x = this._parent._xmouse;
    this._y = this._parent._ymouse;
}
function springToOrigin(){
    this._xvelocity -= this._x * this.elasticity;
    this._yvelocity -= this._y * this.elasticity;
    this._xvelocity *= this.resistance;
    this._yvelocity *= this.resistance;
    this._x += this._xvelocity ;
    this._y += this._yvelocity ;
}
area.onRollOver = function(){
    this._parent.swapDepths( _root.getNextHighestDepth() );
    graphic.onEnterFrame = followMouse;
}
area.onRollOut = function(){
    graphic.onEnterFrame = springToOrigin;
}







This works great - and as the blocks stick to the cursor the mc for that blocks comes to the highest level so it appears higher than the other two blocks.

What i need to do is make the shadow for the block follow the block as it sticks to the mouse and also jump to the highest level too - but then when the block/shadow springs back to origin I want the shadow to return to the lowsest level and the block returns to it's original level.

Does that make sense to anyone? as the mouse moves over the block, the shadow attaches itself to the block and they both jump to the highest level - then when the mouse moves far enough to make them spring back the shadow returns to the lowest level and the block returns to the same level as the other block mc's

How can I do this? I don't know if I should be looking at something where on rollover the block mc goes to a frame with the shadow and the shadow mc goes to an empty frame - and then both go back to frame 1 on rollout...

but attempts looked very jumpy - slow - and not nice at all - anyone done anything like this before?
Hope someone can sort me out ;-)

Swapping Depths In AS3
Hey guys,

Can anyone explain to me how to convert swapDepths() in AS2 to AS3 code?


I have had a look at the help, done a limited Google search and it would seem that it has something to do with the DisplayObjectContainer.

From my initial understanding I may need to loop the container, rearrange the objects, bringing the sprite I require to top.

This seems some what laborious for something that was previously so simple.

This is one of my first attempts at AS3 code; from my understanding the idea of the container is like the DOM in html. Is this right?

Cheers

Swapping Depths
OK, I've got a volume slider that reveals itself when the user mouses over an icon, and it has been placed on a frame on the main timeline. There are also several movie clips that are put on the stage at runtime and moved around. At several points in time the attached movie clips overlap the part of the volume control that is not visible except when it's rolled over. How can I make the volume control clip appear OVER the loaded movie clip???

I tried attaching the volume control clip dynamically on the stage and using swapDepths to swap it with the highest level button, but the volume control doesn't work right after the swapDepths command is called (it works fine before the depths are swapped)

Any ideas???

Swapping Depths In Version 4
Is there any way to swap the depth of a movie clip if you're exporting your movie for the Flash 4 player? The swapdepths command only works if I'm exporting my movie for the Flash 5 player.

Swapping Depths In Version 4
Is there any way to swap the depth of a movie clip if you're exporting your movie for the Flash 4 player? The swapdepths command only works if I'm exporting my movie for the Flash 5 player.

Depths Swapping (and Some Other Stuff)
You know the depth you deal with when you duplicateMovieClip or attachMovieClip? Well, is there any way to change that depth of an exsitsing mc? Like, can I change it so that it has like depth 1000 or 5 with something like:


Code:
setDepth (MovieClip) {depth you want it to be}
I know you can't do that, but what can you do?

Swapping Depths And Proximity
I have a bunch of movieclips in my movie that have this proximity code attached to them. I want it so that when your are focused on a movieclip, that clip will swap depths so that it becomes the highest one (so that it is in front of all of the other ones). I have the code set up to do a swapDepth but it is not working. Does anyone see what is wrong? Here is the code:


Code:
onClipEvent (enterFrame) {
lx = this._x-_root._xmouse;
ly = this._y-_root._ymouse;
myVar = (50/(Math.sqrt(lx*lx+ly*ly))*100);
if (myVar>=100) {
myVar = 100;
}
if (myVar<=50) {
myVar = 50;
}
if (myVar>=55) {
this._rotation = myVar/-8;
}
if (myVar<=55) {
this._rotation = 0;
}
if (myVar>=50) {
myVar = myVar/2;
this.swapDepths(this.getNextHighestDepth());
}
dx = (dx+(myVar-this._xscale)/5)/1.3;
dy = (dy+(myVar-this._yscale)/5)/1.3;
this._xscale += dx;
this._yscale += dy;
if (myVar>=50) {
this._alpha = 100;
} else {
this._alpha = myVar;
}
}

Swapping Depths For Buttons
Hi All,

I have this flash file that use a drag mask to show hidden movieclips which contain different buttons. But because the drag mask is already a button, I can't get to the other buttons. Does anyone know how i could swapdepths in AS3

MY CODE-------------------------

this.stop();

//this function handles the mouseDown event and startd the dragging of the hidden button
function eventResponseDown(event:MouseEvent):void {
testmov_mc.startDrag();
}

//this function handles the mouseUp event to stop the dragging of the hidden button
function eventResponseUp(event:MouseEvent):void {
testmov_mc.stopDrag();
}

//this function handles the onEnterFrame event and sets the mask position to the x & y of the button
function onEnterFrame(event:Event):void
{
mymask_mc.x=testmov_mc.x;
mymask_mc.y=testmov_mc.y;
}

//Listeners to initiate the event functions
testmov_mc.addEventListener(MouseEvent.MOUSE_DOWN, eventResponseDown);
testmov_mc.addEventListener(MouseEvent.MOUSE_UP, eventResponseUp);
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);

//applies the gradiated mask to the photo
//NOTE: "Use runtime bitmap caching" must be checked in the properties pallet for the gradient mask to work
myphoto_mc.mask=mymask_mc;

-------------------------------------------------------------------------

Thanks in advance.

S.S.

Swapping Depths Of Two Textfield ?
How can i swap the depths of two dynamically created textfields ?

Swapping Depths Problemo
Hi again everyone
I've got a question about depths. Im building a gallery that contains thumbnails (like the thread that happened a week or so ago). Each thumbnail is dragged and dropped somewhere to load something else. But, all of the thumbnails are going underneath the other thumbnails when dragged. What do i need to add to my movieclip thumbnails to have each one getFocus from the others when dragged?

I hope i explained well enough! Thanks in advance

Swapping Depths With A Fade
Hello,
I want to swap depths on movieclips overlaying each other but instead of the new clip on rollover just popping up over the other one, i want it to fade into the top.

here is an attached .fla file in mx2004 format.

for those not using 2004, here is the code:


PHP Code:



but1.onRollOver = but2.onRollOver = but3.onRollOver = but4.onRollOver = function() {     this.swapDepths(getNextHighestDepth()); }; 




Also, is there a way to streamline this code so i dont have to type the button instance names every time i add another?

Swapping Depths Problemo
Hi again everyone
I've got a question about depths. Im building a gallery that contains thumbnails (like the thread that happened a week or so ago). Each thumbnail is dragged and dropped somewhere to load something else. But, all of the thumbnails are going underneath the other thumbnails when dragged. What do i need to add to my movieclip thumbnails to have each one getFocus from the others when dragged?

I hope i explained well enough! Thanks in advance

Swapping Depths With A Fade
Hello,
I want to swap depths on movieclips overlaying each other but instead of the new clip on rollover just popping up over the other one, i want it to fade into the top.

here is an attached .fla file in mx2004 format.

for those not using 2004, here is the code:


PHP Code:



but1.onRollOver = but2.onRollOver = but3.onRollOver = but4.onRollOver = function() {     this.swapDepths(getNextHighestDepth()); }; 




Also, is there a way to streamline this code so i dont have to type the button instance names every time i add another?

Problem Swapping Depths
Hi everybody,

I am having a problem swapping depths between MCs. I have one movie clip temp_mc, which I want to be in front of everything in my movie.
I have the code below in my first frame. Later, I load another movie into level 99. When I play the movie, _level99 appears in front of _level3000, which should be occupied by temp_mc.

am I missing something here? Please help


Code:
_root.createEmptyMovieClip("swapHolder_mc",3000);
swapHolder_mc.swapDepths (temp_mc);

Weird Behaviour When Swapping Depths
I put a movieclip instance (named craft) on the first frame and then I created an empty movie clip (board) to draw somethin on it.
I want the "craft" movieclip to be above the "board" movieclip so I swapped their depths, but then after I swapped, all of the drawing scripts for the "board" won't work.
my scripts goes somethin like this :

createEmptyMovieClip("board",10);
craft.swapDepths(board);
with(board)
{
// do all the drawings needed
}

Flash produce an error msg : "A with operation failed because the object couldn't be found"
what happened to the "board" since I assume it's the one that's missing.
If I exclude the swapDepths, everythings work just fine, of course the "board" is still in front of the "craft"

Can somebody help me ??

OnMouseDown Swapping Depths Problem
Hello,

I have duplicated a movie clip with a textfield and scrollbar so that its clone overlaps the original

i have the following actions set for both of them
Code:

Quote:




movieClip.onMouseDown = function(){
if(clone.getDepth()>movieClip.getDepth()){
movieClip.swapDepths(clone);
}
}

clone.onMouseDown = function(){
if(movieClip.getDepth()>clone.getDepth()){
clone.swapDepths(movieClip);
}
}





The problem is it only works once. when i use onMouseDown, and when i use onPress it works but i lose the ability to access the textfields' scrollBars

How do i over come this obstacle....do i need to killFocus or something....im trying it out but it isnt working out very well.

Kendall

Swapping Depths Not Working To Its Fullest
I have been trying to make this work, but so far I have been having a lack of luck. Guess I need to go to the luck store and pick some up, eh. No, Im just kidding. Any way I have narrowed the problem with my draggable movie clips down to this; the depth swapping seems to be off. I cant explain it properly but if you would please look at the file I have attached and tell me what kind of stupidity I have employed to make it not work I would be very appreciative. If you try placing "two" over "one" and click on the overlapping space you should see the problem.

Swapping Movie Clip Depths - Please Help
Hi All!

I have created two buttons, which create new Movie Clips in 'empty_mc'. However, each time a button is clicked I would like the 'newest' Movie Clip to be on top of the other so that there is always a smooth transition. I have tried using 'swapDepths' but this has not been successful. Here is the code that is attached to the buttons:


Code:
on (release) {
empty_mc.createEmptyMovieClip("resume", empty_mc.getNextHighestDepth());
empty_mc.resume.loadMovie("Resume/resume.swf");

}

on (release) {
empty_mc.createEmptyMovieClip("contact", empty_mc.getNextHighestDepth());
empty_mc.contact.loadMovie("Contact/contact.swf");
}
I would be very grateful for any help. Thanks.

Swapping Depths For Movie Clips
I have created a simple flash jigsaw puzzle. The drag start and stop I understand. However, the swapDepths code is not working. Here is the code I put in for my swap depths...this would be inside the onPress function right after the startDrag()....
-----------
piece1_mc.swapDepths(this.getNextHighestDepth());
-----------
I do this for all 4 pieces...but they don't move over and become the highest or on top level.

Any ideas? I have included the flash file...I am using Flash MX.

[F8] Movement Change When Swapping Depths
hi,
im dealing with a weird problem..
i have a movieclip called level and other for a player character called hero.

i placed them on Stage and it works just fine, player moves around at constant speed with no problem so far.

well i added more levels and im using attachMovie+removeMovieClip to change between levels..

the thing is that my player MC is always on stage.
i simply reset his position and place him where i want.

ok, but when i attach new level it takes a higher depth value, which means the player is overlapped by it, so i thought using swapDepths()


_root.attachMovie( "level"+levelNum+"_pack", "level"+levelNum, 100+levelNum );
// make sure levels are positioned at bottom left side
eval("level"+levelNum)._x = 0;
posy = Stage.height-eval("level"+levelNum)._height;
eval("level"+levelNum)._y = posy;
hero._x = 56;
hero._y = eval("level"+levelNum).terrain._y - 60;
hero.swapDepths( 100+levelNum+1 );


with the swapDepths the overlapping problem is solved but the thing is that the player's velocity changes when i start walking and hit a point of the screen i used for background scrolling..

check this link it will see what i mean..
when u start, that is the correct velocity for the player.. move right until it starts scrolling.. speed changes..

WEBSITE


NOTE! this speed change problem does not happen is i place the MC manually on stage.

anyone know any reason for this?
thanks in advance

Does Swapping Depths Normally Cause Problems With UnloadMovie()?
Hi there.

Is there any reason that two movie clips, once they have swapped depths, would fail to unload themselves if in their timelines they had a this.unloadMovie(); command on their final frame, or as part of their code?

I'm experiencing both problems... animations reaching the end of their timeline and failing to unload, and clips failing to unload as instructed in the actionscript after being involved in a depth swap. The unloadMovie(); works flawlessly whenever there is no depth swapping in both the timeline and the actionscript under normal circumstances, but once the swapping starts, it seems to cause one or both of the swapped clips to randomly fail to unload.

Why would this happen?

I'm using FlashMX, if that helps.

Help With Loading Pics And Swapping Depths Please
Im using a external swf for my background on the bottom layer of my movie. Loaded like this...

[CODE]

function load_pic(whichmovie){
var currentPic = whichmovie;
_root.pictureback.holder.loadMovie(currentPic, 1);
};

load_pic("backpics/pic1.swf");

[/CODE]

Id like to ad a preloader to it so the person knows the background is loading. After its loaded, Id like to continue to load the other background pics because I want each of my button pages to have a different background.

Can anyone help me set something up, so that after the 1st pic is loaded, it contunes to load the rest of the pics, off stage, then when a button is pushed swap depths and slide over the existing background picture?

Thanks!
Rich

Regarding Swapping Depths Of A Movie Clip Using SwapDepths...
mc.swapDepths(0); puts the mc to the toppest level, how do I put it in a lower level?

Help pls anybody. Thanks

Dynamically Creating Clips And Swapping Their Depths
Hi i have two existing movieclips on different layers(top_mc and bottom_mc) .
i want to dynamically create sublips of each and swap their depths
something like bottom_mc.clipx and top_mc.clipx (where x is an integer) and then swap their depths. i have tried to no avail. can you please provide an example. thank you.

Swapping/sorting Movie Clips (not Their Depths)
I have a project that requires that I be able to dynamically load a series of flv's/thumbnails, drag and drop the thumbnails into new positions in a sorted order then export back to xml. I can't rearrange based on depth as the clips are traveling in a circle, also because I need to actually change the clips for export to xml.

In this current version, I have the thumbs dragged over each other then (in theory) the one would be replaced by the other. Right now they just go away as the removeMovieClip() function is working but I seem to have the syntax on attachMovieClip wrong. My immediate question is how to do the swapping correctly.

However, what I really need is for the clip to be inserted in the series after the clip over which it is dragged. (such that the others are all filed down). Flash has no pointers so my imidiate reaction on how to do this won't work. I could potentially load the xml into an array instead, but I still don't know if the swapping would work and don't quite know the syntax on that either.

Does anyone know a good drag and drop movie sorting technique?

The code is as follows with certain chunks of irrelevant code cut for clarity:
(the currentThumb.onRelease() being the relevant section)
// Globals
var rotation = 0; // current rotation

// load variables object to handle loading of text
var description_lv = new LoadVars();
description_lv.onData = function(raw_text){description_txt.text = raw_text;}

function GeneratePortfolio(portfolio_xml){

var portfolioPictures = portfolio_xml.firstChild.childNodes
var picTotal = portfolioPictures.length;
var tempThumb_mc = menu_mc.createEmptyMovieClip("temp", 100);

var swapVid:String;

for (var i = 0; i < portfolioPictures.length; i++){
var currentPicture = portfolioPictures[i];
var currentThumb_mc = menu_mc.createEmptyMovieClip("thumbnail_mc"+i,i);

currentThumb_mc.createEmptyMovieClip("thumb_contai ner",0);
currentThumb_mc.thumb_container.loadMovie(currentP icture.attributes.thumb);
currentThumb_mc.image = currentPicture.attributes.video;
currentThumb_mc.oderNo = i;
currentThumb_mc.distance = (Math.PI / picTotal) * 2 * i;
currentThumb_mc.dragging = 0;

currentThumb_mc.onEnterFrame = function (spacing){
// spin when not dragging
if (!dragging){
rotation -= (_xmouse-420)/15000;
this._x = Math.sin(rotation + this.distance)* 128;
this._y = Math.cos(rotation + this.distance)* 30;}
this.swapDepths(this._y);}

// drag image
currentThumb_mc.onPress = function(){
dragging = 1;
startDrag(this);}

currentThumb_mc.onRelease = function(){
if (this._droptarget){
swapVid = this.image;
removeMovieClip(swap_mc);
duplicateMovieClip(this.thumb_container, "swap_mc", this.thumb_container.getDepth());

this.image = eval(this._droptarget)._parent.image;
this.thumb_container.removeMovieClip();
this.attachMovie("thumb_container", eval(this._droptarget), eval(this._droptarget).getDepth());

eval(this._droptarget)._parent.image = swapVid;
eval(this._droptarget).removeMovieClip();
eval(this._droptarget)._parent.attachMovie("thumb_ container", "swap_mc", swap_mc.getDepth());}
stopDrag();
dragging = 0;}}}

// xml object for xml content (defines sources for selections)
var portfolio_xml = new XML();
portfolio_xml.ignoreWhite = true;
portfolio_xml.onLoad = function(success){
if (success) GeneratePortfolio(this);
else trace("Error loading XML file"); // no success? trace error (wont be seen on web)
}

// load
portfolio_xml.load("portfolio2.xml");

stop();

Help With Swapping Depths In Duplicated MovieClips (to Create Popup Menu)
Tataaa - my first Flashkit posting.

I'm running into an issue with level swapping in a movie I'm making. It's a very complex one for my skill level, so maybe there is a very obvious answer that I'm just not aware of.

Background:
I have one movie in level0 that maintains a XML socket connection to a server and sets some global variables based on data from the server. Into this movie I loadMovie a second movie. This second movie uses the data on level0 to create an interface. It's this interface where I have problems:

Essentially I want to monitor and modify the state of a number of objects on the server. For that I created a movieClip "Monitor" which shows the current state of one of these objects using an animation. On top of that is an invisible button that will open a popup menu when clicked (this is used to change the state of the object). I built this popup menu as one movieClip with two labels: 'open' and 'closed' and jump between those. In the closed state it's simply an empty frame. The important part here is (I think) that there is one of these popups in every instance of the Monitor movieClip.

For every object to be monitored I dynamically create an instance of the "Monitor" clip using duplicateMovieClip.

From this you can guess already what the base problem is: when I click on a Monitor, the popup opens up, but in most cases it's hidden under another Monitor clip (they are right next to each other).

If I understand this correctly, I just need to do a swapDepths of the Monitor instance the user clicked on with the highest level of monitor, right?

Except: it doesn't work. The clips don't seem to change levels at all.

Does anybody have an idea why I might have done wrong?

here is the code that creates the monitor instances:

var posx = 30;
var posy = 30;
for (var i=0; i<people.length; i++) {
duplicateMovieClip("monitorInstance", people[i], i+1);
setProperty(people[i], _x, posx);
setProperty(people[i], _y, posy);
posx += monitorInstance._width+2;
if (posx > 300) {
posx = 30;
posy += monitorInstance._height+2;
}
}
highestLevel = people.length + 1;

So I do keep the highest level in highestLevel.


The popupMenu has this code (note that I have to access highestLevel on _level1 because _root is the other movie that maintains the server connection)

on (press) {
// we need to put this to the top
trace("HighestLevel = " + _level1.highestLevel);
this.swapDepths(_level1.highestLevel);
gotoAndPlay("open");
}


I see the trace, I see a reasonable number for highestLevel, I see the menu opening. ONly it's not on the top.

As this popupMenu is part of MOnitor, doing it this way should pull both the MOnitor and the popup to the top, right? I actually don't care about monitor, but the menu. I'm just trying to understand what I"m doing wrong here.

Thanks for any help/pointers/fixes.

-- Juggle5

Swapping Mc
This is really stupid but I am an actionscript newbie.

I have an empty mc. When I rollover a button I want the blank movie clip to play a different mc, on mouseout it goes back to empty. When I mousedown I want the blank movie clip to switch. It is just like in HTML when you want to swap images but I want to do it in flash with mc's.

I hope this makes sense. I can do it in a timeline format but I want to use actionscript.

Thanks in Advance
Spiral

Swapping Mc - Duh
This is really stupid but I am an actionscript newbie.

I have an empty mc. When I rollover a button I want the blank movie clip to play a different mc, on mouseout it goes back to empty. When I mousedown I want the blank movie clip to switch. It is just like in HTML when you want to swap images but I want to do it in flash with mc's.

I hope this makes sense. I can do it in a timeline format but I want to use actionscript. Do I use OnMouseEvent with a LoadMovie?

Thanks in Advance
Spiral

Swapping Mcs?
i have one mc nested in another in another in another... and a second one, invisible, outside on the top (_root).

at a certain point i want to swap the one inside (with all its content) with the one outside, and later on reverse this again. how can i achieve this?

can i eventually not use the dummy mc outside but instead create or copy a dummy mc (to swap with) and delete this when swapping back in?

tenthousandtimes thank you for any help, danny.

Swapping MC Help Please
Howdy all,

I've been trying to figure this one out on my own, but am getting nowhere. I have a MC on stage with 25 smaller MC in it. How can I randomly swap-out the 25 each of the smaller MC with 1 of 5 animations MC storied the library.

Any advice on this would be great.

Thanks

-L

Swapping MCs ..
Kinda new to Flash .. issit possible to do this
I've got a FLA containing several sections , around 5 of 'em..
but i need to do a transition between the sections.
The transitions are basically the same but the backgrounds
are different. I don't wanna build 25 different transition
MCs .. i just wanna build 1 MC with the transition on top
and the background below. SO i probably need some variable
to detect which background to switch to .. how do i do it ?
Thanks...

Swapping Swf For Gif
Apologies if I searched in the wrong area for information before asking this question but rather desperate for a comprehensive answer and have not found it thus far on the site:

Being a front end designer I wonder if there is a simple way for me to code a page such that if someone's browser does not have Flash installed it defaults to a gif substitute? Is there an easy way for me to do this within Dreamweaver 8?

Depths
Hey, I'm tyring to duplicate multipul movie clips (rockets for my spaceship game), but i want to duplicate them so that the rocket is under the spaceship, i tried duplicating the movieclip then swaping the depth the the spaceship, but then when i go to remove the rocket movie clip, the first rocket that was created doesn't get removed.
I need help with this, i dont know whats wrong

Help With Depths
doctor.hothere.com

I have the links leading to tell target a movie clip. The problem is that I have many links, and I don't know how to use the depth to have the movie clip on top of the others when the button that leads to the clip is clicked. Her's the code I have now.

on (rollOut) {
tellTarget ("Member Pic MC-Disappear") {
gotoAndPlay ("Member Disappear");
_root.depth++;
this.swapDepths(_root.depth);
}
}
on (release) {
tellTarget ("Member Link") {
gotoAndPlay ("Member Link");
_root.depth++;
this.swapDepths(_root.depth);
}
}
on (release) {
_root.depth++;
this.swapDepths(_root.depth);
}

Depths
Hi there,

I know how I have to load an external movie on the second level, but what do I have to do to make sure that the movieclip on the original timeline (now level 1) is on level 2 so I can load an external movie underneath?

greetings

robin

Depths
Got a project going where you can open up a few windows at once. I have the depth problem solved, but I also have a "tooltip" mc incorporated and the problem is that when the windows come to the top (only after they come to the top), my tooltips crash to the bottom and are hidden behind the windows! How can I make the tooltips come to the top regardless of all other level depths (like level 100 or whatever)? I tried a few scripts on the tooltip mc but nothing seems to work. Thanks for any advice.

MC Depths
I'm not to sure about this MC depth thing but I think it's causing problems to a game I'm making.

If 2 movieclips, completely different from each other have been created by different movieclip actions but have been given the same depth, does this mean one will over-write the other?

Also can you assign a depth of -1 for example so appears under a movie clip with a depth of 0?

Thankyou for your reply if you do. Great help.

Depths O_0?
ok, i've got a main interface. pages get loaded into it on button release. the pages represent windows like um... microsoft windows. when i'm loading the pages i use a counter variable for the depths they're loaded into. i.e.


Code:
on (release) {
//_root.home1.unloadMovie()
_root.createEmptyMovieClip("home1", counter);
loadMovie("home.swf", "home1");
container._x = 0 ;
container._y = 2 ;
counter = counter + 1;
}
the counter increments evrytime i load up a new page, on the loaded pages i have this code:

Code:
on (press) {
_root.home1.swapDepths(counter + 1);
startDrag(_parent);

}
from what i've read on senoclears tutorial and various posts here that should work, however it doesn't seem to be working.

also, aside from that, after i close (unloadmovie) a window that has been loaded and load another one ontop (incrementing the counter) if i re-open the window that was closed it re-appears on the origional level it was closed on and not the top level as i (and the counter) expected. and1 have any suggestions?

cheers, squid.

How To (depths)
Hi there,
I´m stuck with a problem and don´t know which is the best way to solve it. I don´t need a ready solution, but maybe just a different way to approach it...

Ok, I´ve got 15 dynamically loaded jpeg stacked on top of each other in levels 200 to 215. Now I want to fade them in and out...
The problem is, the image on the higher levels fade much smoother and faster than the images on lower depths. Fading against the background is awfully slow.
Fading becomes much quicker, if I put a mc which contains just a white square big enough to hide the images just below the fading objects.

This is how I´d do it:
Put the white square on level 218. Load the images which have to be faded on levels 219 and 220 with .swapdepths. Keep track which movie is where and create a routine to swap them back to their original level after use.

Doesn´t sound like a good solution, more like a workaround.

Has anyone another idea???

MCs Depths
ok i use _root.createEmptyMovieClip(i, -10000+i); to make all the MCs i need and i use _root[i].loadMovie(k) to put pictures in the MCs... now that's all fine, but everything alse renders below these pictures, like they were in the top layer... but they are from -10000
now why are they ON everything?
if anyone knows, i'd be happy to be helped

MCs Depths
ok i use _root.createEmptyMovieClip(i, -10000+i); to make all the MCs i need and i use _root[i].loadMovie(k) to put pictures in the MCs... now that's all fine, but everything alse renders below these pictures, like they were in the top layer... but they are from -10000
now why are they ON everything?
if anyone knows, i'd be happy to be helped

Depths
Im working a game, and i've come across a problem. I need some stuff(we will call it A) that is inside of a movieclip higher then something (we will call it B) on a differnet layer in the main timeline. I would normally just move that movieclip (A) up a few layers in the timeline, but there are other parts of movieclip A i need to be lower then Movieclip B, if that makes any sence. Is there a script i can use to tell movieclips which depth to be set at that will ignore where they are on the timeline?
Hope that makes sence.

MC Depths
Is there a limit to the amount of MC depths you can use??

I am making a tile based game, and i am attaching the baddies as new MC's on the grid (each on a separate depth). The game works fine until i add more than 6 badies to the screen.

Cheers
Paul

Depths?
hey,

I have four buttons, then i have four movie clips that have a simple picture transition animation. OK, i wanna make it so when someone clicks button 2, then my movieclip 2 plays ONTOP of the current movieclip. and if they click on button 3, then movieclip 3 would play it's trasition animation ONTO of the current moveclip (movieclip 2) and so on. So bascially, i want my new picture animation to load on top of the current (so while the new animation is playing, i still want the current image (moveieclip) to on the bottom.

Does anyone know how this can be accomplished?

Thanks,
Baljinder

Copyright © 2005-08 www.BigResource.com, All rights reserved