SWFObject 2 and SWFAddress
There seems to be an issue when using SWFObject 2 with SWFAddress; If a movie id is not specified through the optional “attributes” param in the embedSWF method -
swfobject.embedSWF( “main.swf”, “flashcontent”, “700″, “400″, “9″ )
, SWFAddress fails to initialise and generates an error:
B8? is undefined
G()()
swfaddress.js (line 8 ) index2.html()() (line 38) on this error?
if(typeof com==”undefined”){var com={}}i…E]==”id”){SWFAddress.addId(B[E+1])}}}}};
Once I changed it to the following, it worked perfectly:
swfobject.embedSWF( “main.swf”, “flashcontent”, “700″, “400″, “9″, null, {}, {}, {id: ‘main’} );
The docs for SWFAddress doesn’t specify that the ID attribute is required either.
I spent a few hours trying to figure out what I was doing wrong so hopefully this will help someone else to not do the same.
Comments
3 Responses to “SWFObject 2 and SWFAddress”
Leave a Reply

Saved me a lot of time
Thank you for figuring this out
Adding that “id” parameter was necessary also to make SWFFIT work here