Hi
Can anyone share with me their suggested 'best
practices' for managing the loading of swfs associated
which have their own document classes?

All SWFs, regardless, have their own document class.


Is it recommended to NEVER unload a swf once it has been
loaded and added to the display list, but rather set its
visibility to 0?


If you don't want to use anything within the loaded swf, unload it. if your going to go right back to it in 5 minutes then don't unload it. The difference is all the code /animation is run again if you unload the swf. It doesn't re-download the swf.

I tend to rely on the  Event.ADDED_TO_STAGE event handler
for a lot of initializing, but have come across an issue
where it seems I have several copies of a particular
MovieClip class instantiated,

even though I unload the associated MovieClip.

in AS3, you can unload a SWF. There is no unload of MovieClips. Removing it from the display list either will not remove it unless it is garbage collected.

See SWFLOADER

Event.ADDED_TO_STAGE is a very early event. Event.INIT is the event you should be waiting for when loading SWFs via SWFLOADER. Remember SWFLOADER is a container mechanism and when it is added to stage has no bearing on the status of loading the swf.

On Feb 19, 2009, at 10:19 PM, Robert Hayes wrote:

I have just join this mailing list and saw your emails. I not sure what its called but there is a loader or class for as2 in as3. Ill try getting back to you.

For your last request loading SWF try this 
http://www.gotoandlearn.com/play?id=27
this is a great site for learning flash, enjoy.


********************************************************************************************************************************************************************************
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be
taken in reliance on it, is prohibited and may be unlawful.


--- On Thu, 2/19/09, [email protected] <[email protected]> wrote:

From: [email protected] <[email protected]>
Subject: [osflash] Q:AS3 Best Practices, loading SWF's and the DisplayList
To: [email protected]
Date: Thursday, February 19, 2009, 4:57 PM
Hi
Can anyone share with me their suggested 'best
practices' for managing the loading of swfs associated
which have their own document classes?

Is it recommended to NEVER unload a swf once it has been
loaded and added to the display list, but rather set its
visibility to 0?

I tend to rely on the  Event.ADDED_TO_STAGE event handler
for a lot of initializing, but have come across an issue
where it seems I have several copies of a particular
MovieClip class instantiated,

even though I unload the associated MovieClip.






[f] www.flickr.com/photos/bitstream
[c] 416.668.0034
[w] www.bitstream.ca
--------------------------------------------
"...all improvisation is life in search of a
style."
            - Bruce Mau,'LifeStyle'

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org




_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org


_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to