This is an old thread, but I just found a (kind
of)problem with IlMaestro's solution.
The obvious way to set the html to '' is to call
setHTML. However setHTML invokes a load event, which
is not desirable behaviour when you are destroying the
layer (particularly if you are listening for these
load events). If setHTML could be passed a second
parameter to tell it not to invoke events (like
setSize) then this wouldn't be a problem.
The other problem with setting the HTML to '' is if
you have a layer with lots of children you can visibly
see netscape rerendering each layer. So perhaps the
layer should be hidden before the setHTML happens.
I've found that setting the layer HTML to null when
destroying layers greatly improved netscapes
stability. I think it's definetly worth adding to the
API. I could have a go at it myself but I don't have
access to CVS, how should I submit any changes I've
made?
--- Jordi 'IlMaestro' Ministral
<jmi...@or...> wrote: > Netscape does
not allow physical layers to be
> destroyed. Therefore DynAPI
> simply hides the layer and adds it to a temporary
> array. Any layer created
> after this will make the API reuse one of the
> deleted ones, and then content
> will be overriden and thus the flash movie
> destroyed. Simply set the HTML
> content of the layer to "" before destroying it and
> you will destroy the flash
> movie.
>
> I'll update the API's delete() method so it does it,
> but in the meantime you'll
> have to do it in your own code.
>
> Cya
>
>
> Cameron Hart wrote:
>
> > I've discovered a problem with a site I'm building
> at the moment. I'm using
> > layers that contain flash movies. These layers can
> be created and destroyed
> > an unlimited number of times while using the site.
> I discoved that when I
> > put a flash movie on a layer that contains sound,
> in netscape i can still
> > hear the movie playing after i've destroyed the
> layer containing the flash
> > movie.
> >
> > So it appears that Netscape is not destroying the
> contents of the DynLayer.
> >
> > I suspect that it is not only flash that this is
> happening with. Perhaps
> > other content is not being destroyed either.
> >
> > Has anyone come across this before?
> >
> > Thanks,
> >
> > Cameron.
> >
> > _______________________________________________
> > Dynapi-Dev mailing list
> > Dyn...@li...
> >
>
http://lists.sourceforge.net/mailman/listinfo/dynapi-dev
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> Dyn...@li...
>
http://lists.sourceforge.net/mailman/listinfo/dynapi-dev
>
>
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
|