It's NOT a bug. A bitmap can't be assigned the attributes you want directly
and never has. It must be wrapped inside a symbol, like a MovieClip. If you
are in the Flash IDE and place a bitmap on the stage in frame one you'd
notice this immediately. So in JSFL :

 

 

// given a library of bitMaps turn them into movieClip symbols and then

// link them to "SomeClass" and export all for AS on first frame

var lib = fl.getDocumentDOM().library, dom = fl.getDocumentDOM();

var itemCount=lib.items.length, prefix="mc_", it, loopName, i;

for(i=0;i<itemCount;i++)

{

  loopName=prefix + (i + 1);

  lib.selectItem(lib.items[i].name);

  lib.addItemToDocument({x:0,y:0});

  dom.convertToSymbol("movie clip",loopName,"top left");

  dom.deleteSelection();  // keep the stage tidy

  lib.selectItem(loopName);

  it=lib.getSelectedItems()[0];

  with(it)

  {

    linkageExportForRS = false;

    linkageExportForAS = true;

    linkageClassName = "SomeClass";

    linkageExportInFirstFrame = true;

  }

}

 

JSFL isn't exactly always elegant for doing things because the original
methodology behind the Flash IDE is too closely mirrored.


Cheers,

Craig Bowman

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to