4 Replies Latest reply on Jul 29, 2010 7:09 AM by zeroskillz

    HtmlLoader and local content problems

    zeroskillz Level 3

      I'm having trouble with the HtmlLoader class and loading/displaying local content that contains flash files.


      As example, I load a local page with a flash video player and no video, but it's ffine if the file isn't local. Or a page with a flash google map, same thing, fine from web, nothing from local...


      Is there some method to allow this stuff?



      Thanks in advance!


        • 1. Re: HtmlLoader and local content problems
          thilgen Level 4

          Was the SWF your HTMLLoader is loading published with the "Access network only" Local Playback Security option:




          General discussion with focus on Flash Professional:





          Ways to set this option when using Flex/FlashBuilder:



          Note: Use the custom compiler option, use-network=false, if you want to override the Flex Builder default compiler option. This would change the settings to local-with-filesystem




          Chris Thilgen

          AIR Engineering


          1 person found this helpful
          • 2. Re: HtmlLoader and local content problems
            zeroskillz Level 3

            No, but since you mentioned it, I tried it both ways...

            Doesn't seem to have any effect.

            As an example, I simply dragged an instance of the FLV component onto stage, set the source to a local file and published both ways. Loaded an html page with each and just get the skin, the vid never loads.

            Any thoughts?

            This is the code I'm testing with:

            var html:HTMLLoader = new HTMLLoader();

            html.width = 1600;

            html.height = 900;

            var urlReq:URLRequest = new URLRequest("flvtest.html");




            Edited to add: If it's a matter of setting the local folders permissions or something, I can do that. This is for a kiosk app, so I have complete control over the 'client' computer...


            Edited further to add:

            I'm posting this in case someone runs into a similar problem and has the big 'DOH' moment I just had...


            The problem turned out to be using a relative path to load the video. My video URL was set to "vids/vid7.flv".

            Changing it to "C:/Program Files/myApplication/vids/vid7.flv" fixed the problem. Where this really got me was that I tried images loaded the same way without issue, so in my head there wasn't a relative path problem. Live and learn...


            Thanks for your help!


            Message was edited by: zeroskillz

            • 3. Re: HtmlLoader and local content problems
              zeroskillz Level 3

              Also, just in case, here is the html page code:


              <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
              <body>FLV-Air Test<br>
                  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"


                  <param name="allowScriptAccess" value="always" />
                  <param name="allowFullScreen" value="true" />
                  <param name="allowNetworking" value="all" />
                  <param name="movie" value="flvtest.swf" />
                  <param name="quality" value="high" />
                  <param name="bgcolor" value="#333333"/>   

              • 4. Re: HtmlLoader and local content problems
                zeroskillz Level 3

                The problem turned out to be using a relative path for the video uri. Oddly, relative paths worked fine for images, so that threw me off.