简体   繁体   中英

From Flex, change the value of an Actionscript 3 property inside a Flash SWF that has been Embedded into an icon

Ok, so I've been toying with using Flash SWFs in Flex objects as icons and the like. I can embed it just fine, but I would like more control over certain flash Actionscript 3 properties WITHIN the embedded icon - for example, to change the size of the icon (icon used in two spots, one should be small, the other large).

Once I get that figgured out, I also need to apply this to a TreeListItem's folderClosedIcon. That, however, is kindof secondary at the moment.

Thank you for any attention.

The most straightforward way is to pass properties via the flashvar property on your embed. This can also be done by passing the variables through the URL this way : "my.swf?buttonSize=20" .

However if you need to communicate with the SWF after it's been loaded you can initialize a javascript-swf bridge thanks to ExternalInterface .

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