You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

flash embed ID Created Jun 26, 2009

This thread is solved

Views: 3128     Replies: 5     Last reply Dec 28, 2010  
You must login first before you can use this feature

hunzolo

Posts: 5

Registered:
Jun 18, 2009

flash embed ID

Posted: Jun 26, 2009

Hi all!

How can I make the Flash Embed tool give an ID to the created flash object?? I don't see an option for this. The only option was to create an ID for the container but I would like the flash object itself to have one so I can add onClick and other events to it!

Jay Q

Posts: 4

Registered:
Jun 22, 2009

» flash embed ID

Posted: Jun 26, 2009

Reply to: flash embed ID, from hunzolo
You can still do what you want without assigning an ID to the flash obj itself. Assuming your container's ID is "container" and the first (or only) object element is the one you want to work with, try something like this to access it:

var myFlashObj = document.getElementById('container').getElementsByTagName('object')[0];
If you're using a library, you can use its shorthand, of course.

getElementsByTagName returns an array-like structure called a collection whereby you can access each item by its index, so if your object element were the 2nd item, you'd use [1] instead of [0].

HTH.