Jeremy Banks
Jeremy Banks

Reputation: 129715

Determining id attribute of own Flash element from Flash

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

Answers (2)

Boyd
Boyd

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

Related Questions