0

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.

  • Is there an alternative for getting a parameter inside my swf player?

  • How does youtue handle that in the following url?

    <meta property="og:video" 
      content="http://www.youtube.com/v/dQw4w9WgXcQ?version=3&amp;autohide=1">
    

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

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

4 Comments

thank you for the answer but as stated in my question there's no html, the swf is called directly http://url/of/my/Player.swf?param=val
Unfortunately, I don'n know how can you solve this problem in another way... Maybe there are some facebook-specific methods to pass parameters to swf embedded in wall.
I found answer to similar question stackoverflow.com/questions/4163269/…. Author use flashvars and it works as I understand.
thank you very much. I had to switch to flex 4 to use FlexGlobals as suggested in the other answer (not supported in flex3). My player is now a little bit bigger but I can live with that .. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.