[Laszlo-checkins] r12303 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9
max@openlaszlo.org
max at openlaszlo.org
Mon Jan 5 15:12:30 PST 2009
Author: max
Date: 2009-01-05 15:12:27 -0800 (Mon, 05 Jan 2009)
New Revision: 12303
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
Log:
Change 20090104-maxcarlson-l by maxcarlson at Bank.lan on 2009-01-04 07:28:23 PST
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: UPDATED - swf9: preserve value for initial frame number for resources
Bugs Fixed: LPP-7534 - The view resource frame is not working when passing it with the class tag
Technical Reviewer: andre.bargull at udo.edu
QA Reviewer: hminsky
Details: Take care to preserve the initial frame number for swf assets.
Tests: See both testcases in LPP-7534
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as 2009-01-05 23:10:09 UTC (rev 12302)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as 2009-01-05 23:12:27 UTC (rev 12303)
@@ -999,12 +999,12 @@
// Frames are one based not zero based
var frames:Array = resinfo.frames;
+ var origfn = fn;
if (fn == null || fn < 1) {
- fn = 1;
+ origfn = fn = 1;
} else if (fn > frames.length) {
fn = frames.length;
}
- this.frame = fn;
var framenumber:int = fn - 1;
var assetclass:Class;
@@ -1032,6 +1032,8 @@
var oRect:Rectangle = asset.getBounds( asset );
if (oRect.width == 0 || oRect.height == 0) {
+ // store the frame number passed in to prevent it from being reset
+ this.frame = origfn;
// it can take a while for new resources to show up. Call back on the next frame, when we have a valid size.
LzIdleKernel.addCallback(this, '__resetframe');
return;
@@ -1062,6 +1064,9 @@
this.totalframes = this.loaderMC.totalFrames;
this.loaderMC.gotoAndStop(fn);
}
+ } else {
+ // Set later, to prevent movieclip resources from being forced to frame 1 - see LPP-7534
+ this.frame = fn;
}
} else {
// bad resource?
More information about the Laszlo-checkins
mailing list