[Fling] Where in the world is Sam.
Chris Allen
mrchrisallen at gmail.com
Fri Jul 28 09:05:11 EDT 2006
Hey Grant,
Yeah, I experienced this very thing and changed MovieAsset to dispatch
"ASSETLOADCOMPLETE" only on the onInit() method not the onComplete().
I figured that there is no point in letting people know when the Movie
has loaded if it's not completely ready to use. Check out the latest
from SVN to see my change.
If this isn't what you are talking about, please explain further.
-Chris
On 7/28/06, Grant Davies <grant at bluetube.com> wrote:
> Chris Allen / John Grden / Folks...
>
> Using the assetloader coming across a small issue, not a bug, just a
> "how should we solve this?"
>
> When loading a swf that contains other movie clips on stage in frame 1,
> I want to know when the swf has loaded and when the movie clips on stage
> are also loaded. Using total load complete with the assetloader tells
> you when the swf has loaded, but any movie clips on the stage are still
> initializing... For example, I have a swf called eventTemplate.swf and
> on stage in frame1 is a movie clips called eventDetailsForm :
>
> This is the event handler for total load complete :
>
> [INFO] 2006-07-28 00:42:47,390 | [FINE]
> com.aso.view.eventemplate.EventTemplateApplication -
> onEventDetailFormLoaded:58 - eventTemplate.swf was loaded by the asset
> loader
>
> So the "swf" is loaded, and in frame 1 of that swf there is a movie clip
> on stage called "eventDetailsForm"
>
> But if I try an use it "now" :
>
> [INFO] 2006-07-28 00:52:09,750 | [FINE]
> com.aso.view.eventemplate.EventTemplateApplication -
> onEventDetailFormLoaded:67 - eventDetailForm = null
>
>
> Its null.
>
> So I added some logging to the "onLoad" of the eventDetailsForm :
>
> [INFO] 2006-07-28 00:52:09,812 | [FINE]
> com.aso.view.eventemplate.EventDetailForm - onLoad:48 - this is
> _level0.appContainer.instance1.eventTemplateContainer.eventDetailForm
>
> And as you can see by the timestamp is after the total load complete was
> executed.
>
> So the "hack" I have right now, is I use the ARP framework anyway and I
> wrote arpx which has a system level event dispatcher, call it a "app
> event" dispatcher. I register with it to say "tell me when the
> eventDetailsForm is loaded" and in the eventDetailsForm onLoad method I
> fire a system level event :
>
> dispatchSystemEvent(new Event(StandardEventNames.ON_LOAD,
> ApplicationAssets.EVENT_DETAILS_FORM));
>
> This works, but a whole lot of work considering I'd really like fling to
> say "hey I loaded that swf AND any movie clips of frame 1 are also fully
> loaded"....
>
> So... Ideas ?
>
>
>
> Thanks
> Grant
> http://www.bluetube.com
> http://theresidentalien.typepad.com
>
>
> _______________________________________________
> Fling mailing list
> Fling at osflash.org
> http://osflash.org/mailman/listinfo/fling_osflash.org
>
More information about the Fling
mailing list