[Laszlo-checkins] r11811 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9
max@openlaszlo.org
max at openlaszlo.org
Mon Nov 17 18:06:28 PST 2008
Author: max
Date: 2008-11-17 18:06:27 -0800 (Mon, 17 Nov 2008)
New Revision: 11811
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
Log:
Change 20081117-maxcarlson-y by maxcarlson at Bank.local 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
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as 2008-11-18 01:35:55 UTC (rev 11810)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as 2008-11-18 02:06:27 UTC (rev 11811)
@@ -1031,6 +1031,21 @@
this.addChildAt(asset,IMGDEPTH);
this.applyStretchResource();
+
+ if (asset is MovieClip && this.totalframes == 1) {
+ var loader:Loader = MovieClip(asset).getChildAt(0) as Loader;
+ if (loader.content is AVM1Movie) {
+ //no playback control for AVM1 movies...
+ } else {
+ // treat as a loader...
+ // could they make this any less obvious?
+ // see http://www.bit-101.com/blog/?p=1435
+ this.__isinternalresource = false;
+ this.loaderMC = MovieClip(loader.content);
+ this.totalframes = this.loaderMC.totalFrames;
+ this.loaderMC.gotoAndStop(fn);
+ }
+ }
} else {
// bad resource?
}
More information about the Laszlo-checkins
mailing list