[ascoders] Re: JSFL: linkageIdentifier bricht Schleife ohne Fehlermeldung ab

  • From: Ralf Bokelberg <actionscript@xxxxxxxxxxxx>
  • To: ascoders@xxxxxxxxxxxxx
  • Date: Mon, 13 Sep 2004 01:20:45 +0200

So gehts:

[code]
function exportSound( libItem, outputPath){
var name = libItem.name;
//
libItem.linkageExportForAS = true;
libItem.linkageExportInFirstFrame = true;
libItem.linkageIdentifier = name;
//
var filename = outputPath + name.substr(0, name.toLowerCase().lastIndexOf(".wav"));
fl.trace("export: " + [name, filename]);
//
doc.exportSWF( filename, true);
libItem.linkageExportForAS = false;
}


function exportAllSounds( outputPath){
        var doc = fl.getDocumentDOM();
        var libItems = doc.library.items;
        fl.trace("exportAllSounds: convert " + libItems.length + " items.");
        //
        for (var i = 0; i<libItems.length; i++) {
                if( libItems[i].itemType == "sound"){
                        exportSound( libItems[i], outputPath);
                }
        }
        fl.trace("exportAllSounds: ready ");
}

function main(){
var outputPath = "file:///C|/Dokumente und Einstellungen/bokel/Eigene Dateien/workspace/flash/ellipsis/testSoundExport/";
exportAllSounds( outputPath);
}


main();
[/code]

mfg. r

------------------------------------------------------
Archiv   : //www.freelists.org/archives/ascoders/
Optionen : //www.freelists.org/list/ascoders
------------------------------------------------------

Other related posts: