0 Replies Latest reply on Aug 18, 2010 8:58 AM by dcahan1

    Stage Loads on top of Video until Click

    dcahan1

      We have an AIR application.  Inside the AIR app, we are loading a swf file.  The swf file establishes a parent-child relationship between itself and the AIR app.  We then call a function in the AIR app (from the swf) which goes out to a web service and gets a list of flv videos to play.  Each video url is pushed back into the swf to be played with FLVPlayback. 

       

      The problem is that the stage in the SWF always puts itself in front of the video until we click on it.  From that point forward everything works correctly.  We've tried every single thing we can think of to tell the video to be on top, but again, until we click on the active window it stays in the background.

       

      Here's our SWF code:

       

      import fl.video.VideoState;

      import fl.video.VideoEvent;

      import fl.video.FLVPlayback;

      import fl.video.VideoScaleMode;

       

      var Parent:Object;

      var Param:Object;

       

      function set passParent(p:Object):void

      {

      Parent = p;

      Parent.passChild(this);

      }

       

      function passParameters(param:Object):void

      {

      Param = param;

      }

       

      function init():void

      {

      player.addEventListener(Event.COMPLETE, fadeout);

      player.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, fadeIn);

      player.addEventListener(VideoEvent.STATE_CHANGE, Parent.videoManager.stateChange);

       

      Parent.videoManager.getVideos( loadVideo,

      Param.Provider,

      Param.Categories,

      Param.DownloadUrl,

      Param.ExtensionWildcards,

      Param.HoursStale,

      Param.NumberToReturn,

      Param.SortBy,

      Param.LoadAttempts);

      }

       

      function loadVideo(videoUrl:String):void

      {

      player.play(videoUrl);

      }

       

      function fadeout(e:Event)

      {

      fadeEffect.gotoAndPlay(16);

      }

      function fadeIn(e:Event)

      {

      fadeEffect.gotoAndPlay(2);

      }