Re: [Flashcoders] can't remove a clip attached to root???

2005-12-14 Thread Hans Wichman

Hi,
is this in an empty movie, or a movie with components in it?
Try and trace the depth, if its higher than a certain number (which may be 
caused by components on your stage) you have to swap it to a lower depth first.

greetz
Hans

At 10:27 PM 12/14/2005, Jason Rayles wrote:
Is there a reason that a movie clip attached to _root cannot be removed 
using removeMovieClip?


if I do
_root.attachMovie(square, s, _root.getNextHighestDepth());
then _root.s.removeMovieClip(); does not remove the clip.

However

if I do
mc.attachMovie(square, s, mc.getNextHighestDepth());
and mc.s.removeMovieClip(); works like a champ.

Flash 8, as 2.0. I am thoroughly stumped.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] can't remove a clip attached to root???

2005-12-14 Thread Morten Barklund Shockwaved

Jason Rayles wrote:
Is there a reason that a movie clip attached to _root cannot be removed 
using removeMovieClip?


If _root.getNextHighestDepth() returns a negative value, then you cannot 
remove the movieclip unless you swap it up to some positive depth. I'm 
not sure, but that might be it.


Otherwise, no! There is no such difference - of course you can do that.

Change the depth to 1, and see if that works out for you :)

--
Morten Barklund - Information Architect - Shockwaved
Gothersgade 49, 4th floor - DK-1123 Copenhagen K, Denmark
Phone: +45 7027 2227 - Fax: +45 3369 1174
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] can't remove a clip attached to root???

2005-12-14 Thread Cinetryx

Hello,

I noticed a problem with this function, getNextHighestDepth, it 
positions the clips to too high level and so removeMovieClip does not 
delete your clip. You have to put yourself a level to your clip.


bye

Jason Rayles a écrit :

Is there a reason that a movie clip attached to _root cannot be 
removed using removeMovieClip?


if I do
_root.attachMovie(square, s, _root.getNextHighestDepth());
then _root.s.removeMovieClip(); does not remove the clip.

However

if I do
mc.attachMovie(square, s, mc.getNextHighestDepth());
and mc.s.removeMovieClip(); works like a champ.

Flash 8, as 2.0. I am thoroughly stumped.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] can't remove a clip attached to root???

2005-12-14 Thread Jason Rayles
Magic, that's it. I am not using any prebuilt components, but I have 
made some components that extend UIObject, so I suspect that is why 
getNextHighestDepth returns 1048576, which I guess is outside the valid 
range. The documentation tells me to use the version 2 DepthManager 
class, but I am not sure how I would use that in place of attachMovie 
and getNextHighestDepth. Any suggestions?


If I can't do it simply with the DepthManager classs, then I guess I 
could pick a number and check against getInstanceAtDepth until I find 
an available depth. Seems dumb.


Eff. Better yet, I think I'll just put an empty movie clip on the stage 
and attach something to that.



On Dec 14, 2005, at 4:29 PM, [EMAIL PROTECTED] 
wrote:



Message: 16
Date: Wed, 14 Dec 2005 22:32:23 +0100
From: Hans Wichman [EMAIL PROTECTED]
Subject: Re: [Flashcoders] can't remove a clip attached to root???
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com,
flashcoders@chattyfig.figleaf.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii; format=flowed

Hi,
is this in an empty movie, or a movie with components in it?
Try and trace the depth, if its higher than a certain number (which 
may be
caused by components on your stage) you have to swap it to a lower 
depth first.

greetz
Hans

At 10:27 PM 12/14/2005, Jason Rayles wrote:
Is there a reason that a movie clip attached to _root cannot be 
removed

using removeMovieClip?

if I do
_root.attachMovie(square, s, _root.getNextHighestDepth());
then _root.s.removeMovieClip(); does not remove the clip.

However

if I do
mc.attachMovie(square, s, mc.getNextHighestDepth());
and mc.s.removeMovieClip(); works like a champ.

Flash 8, as 2.0. I am thoroughly stumped.


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] can't remove a clip attached to root???

2005-12-14 Thread Ben Smeets
Hi Jason,
 
The solution is like others already mentioned. The problem is the 
getNextHighestDepth and removeMovieclip unable to remove mc's in too high or 
too low levels. How i solve this is to first swapDepths and after that remove.
 
1. attach at getnexthighestdepth
2. mc.swapDepths(9); (i  use this level always for only this purpose)
3. mc.removeMovieClip
 
Shuold work like a charm. And no it's not you who iswrong, it's the code :)
 
Greets, Ben
 



From: [EMAIL PROTECTED] on behalf of Jason Rayles
Sent: Wed 12/14/2005 10:27 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] can't remove a clip attached to root???



Is there a reason that a movie clip attached to _root cannot be removed
using removeMovieClip?

if I do
_root.attachMovie(square, s, _root.getNextHighestDepth());
then _root.s.removeMovieClip(); does not remove the clip.

However

if I do
mc.attachMovie(square, s, mc.getNextHighestDepth());
and mc.s.removeMovieClip(); works like a champ.

Flash 8, as 2.0. I am thoroughly stumped.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders