Reputation: 129715
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?
Upvotes: 6
Views: 336
Reputation: 1067
You can use the objectID
property of the flash.external.ExternalInterface
class.
Upvotes: 8
Reputation: 1165
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);
Upvotes: 1