You have to remove the interval before the slideshow gets removed.
You can add an onUnload method in the slideshow class.

class SlideShow extends MovieClip {
 function SlideShow() {
 }
 function onUnload() {
  // remove interval
 }
}

regards,
Muzak

----- Original Message ----- 
From: "grimmwerks" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Thursday, October 19, 2006 2:03 PM
Subject: [Flashcoders] phantom flash class instance


> Ok, this is a flash question....
>
> I've got a class I'm using in an app - it's really simple, just is a
> 'slideshow' type class; it gets a list of images and cycles through
> them as a slideshow with an interval between.
>
> Now it's being used in a movieclip that is in turn being loaded in a
> Window component.  When a user clicks the window component close
> button, I've got it unloading the movieclip instance; but the
> slideshow class still tries to continue cycling through it's images
> array -- ie it's 'instance' is still going even though the movieclip
> that birthed it is gone.
>
> For example: the slideshow class, upon birth, gets it's 'owner/parent'
> movieclip upon it's birth. It then creates a new movieclip (myBack)
> and starts attaching jpgs to the myBack instance. When the main screen
> movieclip in the Window instance is removed, myBack no longer has a
> _url because it doesn't exist. I thought I could use the fact that
> myBack==undefined to clearInterval() and stop the phantom slideshow,
> but it doesn't stop.
>
> So how does one 'unload' a class, or really, a class instance?


_______________________________________________
[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

Reply via email to