Intervals will persist until you stop them, so I'd create a
method in
the slideshow that kills the interval, and call that before
discarding
the clip. It's always a good idea to make sure you don't
have stray
intervals around, since they can start slowing things down
when there
are a bunch firing at once.
> 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?
_______________________________________________
dirGames-L mailing list - dirGames-L nuttybar.drama.uga.edu
http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames
-l
|