MySpace application, ExternalInterface Calls & SWFObject

We’ve been playing around with MySpace Application Surfaces to get Flash AS2 to talk to a Javascript Interface. It’s been a long day….

Here are our findings for any other Flash & MySpace Developers.

- ExternalInterface + SWFObject + iFrame will not work. Do not spend 4 hours refreshing your browser and re-testing. It will not work. There are also no tutorials to sort it out either.

- getURL is just plain dirty. Don’t do it.

The final solution we settled on is, don’t use SwfObject. Just have a plain Object/Embed tag. Then External Interface can talk to all the relevant parties.

Download our MySpace files (put into the Canvas Surface) and see what we’ve done.

Tags: , , , , , , , ,

One Response to “MySpace application, ExternalInterface Calls & SWFObject”

  1. Tim Wintle Says:

    Shouldn’t you be using the gadgets.flash feature to embed?

    http://wiki.opensocial.org/index.php?title=Gadgets.flash_(v0.8)

    The problem you mention is a known issue, but you can get around it:

    The important thing to include is a [unique] id on the object you are inserting (not the container you are inserting into). You do that by passing an id on the opt_params object.

    John Hjelmstad submitted a patch to Shindig (the server-side part of Opensocial) in December:
    https://issues.apache.org/jira/browse/SHINDIG-723

    It may not have been applied at MySpace yet as I think they are still running an old version (It’s up to the container – i.e. MySpace – exactly what to do – in fact I think I’ve customised our implementation here too!):

    (send me an email if you want any more info)

Leave a Reply


Thought Den is Digg proof thanks to caching by WP Super Cache