Pergunta

I want to be able to select a item (image, movieclip etc) that has been added to the stage in Flash and access its file name.

So if I drag a image called 'imageOne.png' onto the stage, I want to be able to access its name, 'imageOne.png', and pass it to a Extension for Flash that I'm building.

I know I can get details from the library, but not from the items selected on the stage.

Can anyone tell me how to access this information using JSFL.

Thanks

Stephen

Foi útil?

Solução

You can select a library item with the following method :

fl.getDocumentDOM().library.selectItem('name')

After selecting a library, it's possible to access pretty much everything you need.

Also, more about what's available to you in JSFL : http://help.adobe.com/en_US/flash/cs/extend/WS5b3ccc516d4fbf351e63e3d118a9024f3f-7ff8CS5.html

Outras dicas

fl.getDocumentDOM().selection[0].libraryItem.name
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top