Posts Tagged ‘externalinterface’

Adobe Flash won’t pick up the phone to MySpace’s Javascript

Thursday, June 11th, 2009

Sometimes we’ve hit a road-block when we’re trying to make Flash talk to the External Interface in our MySpace applications.

The Flash is having a great time and is more than happy to call Javascript with ExternalInterface when it wants. But when Javascript wants to chat back… beep beep. “Please leave a message”.

Flash loves Javascript Heart

Flash appears to ignore the call, and leaves Javascipt in an error state and needing ice-cream.

To help you avoid that little relationship problem here’s the fix to the problem. Add the following to your code,

System.security.allowDomain(”*.msappspace.com”);
System.security.allowDomain(”*.yourdomain.co.uk”);

Flash’s Sandbox is set to divert all calls by default and blocks any chat. However as soon as you’ve added the allowDomain. Flash shouts, “HELLO!”, and it’s all back on again.

One big happy social networking family.

MySpace application, ExternalInterface Calls & SWFObject

Tuesday, May 19th, 2009

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.


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