Skip to content

Commit

Permalink
HTML5 Post Publish fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Karl committed Aug 31, 2015
1 parent 7ff627e commit 90757b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.1.0",
"version": "1.1.1",
"private": true,
"devDependencies": {
"grunt": "^0.4.5",
Expand Down
25 changes: 6 additions & 19 deletions src/Tools/HTMLCanvasPostPublish.jsfl
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,13 @@

var content = FLfile.read(file);

try
{
var empty = function(){};

var createjs = {
Container: empty,
Bitmap: empty,
MovieClip: empty,
Shape: empty,
Sprite: empty,
Tween: empty,
Rectangle: empty,
Ease: empty
};

eval(content); // jshint ignore:line
}
catch(e)
//find the 'var lib, images, createj, ss;' line at the end of the file
var varFinder = /var (\w+), (\w+), (\w+), (\w+);$/m;
//also, the Flash 2014 'var lib, images, createj;'
var oldVarFinder = /var (\w+), (\w+), (\w+);$/m;

if(!(varFinder.exec(content) || oldVarFinder.exec(content)))
{
fl.trace("error: " + e.message);
alert("File was published improperly. Please quit Flash and try publishing again.");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/io.springroll.toolkit.mxi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name="SpringRoll Flash Toolkit"
id="io.springroll.toolkit"
requires-restart="true"
version="1.1.0">
version="1.1.1">
<author name="SpringRoll"/>
<description>
<![CDATA[Commands for Exporting, Optimizing and Publish HTML5 Canvas documents]]>
Expand Down

0 comments on commit 90757b6

Please sign in to comment.