This content has been marked as final. Show 9 replies
you don't load into an empty movieclip and you don't need to wait until downloading is complete to add your loader (and its subsequent content) to the display list.
you can use the close() method of the loader class to stop downloads that are still in progress.
Yes, I said it wrong. Attaching a child loader to the empty movie clip would be the proper way of saying it for AS3.
The reason why I wait to addChild( ) until Event.COMPLETE is because otherwise the external file will show up on the stage and start playing the first x amount of frames before it has even completely finished downloading.
It seems to me (and I might be wrong) that if the function that has the addChild() statement in it doesn't run until the eventListener Event.COMPLETE calls it, then the external file waits to start playing until it's added.
Is this correct or am I just imagining things?
Thank you for your help!! I won't be able to work on the file until later this evening. Hopefully it won't be too hard to get the close() method to work properly.
you're imagining things. your swf starts to play whether it's added to the display list or not and it starts to play before that complete event executes.
Darn. I was hoping it wasn't my imagination.
I was trying to avoid having to use the start and stop methods. Oh well.
the easiest way to handle this is to insert an empty frame before frame 1 (in your external swf(s) ) and attach a stop() to that frame.
then when you want it to start execute a:
Excellent. Thank you!!
I didn't read this posting completely, but just want to let you know that I discovered after much tearing of the proverbial hair out that the Loader.close() method doesn't seem to work when you are using Simulate Download, but it DOES work if it is actually put up on a web site. If any one is interested in my test app that shows this, I would be happy to provide. I have logged a bug with Adobe as of today and it has an official internal tracking number. Hopefully it will get fixed.
i wouldn't hold my breath about getting that fixed. but thank you for adding that info.
SPGAnne, thank you so much for letting me know that. I was just about to start working on this file again so that I could incorporate the close method, and I would not have known to put it on a server to test it. I would have torn my hair out trying to get it to work using Simulate Download.
I'd like to see your test app. If you could, email to email@example.com or you can post the code in a reply to this message.