Results 1 to 3 of 3
  1. #1

    Unhappy Possible to use XML config file for FlashVars?

    Is it possible to define the flashvars in an external XML file, and then pass the name of this file in the URL

    http://testserver.com/mcaltplayer.sw...g=myconfig.xml

    where myconfig.xml contains something like following:

    <?xml version="1.0" encoding="UTF-8"?>
    <flash>
    <flashVars>
    <fpFileURL>http://www.mcmediaplayer.com/red5/iss-exp13.flv</fpFileURL>
    <playerBackgroundColor>000000</playerBackgroundColor>
    <fpButtonOpacity>0</fpButtonOpacity>
    <cpPosition>0x0</cpPosition>
    <cpPlayBtnPosition>435x20</cpPlayBtnPosition>
    <cpStopBtnPosition>455x20</cpStopBtnPosition>
    <cpVolumeBtnPosition>50x-20</cpVolumeBtnPosition>
    <cpScrubberPosition>324x8</cpScrubberPosition>
    <cpCounterPosition>425x4</cpCounterPosition>
    <cpRepeatBtnPosition>438x-30</cpRepeatBtnPosition>
    <cpFullscreenBtnPosition>455x-30</cpFullscreenBtnPosition>
    <cpInfoBtnPosition>470x-30</cpInfoBtnPosition>
    <cpHidePanel>never</cpHidePanel>
    </flashVars>
    </flash>

    Why would I want to do this? I'm currently using a SWF menu that allows me to call SWFs, and it asks for a URL... it doesn't give me the option to specify flashvar parameters to the target SWF however : ( Maybe I'm missing something?

    ?

  2. #2
    Administrator Dave's Avatar
    Join Date
    Sep 2004
    Location
    Te Awamutu, New Zealand
    Posts
    3,959
    Blog Entries
    79
    I don't yet have a way to do this the way you've asked, but here's another thought... you could pass the parameters as query strings in the URL, e.g.:

    mcmp_0.8.swf?playerBackgroundColor=000000&fpButtonOpacity=0 .. etc

    This would make for a long URL but other than that I think it should work.
    Dave Owen
    MediaCollege.com

  3. #3
    All is possible, if you make a js bridge between dave's world and your xml's world using sarissa js api(so this works in all browsers) to parse your xml and build the parameters required by the player when your html page is loaded. Dave beware of one thing..& has to be escaped as html entities and replaced by &amp; in the url. If you don't do so your player will fails.
    Last edited by actarus; 20th Jan 2011 at 23:16.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Subscribe to us on YouTube