swfobject.getObjectById() is only to be used with static embedding. You are
doing dynamic embedding with swfobject.embedSWF().
If you need to access the object by it's id, use a normal DOM access method
like "getElementById(...)" or "all[...]", or better yet, use a framework
like jQuery that abstracts that detail away and access it via "$('#...')".
--Kyle
--------------------------------------------------
From: "marekful" <[email protected]>
Sent: Tuesday, June 16, 2009 5:26 AM
To: "SWFObject" <[email protected]>
Subject: 'unknown' type of members in object in IE
>
> Hi all,
>
> Using SWFObject.embedSWF (either with version 2.1 or 2.2) i came
> across the following IE problem:
>
> After successfully embedding the flash content, although the
> SWFObject.getObjectById returns the object in IE and other browsers
> members of the returned object are 'unknown' in IE.
>
> Please see the simplified version of the problem belos:
>
>
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
> <script src="/templates/js/swfobject.2.2.src.js" type="text/
> javascript"></script>
> </head>
>
> <body>
> <div>
> <div id="playerstat_inner" style="z-index: 100; display: block;"></
> div>
> <script type="text/javascript">
> var fa = { id: "ratings_chart" };
> var fv = { xml_file: '/templates/embed/empty_graph_data.txt' };
> var fp = { allowscriptaccess: 'always',
> allowfullscreen: 'false',
> quality: "medium",
> salign: "t",
> wmode: "opaque" };
> swfobject.embedSWF('/templates/embed/fcp-line-chart.swf',
> 'playerstat_inner', '623', '420', '6.0.0', '', fv, fp,
> fa);
>
> var testObj = function() {
> a = swfobject.getObjectById('ratings_chart');
> alert(a?'obj id: '+a.id+' | type of a member: '+typeof
> a.SetVariable:'obj is null');
> }
> </script>
> <input type="button" value=" Test " onclick="testObj();" />
> </div>
> </body>
> </html>
>
>
> I've also tested this in ff3/linux/windows and Safari4/windows with
> success.
>
> Please share any ideas,
> Cheers
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---