Approved, with Henry's change!
It builds for me in swf9 with your original changeset, as well as
with Henry's suggested change.
Change 20081212-maxcarlson-R by
<mailto:[email protected]>[email protected] on 2008-12-12
00:54:18 PST
in /Users/maxcarlson/openlaszlo/trunk-clean
for
<http://svn.openlaszlo.org/openlaszlo/trunk>http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Add load progress event for swf apps
Bugs Fixed: LPP-7264 - Add load progress event for embedded
applications (partial)
Technical Reviewer: promanik
QA Reviewer: hminsky
Details: This change adds a new event that fires as the application
loads. Unfortunately, it breaks swf9 compilation - I couldn't seem
to get the Runtime.getRuntime().exec() call to understand tokens
that have spaces in them - see SWF9External.java. Phil, can you
look at this? If I run the generated build.sh, everything works fine!
swf9/LzPreloader.as - Add implementation of preloader, embedded in
SWFWriter.java.
swf9/LFCApplication.as - Wait for the preloader to add the
application to the stage, before initting the LFC.
lfc/lzpreloader.as - Send load progress events to the browser for swf8.
sc/SWF9External.java - Avoid quoting -frame args for mxmlc. Tweak
the args to include the app on frame 2 and compile LzPreloader.as for frame 1.
compiler/SWFWriter.java - Always include the preloader so swf8 sends
load progress events reliably.
compiler/SWF9Writer.java - Defer call to runToplevelDefinitions()
until LFCApplication.stage has been defined. Add boilerplate code
for LzPreloader.as.
templates/html-response* - Add example javascript to listen for
onloadstatus and onload events for Flash apps.
source/embednew.js - Add implementation of _sendPercLoad() to send
load progress events for swf apps.
Tests: Modify html-response.xslt to do something for onloadstatus
method. Apps compiled for swf8 reliably send the
callback. compiling for swf9 with lzc fails, but running the
generated 'build.sh' will create a correct file.
Files:
A WEB-INF/lps/lfc/kernel/swf9/LzPreloader.as
M WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as
M WEB-INF/lps/lfc/lzpreloader.as
M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/SWFWriter.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java
M WEB-INF/lps/templates/html-response_jp.xslt
M WEB-INF/lps/templates/html-response.xslt
M lps/includes/source/embednew.js
Changeset:
<http://svn.openlaszlo.org/openlaszlo/patches/20081212-maxcarlson-R.tar>http://svn.openlaszlo.org/openlaszlo/patches/20081212-maxcarlson-R.tar