简体   繁体   中英

how to export movieclip as swf?

I have a movieclip loaded I modify and show in swf loader in flash builder 4.5 project,

I want the user to be able to save the movieclip to his disk as swf is there a straight

forward way to do that?

I searched for suggestions and found this but nothing seems to work

completed the project finally thanks to the "AS3SWF" class

here is how I save my files after importing the library to my project

    import com.codeazur.as3swf.SWF;

    var swf:SWF = new SWF(mySwfMc.loaderInfo.bytes);

    var ba:ByteArray = new ByteArray();
    swf.publish(ba);

    var C:ByteArray = new ByteArray();
    C.position = 0;
    C.writeBytes(ba);
    var f:FileReference = new FileReference  ;

    f.save(C,"demo.swf");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM