Okay, I have fixed the problem. I would say that this is certainly bug with Flash, but there is a work around. Thanks to Keith Peters for mentioning this to me last night.
So here's the deal... Back in the day before MovieClipLoader when you wanted to load and external SWF, you had to check a property of the MovieClip to see if it existed before you could manipulate it. You needed to create an interval that would check to see if it's initialized in this way. This all makes sense to me, but what doesn't, is that you can't just check that any property of MovieClip was set. There is a magic property that seems to indicate that the MovieClip is fully initialized. That property is _width. So with this in mind I added a check to the onLoadProgress event like so: private function handleLoadProgress(targetMC:MovieClip, loadedBytes:Number, totalBytes:Number):Void { if (MovieAsset.HIDE_WHEN_LOADED) { if (targetMC._width != undefined || targetMC._width != 0) { targetMC._visible = false; } } } Now, how's that for obscure? It does fix the issue, and instanceof is indeed a MovieClip once again. Oh, and even better, _visible works like a charm. Thanks again to all those that helped out with this one. -Chris On 8/24/06, Chris Allen <[EMAIL PROTECTED]> wrote:
Thanks for your help on this Ian. I'm not sure I understand all of what you found here, so let me summarize with some questions to see if I got it right. Flash 6 SWFs fail every time when loaded remotely? - This hasn't been my experience. I've been able to load some small ones (20K) without the issue. You think it may have to so with domain security in Flash? When loading from your files system the Flash 7 and 8 files load correctly but not Flash 6? Some findings I have made: The behavior is slightly different on a Macintosh versus a Windows machine. Which are you using? Altering nothing before the SWF is fully loaded screws up the instanceof stuff but all of the MovieClip properties work just fine. If I try to alter the _visible property before it's fully loaded it causes that property to no longer function once fully loaded. I have some other ideas to try out this morning and I will keep you posted on my progress. Thanks to all of you who tried to help. -Chris On 8/24/06, Ian Thomas <[EMAIL PROTECTED]> wrote: > Oh, I should add - I get the same results when I throw the Fling code > out completely and write a simple loader from scratch. > > Cheers, > Ian > > On 8/24/06, Ian Thomas <[EMAIL PROTECTED]> wrote: > > > I'm certainly running out of ideas for a simple fix, here - and it's > > definitely not the loading code, it's a 'feature' or bug in the Flash > > Player. > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com >
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com