gskinner.com: gBlog: FlashMX 2004 source code, news, reviews and opinions
Back to gBlog Main gskinner.com website: source code, portfolio, etc. contact Grant Skinner

Syndication
RSS 1.0
RSS 2.0


Subscribe
Enter your email address to be notified when posts are added.

Search

Resources
Conference Session Notes

Flash Blogs
Waxpraxis
Philterblog
W3Blog
Jonas Galvez
Josh Dura
Quasimondo
Flashguru
Sean Voisen
Colin Moock
Flazoom
Greg Burch
Pope De Flash
Peter Hall
Glyn Thomas
actionscript.com
Princess Pegg


Aggregators
Flog
FullAsAGoog
MXNA
Hall of Justhese


« JSFL FLA Batch Compiler | Back to Main | Linkage ID Standards »

August 19, 2004


IMPORTANT NOTE: This is an old archive. It is only here to support outdated external links. To view the updated version of this archive, please go to the blog index, and search for the title of this document using the search form.

JSFL FLA Batch Compiler: Updated
Posted by Grant

I've just updated my JSFL batch compiler. It will now also output any compiling errors to the log file (though it can't detect them outright, so the error message might not show if your only errors are compiling errors generated by Flash). Thanks to Keith Peters (bit101) for the heads up on outputPanel.save()!

I also made the logging a little easier to read, and fixed the title on the file selection dialog, just special for Stacey (aka BitchWhoCodes).

You can download the latest by clicking here. Documentation is here.

Sample log:
Running compile on 3 files at: _____/flash/compileProject/

---------------------------------------------------------------------------
Compiling core.fla
---------------------------------------------------------------------------
>> ERROR: Could not set publish profile (testProfile): core.fla

Compiled core.fla successfully.
Moved core.swf to swfs/core.swf successfully.

---------------------------------------------------------------------------
Compiling assets/asset1.fla
---------------------------------------------------------------------------

Compiled assets/asset1.fla successfully.
Moved assets/asset1.swf to swfs/assets/one.swf successfully.

---------------------------------------------------------------------------
Compiling assets/asset2.fla
---------------------------------------------------------------------------
**Error** Symbol=brokenLinkage, layer=Layer 1, frame=1:Line 1: The class 'MissingClass' could not be loaded.

Total ActionScript Errors: 1 Reported Errors: 1


Compiled assets/asset2.fla successfully.
Moved assets/asset2.swf to swfs/assets/two.swf successfully.


PS. Post number 100, in just under 1 year. Yay! :)

Posted @ 12:04 PM by Grant | TrackBack


Comments

Cool script Grant =)!

Just one question...Iīm not sure, but shouldnīt this line

if (schemaURI.substr(schemaURI.length-5) == ".txt") {...}

be

if (schemaURI.substr(schemaURI.length-4) != ".txt") {...} ?

Posted by: ripcurlx at August 20, 2004 02:00 AM

Cool Script Grant!

I think itīs time for me to read in a little bit in JSFL - looks pretty useful..=)
Just one question:

Shouldnīt this line

if (schemaURI.substr(schemaURI.length-5) == ".txt") { alert(">> ERROR: Selected schema is not a .txt file."); return; }

be

if (schemaURI.substr(schemaURI.length-4) != ".txt") { alert(">> ERROR: Selected schema is not a .txt file."); return; }

greez
a
ripcurlx

Posted by: ripcurlx at August 20, 2004 02:10 AM

good catch - fixed and uploaded again.

Cheers.

Posted by: Grant Skinner at August 20, 2004 03:02 PM

you tha man!
but your documentation link above is 404

Posted by: Gianni at August 20, 2004 10:50 PM

Whoops... fixed the link.

Posted by: Grant Skinner at August 21, 2004 01:37 AM

A made a little enhancement, but actually itīs just for windows user:

If the folder, which are specified donīt exit they are created.

...
function move(p_file,p_newName,p_fileName) {
// delete old already compiled swf:
FLfile.remove(p_newName);
var ok = checkDirectories(p_newName);
...

function checkDirectories(filePath) {
// check the first characters containing partition information
var part = filePath.substr(0,10);
// if partition doesnīt exists
if(!FLfile.exists(part)) {
appendToLog(">> ERROR: partition ("+part+") doesnīt exist.");
return false
}
//seperate directories
var arr = filePath.split("/");
var l = arr.length-1;
for(i=4;i> ERROR: created directory ("+part+") because it doesnīt exist.");
FLfile.createFolder(part);
}
}
return true;
}

greez

Posted by: ripcurlx at August 24, 2004 02:32 AM


Hosting by NetKeepers.ca | Powered by Movable Type 2.661
The text content of this blog is licensed under a Creative Commons License. Graphics are ©2003 Grant Skinner.