Majid Laissi
Majid Laissi

Reputation: 19778

Passing parameters to swf without ExternalInterface

I'm using a simple audio player in Flex 3 that plays a given mp3 from a given url.

My swf is intended to be embeded in Facebook walls.

<meta property="og:video" 
      content="http://url/of/my/Player.swf?file=url_of_my_file" />

The player works fine, as I'm getting my parameters from the url:

http://url/of/my/Player.swf?file=url_of_my_file 

using

var _queryStringFromUrl:String = 
              ExternalInterface.call("window.location.search.substring", 1);

My problem is that when the swf is embedded in the facebook wall, the ExternalInterface is disabled, so I can't get my url variables.

Please note that the swf is not embedded in a html page.


EDIT:

It seems that youtube compiles a new swf for every video, with the parameters inside. Can someone confirm?

Thank you

Upvotes: 0

Views: 162

Answers (1)

Crabar
Crabar

Reputation: 1857

Maybe you can try to use flashvars for this problem? It initialized and passed on swf init. Parse URL-params by JS and add them to flashvars.

Upvotes: 1

Related Questions