1 Reply Latest reply: Dec 15, 2011 4:46 PM by Ned Murphy RSS

    relative addressing of .swf in .html

    sonsenfrancais Community Member

      I wonder if someone could help me solve a little .html addressing problem  ?

      I run a site for French speakers learning to to listen to English. Up to now I have offered .avi and .srt files to download and play on local PC

      Now, with Flash Professional I can also offer Flash video with subtitles to watch in the browser.

      I can code everything up, upload to server, embed the necessary code in an html page and it runs fine - but only as long as all the files are in the same folder

       

      Here's a link so you can see what I'm doing

       

      http://www.regardez-des-videos-en-anglais.org/December2011/FLV/Fry/Frys_Planet_Word.html

       

      However, this only works if I have all the files in the same folder on the server.  Unfortunately, when I designed the site, I decided to keep all the pages of this type in the same folder - so the .flv. swf and related files are not in the same folder as the html that calls them.

       

      I thought I could get around this by putting an absolute address in the html, as

      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="368" height="312" id="Frys_Planet_Word" align="middle">

      <param name="movie" value="http://www.regardez-des-videos-en-anglais.org/December2011/FLV/Fry/Frys_Planet_Word.swf" />

      <param name="quality" value="high" />

      <param name="bgcolor" value="#ffffff" />

      <param name="play" value="true" />

      <param name="loop" value="true" />

      <param name="wmode" value="window" />

      <param name="scale" value="showall" />

      <param name="menu" value="true" />

      <param name="devicefont" value="false" />

      <param name="salign" value="" />

      <param name="allowScriptAccess" value="sameDomain" />

      <param name="allowFullScreen" value="true" />

       

      ... but no luck... My problem is that although I can change the folder structure for new additions, retrofitting Flash Video to existing clips is going to be a nightmare if I have to swap everything round

      I am a linguist not a programmer, so would be very grateful for the expertise of the wise owls on this forum

        • 1. Re: relative addressing of .swf in .html
          Ned Murphy CommunityMVP

          When you load an swf file into an html page, the basis for targeting any files loaded by the swf is the html file's folder.  So you have to have your swf file targeting any files it loads as if it is in the html file's folder.  The swf doesn't have to be in that folder on the server, it just has to act like it is when it targets any files it loads.