Thanks. I will note this in the future. I need to be more
consistent in my code. I often mix literal depths and
getNextHighestDepth()'s throughout my code. As projects get larger
this gets harder and harder to manage.
On May 20, 2006, at 2:21 PM, Robert A. Colvin wrote:
First of all don't use getNextHighestDepth unless you absolutely have
to. If the z-order of you images is not important and you simply want
to get to the top use mc.swapDepths(mcWithHighestDepth)
mcWithHighestDepth can be just be the last image you rolled over or
initially the last image you loaded in using depth+I if looping
through
xml.
Images disappearing could be because you used getNextHighestDepth when
loading them see comment above.
Just a guess since you didn't post the loading code.
Cheers
Robert
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Doug
Tangren
Sent: Saturday, May 20, 2006 2:15 PM
To: Flashcoders mailing list
Subject: [Flashcoders] swapping depths and disappearing clips
I am writing a simple gallery that loads image data in from xml. All
works well until I do the following. I set a ref variable to the
current photo and set up rollover handlers like the following
...
curPhoto.onRollOver = function(){
// move to the front
swapDepths(this.getNextHighestDepth());
this.scaleTo(90, 90, 2);
var startPos = this.photoTab_mc._x;
var targetPos = startPos + 25;
var tabTween:Tween = new
Tween(this.photoTab_mc, "_x",
Strong.easeOut, startPos, targetPos, .5, true);
}
curPhoto.onRollOut = function(){
this.scaleTo(65, 65, 2);
var startPos = this.photoTab_mc._x;
var targetPos = startPos - 25;
var tabTween:Tween = new
Tween(this.photoTab_mc, "_x",
Strong.easeOut, startPos, targetPos, .5, true);
}
...
My problems are two fold.
1. The swapDepths() function is not swapping depths so my photos
overlap when I scale them. I've tested this passing various depths as
arguements.
2. For some reason after some time passes my images just disappear
from the screen in the order that they were created. I don't know
what would be causing this.
Can any body telling me the cause of either one of these problems or
if anyone has had similar problems???
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com