3 Replies Latest reply on Apr 30, 2011 6:42 AM by InnoRex

    Set baseUrl for IDE-Player

    InnoRex

      Dear Friends,

       

      in all flash movies, which are loaded from a main flash movie, absolute urls are used without a domain (/test1/test2.png).

       

      This makes sense and is required because the main flash movie and with it the whole flash presentation is embedded on a html page and published online.

      The player used by the browser takes this into account and automatically completes the domain as intended.

       

      Now I want to test the flash movie directly in IDE to debug / profile / etc.

      But now there doesn't exist any baseURL anymore because the IDE-Player doesn't load a flash movie embedded in an html-page, instead it uses the path of the folder in which the movie resides.

       

      Now I would like to know if it would be possible to change the baseURL for the IDE-Player.

       

      Thank you for your answer in advance!

      With best regards

      Inno

        • 1. Re: Set baseUrl for IDE-Player
          Ned Murphy Adobe Community Professional & MVP

          Hopefully I'm not missing the target.... urls written in the form you showed are not absolute, they are relative.  An absolute address includes the entire path information including the http:// portion of the address, and can sometimes be more reliable to use.

           

          When you load an swf into a web page, the web page's folder becomes the loading reference for how the swf needs to target any files it loads.  If you were to have the swf in the same folder as the html page, then ou would not need to adjust any file targeting.  It is only when you store the swf in a different folder on the server than where the html page is that you need to adjust the targeting of files loaded by the swf.

           

          One way to be able to work between the two different environments (online versus the IDE) using relative urls is to include a variable in all your url targeting that you adjust depending on where the file is being played.

           

           

          var imgPath = "test1/"; // change to "" when testing in the IDE, for example

           

          var url = imgPath + "test2.png";

          1 person found this helpful
          • 2. Re: Set baseUrl for IDE-Player
            InnoRex Level 1

            Thank you for your answer.

             

            The flash movie also uses external classes / components which rely directly on absolute urls.

            Here I cannot use an extra variable which is then prepended to the urls.

            So the best way would be to change the baseUrl of the current movie.

             

            With best regards

            Inno

            • 3. Re: Set baseUrl for IDE-Player
              Ned Murphy Adobe Community Professional & MVP

              Any classes/components the swf file uses are not needed for the server.  If you are loading them to the server it is unnecessary.  They only matter when creating an swf.  All the code/information they contain is absorbed into the swf when you publish.