0 Replies Latest reply on Mar 19, 2009 3:21 PM by RA-Ross

    FLVPlayback not working in loaded SWF

    RA-Ross Level 1
      I am writing a navigation AIR app using Flash CS3, which opens selected content in a second window.

      The main navigation application (index.fla) and the target file containing the FLVPlayback component (target.swf) sit in the same directory, alongside all the accompanying files (FLVPlayback skin, the FLV file, and the auto-generated files).

      The main nav app creates a second window using the following code:

      var secondWindow:HTMLLoader = new HTMLLoader();
      secondWindow = HTMLLoader.createRootWindow(true, null, false, new Rectangle(0,0,800,660));

      I then load the content into the window using an event handler which executes the code:

      secondWindow.load(new URLRequest("app:/target.swf"));

      The requested SWF loads, and other objects (text boxes, vector graphics) appear, but neither the FLV nor the player does. If I export an HTML file along with the target.swf, and point to "app:/target.html", I get the player bar, but the progress bar gives the scrolling diagonal line animation as if it is trying to access the FLV and cannot.

      If I change the load command to point to " http://www.youtube.com", everything loads, including the videos.

      I suspect that I am running afoul of something in either the domain scripting or security model, but I can't figure out what. I have tried setting the allowScriptAccess parameter in the target.html to "always" with no improvement. The navigation app reports (Security.sandboxType) that it is in the "application" sandbox, while the target.swf reports itself in "localTrusted" both with and without the HTML file accompanying it.

      Have I missed something important?