2 Replies Latest reply on May 5, 2009 4:06 PM by mschutze

    Problem with accessing AIRAliases.js from within an iFrame




      I'm having trouble with accessing the AIRAliases file from a local page loaded in an iFrame. Here is how my files are organized in my app:/ folder:



      > flv

      >> video1.flv

      > html

      >> video1.html

      > libraries

      >> AIRAliases.js

      >> AIRIntrospector.js




      So index.html has an iFrame wich loads "html/video1.html". This page has the following code:


          <script src="../libraries/AIRAliases.js"></script>



          var file = "video1.flv" //flv file to be played
          var flvFile = air.File.applicationDirectory.resolvePath("flv/"+file);
          flvFile = flvFile.nativePath; //gets the absolute path to the flv file




      Now, if I preview the index file, I get no alert and the Introspector gives me the following error: "TypeError: Undefined value"


      I read in the documentation that this error means that the javascript in the iFrame doesn't have access to the functions in the AIRAliases file, but why doesn't it, since all the files I'm using are in the app:/ folder an subfolders?


      Thanks for any help!