0 Replies Latest reply on Apr 8, 2010 5:00 AM by bugreport22

    Event Listener dont fire with Browser start

    bugreport22 Level 1

      Hello,

       

      Im working with SWFs for my Player. Im creating dynamic content with the Flash Builder and Flex SDK.

       

      My Problem is, when Im loading a flex generated SWF the Event Listener dont fire when I start the Player in the Browser. If i start the browser with only the flash player it starts.

       

      This is my code which i modified in the SWFElement Class. This is important for Flex SWFs.

       

              override protected function processReadyState():void
              {
                  var loaderLoadTrait:LoaderLoadTrait = getTrait(MediaTraitType.LOAD) as LoaderLoadTrait;
                  if(loaderLoadTrait.loader.content.hasOwnProperty("application") && Object(loaderLoadTrait.loader.content).application == null){
                      Object(loaderLoadTrait.loader.content).addEventListener("applicationComplete",finishProce ssLoadedState);
                     
                  }
                 
              }
              private function finishProcessLoadedState(event:Event):void
              {
                  var loaderLoadTrait:LoaderLoadTrait = getTrait(MediaTraitType.LOAD) as LoaderLoadTrait;
                  addTrait(MediaTraitType.DISPLAY_OBJECT, LoaderUtils.createDisplayObjectTrait(loaderLoadTrait.loader, this));
              }

       

      When I load the player with the browser: http://localhost/myplayer.html

      The applicationComplete is never fired.

       

      When I type this to the Browser: C:\xampp\htdocs\myplayer.html

       

      it works fine.

       

      What can be the problem, why the SWF Element dont fire the applicationComplete Handler on calling the player on the web server