+                  if (*asset is MovieClip* && this.totalframes == 1) {
+ var loader:Loader = MovieClip(asset).getChildAt(0) as Loader;
This code isn't 100% right, it's just working for MovieClipLoaderAssets, but it'll break for MovieClipAssets (if we ever embed swfs with symbols).


Another question concerning loading resources:
We know certain resources need some time to come up:
// it can take a while for new resources to show up. Call back on the next frame, when we have a valid size.
If this is also connected to MovieClipLoaderAssets (and only to MovieClipLoaderAssets), we could easily replace that callback code, because MovieClipLoaderAsset sends an "Event.COMPLETE" when its content was loaded. Thoughts?


Change 20081117-maxcarlson-y by [EMAIL PROTECTED] on 2008-11-17 17:33:30 PST
   in /Users/maxcarlson/openlaszlo/trunk-clean
   for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix playback control for compiled-in SWF resources in swf9

Bugs Fixed: LPP-6757 - Media Resources example 4 indicates issues detecting SWF animation's frames in SWF9

Technical Reviewer: hminsky
QA Reviewer: promanik

Details: Coerce to a loader where possible to allow playback control. See http://www.bit-101.com/blog/?p=1435 for the magic incantations...

Tests: See frames.lzx example attached to LPP-6757

Files:
M      WEB-INF/lps/lfc/kernel/swf9/LzSprite.as

Changeset: 
http://svn.openlaszlo.org/openlaszlo/patches/20081117-maxcarlson-y.tar

--

Reply via email to