Question
MovieClipLoader loadClip and unloadClip
When I call unloadClip on a MovieClipLoader instance after
loading has started, but before loading finishes, the clip
continues loading. Is there any kind of "stop()" functionality for
the MovieClipLoader?
I have a main image viewer tied to button events that tell it to load the next or previous image. So if the user clicks the next button 10 times, the MovieClipLoader instance will load all 10 clips, rather than dumping the UrLs sent by the previous 9 clicks. I know I can just disable the buttons until the data has loaded, but that shouldn't be necessary.
I've tried these workarounds with no success:
- Re-initializing the moviecliploader instance I am using when either button is clicked
- Deleting the target movie of the previous load, and putting the new target on another level with a different name
I thought about setting the _alpha property of the targets of previous load requests to 0, but that still means that the user has to wait for each image to download before they get to the one they wanted. So they don't see the clips loading but they have to wait alot longer.
I haven't found much help on the forums for this, or the documentation. So, I assume it's still possible to halt the loading of data with moviecliploader as I have not come across any site that says "You must wait for the load to finish before calling unloadClip()". The documentation says that unloadClip during loading should trigger onLoadError, but it doesn't -- someone made mention of this in the user comments section but I haven't seen a response to it.
http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00001584.html
http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002538.html
Thanks in advance for any help. Even if it's to tell me that you can't stop loading a file mid-stream.
I have a main image viewer tied to button events that tell it to load the next or previous image. So if the user clicks the next button 10 times, the MovieClipLoader instance will load all 10 clips, rather than dumping the UrLs sent by the previous 9 clicks. I know I can just disable the buttons until the data has loaded, but that shouldn't be necessary.
I've tried these workarounds with no success:
- Re-initializing the moviecliploader instance I am using when either button is clicked
- Deleting the target movie of the previous load, and putting the new target on another level with a different name
I thought about setting the _alpha property of the targets of previous load requests to 0, but that still means that the user has to wait for each image to download before they get to the one they wanted. So they don't see the clips loading but they have to wait alot longer.
I haven't found much help on the forums for this, or the documentation. So, I assume it's still possible to halt the loading of data with moviecliploader as I have not come across any site that says "You must wait for the load to finish before calling unloadClip()". The documentation says that unloadClip during loading should trigger onLoadError, but it doesn't -- someone made mention of this in the user comments section but I haven't seen a response to it.
http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00001584.html
http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002538.html
Thanks in advance for any help. Even if it's to tell me that you can't stop loading a file mid-stream.
