Hi Jobe,

I hope this helps.  

The jsfl script below publishes a given fla based on it's publish
settings.  File paths can be relative from the location of the .jsfl
file. See FLFile.listFolder in the Adobe docs for how to handle
directories.

JB Tellez
Sr. Software Engineer
Scientific Learning Corporation
[EMAIL PROTECTED]


function publish(filename) 
{
        
        var fla = "file:///" + filename;
        
        fl.trace(fla);
        
        if (FLfile.exists(fla)) 
        {
                var doc = fl.openDocument(fla);
                
                doc.publish();
                
                doc.close();
                
        } else {
        
                fl.trace("File not found - " + fla);
        }
        
}

function main() 
{
        publish("../src/fla/Some.fla");
        
        fl.trace("all done");
                
}
//----------------------------------------------------------------------
-----
// PROGRAM ENTRY POINT

// clear output panel
fl.outputPanel.clear();

main();

------------------------------

Message: 19
Date: Wed, 21 Mar 2007 12:52:42 -0400
From: "Jobe Makar" <[EMAIL PROTECTED]>
Subject: [Flashcoders] Flash extension question
To: <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
        reply-type=response

Hi guys,

I'm writing a JSFL file that does some SWF exporting based on the FLA in

focus. The exportSWF() method takes an absolute path. Is there a way to
get 
a path to the current FLA or the directory that holds the FLA? Its kind
of 
annoying to have to manually enter that path for each FLA I'm dealing
with.

Thanks

Jobe Makar
http://www.electrotank.com
http://www.electro-server.com
phone: 252-627-8026
mobile: 919-609-0408
fax: 919-341-8104 

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to