Closed timdp closed 9 years ago
On my minify-js branch, I run the JS code through UglifyJS and then inject the minified JavaScript code directly into the AS file. This cuts the size of openvv.swc
down to 16 KB.
My build.xml
requires that uglifyjs.cmd
be in the path, so it'll only work if you are on Windows and have UglifyJS2 installed globally. If you leave out the .cmd
, it should work on OS X and Linux. Better yet, someone should create an ant task that runs UglifyJS2 directly. You could also use this public REST API.
Everything seems to work on my end. How would I go about verifying it more thoroughly? Also, once I've done so, should I create a pull request?
I've removed the Windows requirement and added a check for the uglifyjs
command. Pull request incoming.
If I wanted to include OpenVV into a pure Flash project, would I still need Flex? My initial tests seem to indicate that I need to statically link Flex's
core.swc
into my SWF.There are a few references to the
mx
package in the SWC'scatalog.xml
, which all seem related to the[Embed]
ofOVVAsset.js
inOVVAsset.as
. Consequently, would it be at all possible to bypass Flex entirely by just assigning a (ridiculously) long string toovvAssetSource
directly?I'm guessing the compiler already does a pretty good job at stripping out unused code, so the few remaining
mx
probably don't add that much to the SWF's size, but it still seems like the Flex stuff is somewhat superfluous.(By the way, why is the embedded content's MIME type
application/octet-stream
rather thanapplication/javascript
?)