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

有帮助吗?

解决方案

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

其他提示

fl.getDocumentDOM().selection[0].libraryItem.name
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top