I have a Flash application written in ActionScript 3 embedded in a web page using SWFObject 2.0. After it has been loaded, the Flash application will be running in an <object>
or <embed>
tag with an id
attribute.
How can I determine the value of the id
attribute of the element from inside the Flash application?
You can use the objectID
property of the flash.external.ExternalInterface
class.
you can use SWFObject to pass a var into the flash to tell it what the ID is when you load it.
swfobject.embedSWF('application.swf', '100%', '100%', null, {'id': '_id_goes_here_'}, null);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With