Well, a class is not unique, so how were you thinking to target an
individual element / swf on the page? We need a unique DOM id for doing
things like ExternalInterface calls to/from the swf file, and being able to
target removing alternate content etc.
Also how is it that ids cannot be fully trusted? The whole DOM thing kinda
relies on the fact that it does work :)
RE: Generating id's / elements:
// client side
var div = jQuery('<div>Some text</div>').addClass('foo').attr('id', 'bar');
div.appendTo(document.body);
// or use a serverside language like php.
it is really not very hard...
SWFObject is open source, so if you feel you want to make a mod to suit your
own needs.
Aran
On Thu, Aug 27, 2009 at 10:00 AM, Perrin4869 <[email protected]>wrote:
>
> Hello, I've been using SWFObject for my Flash embedding needs.
> Now, I think that the registering method is a bit flawed. If I wanted
> to automatize the registering process, or even register dynamically
> generated items, having to pass an ID is disadvantageous. Generating
> an ID for each element is a tedious work, and you can never fully
> trust it.
>
> Now, what I'd like to accomplish is to register the flash elements
> based on a class given to them. I'd like to do something like this:
>
> var flashElements = document.getElementsByClassName("flash");
> var flashElementsCount = flashElements.length;
> var i;
> for(i = 0; i < flashElementsCount; i++)
> {
> swfobject.registerObject(flashElements[i], "9.0.0");
> }
>
> Is there a way with the current version of SWFObject to accomplish
> what I'm trying to achieve? If not, what are the chances of getting
> support for it in subsequent versions?
>
> Thanks for the help!
> Perrin4869.
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---