Also, don't use "on-clip" methods like 

on (press) or on(release)

That's for non-coders who are making banner ads.  Instead, put your code
in the timeline:

btn.onPress = function() {
        //
};
btn.onRelease = function() {
        //
};

You'll thank me for it down the line.  It's never a good idea to put
code directly on buttons or movieclips.  Always put your code on the
timeline where it's easy to find without having to click on all the
individual buttons/clips in your movie.  There is no exception to this
rule, ever.

Also, the reason your code isn't working is because when you say
this.getNextHighestDepth(), you're referring to the depth INSIDE the
movieclip itself ("this" in an onPress method refers to the
movieclip/button - another reason to put your code on the timeline to
make things clearer).  You need to refer to the movieclip's parent.
this._parent.getNextHighestDepth();

HTH,
Steven 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Gaia-Tek
> Sent: Wednesday, April 12, 2006 3:02 AM
> To: Flashcoders mailing list
> Subject: [Flashcoders] Help with swapdepths
> 
> Hi Group,
> 
> I'm having a problem with a seemingly simple task...
> 
> I'm trying to get whichever movieclip on my stage is clicked 
> on, to swapDepths to the top, and be draggable...
> 
> My code is:
> 
> on (press) {
>     this.swapDepths(this.getNextHighestDepth());
>     startDrag(this);
> }
> on (release) {
>     stopDrag();
> }
> 
> Not working...
> 
> Any help would be appreciated...
> 
> Thanks
> 
> Don
> 
> 
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> 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
> 


___________________________________________________
This e-mail is intended only for the named person or entity to which
it is addressed and contains valuable business information that is 
privileged, confidential and/or otherwise protected from disclosure. 
Dissemination, distribution or copying of this e-mail or the 
information herein by anyone other than the intended recipient, or 
an employee or agent responsible for delivering the message to the 
intended recipient, is strictly prohibited. All contents are the 
copyright property of Agency.com Ltd., its affiliates or a client of 
such agencies. If you are not the intended recipient, you are 
nevertheless bound to respect the worldwide legal rights of 
Agency.com, its affiliates and its clients. We require that 
unintended recipients delete the e-mail and destroy all electronic 
copies in their system, retaining no copies in any media. If you
have received this e-mail in error, please immediately notify us via 
e-mail to [EMAIL PROTECTED] We appreciate your cooperation.

We make no warranties as to the accuracy or completeness of this 
e-mail and accept no liability for its content or use. Any opinions 
expressed in this e-mail are those of the author and do not 
necessarily reflect the opinions of Agency.com or any of its 
affiliates.

_______________________________________________
Flashcoders@chattyfig.figleaf.com
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

Reply via email to