DCSIMG
Compile all the FLA file in Directory and its sub Directory - Shvilam B2B Mobile Apps

Shvilam B2B Mobile Apps

עמית כמו חבר שביל כמו דרך B2B Android mobile App shvilam@gmail.com

על הבלוג

Shvilam

Flashoo - Official Adobe Flash Platform Developer Community and User Group in Israel

קראתי לאחרונה

עוד מקומות בהם השארתי חותם

תעשיה אחרת

Games

Contact Me

Side work

Compile all the FLA file in Directory and its sub Directory

Toady i spent few hour improving our install process and I look for a way to compile all the swf file in Directory and its sub Directory in the working environment

it was quite easy just a few lines of jsfl

/*
* this file will loop recursively throw all the file and folder in the path 
* and publish all the fla i thus directory
*/


var devPath ="file:///E:/WORK/Dev/trunk/"
    
folderRecorsive(devPath);


/*
* loop throw all the folder a
* for each folder call publishFlieInFolder
*/

function folderRecorsive(pathFolder)
{
   
var folderNames=FLfile.listFolder(pathFolder,"directories")

   
for(var i=0;folderNames.length;i++) 
   
{
       
if(folderNames[i] == undefined) 
       
{
           
break; 
       
}
        
       
if(folderNames[i].indexOf("svn") != -1 ||
          
folderNames[i].indexOf(".metadata") != -1)
       
{
            
       
}
       
else
       
{
           
var newFolderPath = pathFolder+"/"+folderNames[i]
           
publishFlieInFolder(newFolderPath)
           
folderRecorsive(newFolderPath )     
       
} 
      
}
}

/*
* select all the FLA in the give folder 
* for each one of them call  publishFile
*/

function publishFlieInFolder(folderPath)
{
   
var files = FLfile.listFolder(folderPath+"/*.fla","files")
   
for(var i=0;files.length;i++)  

    {
       
if(files[i] == undefined)  
       
{
           
break;
       
} 2071998420_6d4bdfeecd
       
var flaPath = folderPath+"/"+files[i] 
       
publishFile(flaPath);
        
   
}
    
}
/*
* publish a fla file and close the document 
*/

function publishFile(filePath)
{
   
fl.openDocument(filePath,true);
   
fl.getDocumentDOM().publish();
   
fl.closeDocument(fl.documents[0], false);

 


}

and few line in the ant install file

<property name="test.jsfl" value="E:\WORK\Dev\trunk\Server\FlashPublish.jsfl"/>
<
property name="flash" value="C:\Program Files\Adobe\Adobe Flash CS3\flash.exe"/>
<
target name="CompileFlash"> 
    
<exec executable="${flash}"> 
           
<arg line="'${test.jsfl}'" />
    </
exec>
</target>

About the picture and now like riding a bicycle with no hands

it will do the work for you.

 

 

 

 

 

 

 

 Willow Road Panda [the photographer]   

 

 

 

תוכן התגובה

Shvilam ( virtual world builder ) in Mogobe.com כתב/ה:

when we start working on Mogobe I worte a small JSFL script. that script loop throw all of my project

# January 20, 2010 8:53 AM
שלח תגובה

(שדה חובה)  

(שדה חובה)  

(אופציונלי)

(שדה חובה) 

Please add 1 and 5 and type the answer here:


Enter the numbers above: