SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Loading external swf's into a video player

    I have a number off videos that I want to play on a video player that I made using Flash.
    I can change what video the player plays by changing the filename in the red line in the following code.
    Code:
    <script language="JavaScript" type="text/javascript">
       AC_FL_RunContent(
          'codebase', 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
          'width', '1024',
          'height', '768',
          'src', 'videoplayer',
          'quality', 'high',
          'pluginspage', 'adobe.com/go/getflashplayer',
          'align', 'middle',
          'play', 'true',
          'loop', 'true',
          'scale', 'showall',
          'wmode', 'window',
          'devicefont', 'false',
          'id', 'videoplayer',
          'bgcolor', '#ffffff',
          'name', 'videoplayer',
          'menu', 'true',
          'allowFullScreen', 'false',
          'allowScriptAccess','sameDomain',
          'movie', 'videoplayer',
          'salign', '',
          'FlashVars', 'movie=filename.swf'
          ); //end AC code
    What I want the know is how to make the filename a variable so i can use the file name passed in the URL eg:"videoplayer.ht#l?f=file1.swf"
    I have being playing around
    Code:
    var queryString = getQueryString();
    if(queryString['f']){
       filename=queryString['f'];
    }
    This player is only going to be used on a local machine and not on the net.
    Any help work be appreciated'
    Thanking you
    Ken

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You will probably need to call AC_FL_RunContent() again, and pass it the new param list.
    Code:
    'FlashVars', 'movie=' + filename
    You could also modify your video player to have a setFilename() method.

  3. #3
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi crmalibu,
    Thank you for replying, could you go into a bit more detail
    of what you mean "call AC_FL_RunContent() again".
    I'm new to all this and need a helping hand.
    Also now do i test the querystring is working and where do I put it,before the AC_FL_RunContent (......) or in it.
    Like I said I need help.
    Thanks,
    ken


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
  •