2 Replies Latest reply on Jul 28, 2008 12:34 PM by ntsiii

    Embedding SWF and accesing functions

    thewarpedcoder
      Hi

      I am using the JW player SWF via the SWFLoader to play video clips. The player control bar works great but I need to actually stop the player when the screen changes.

      public var tmpBAsset:SWFLoader;

      var theFile:String = "assets/movies/" + questionAsset;

      var confInfo:Object = "?config=configFiles/playerConfig.xml";
      confInfo += "&file="+theFile;
      confInfo += "&fullscreen=false";
      confInfo += "&allowscriptaccess=always";

      tmpBAsset = new SWFLoader();

      tmpBAsset.source = "com/thirdPartyPlugins/player.swf"+confInfo;
      tmpBAsset.id = "tmpVideo";
      tmpBAsset.x = 1;
      tmpBAsset.y = 10;
      tmpBAsset.height = 151;
      tmpBAsset.width = 145;

      tmpBCan.addChild(tmpBAsset);

      Is the code used to add the player.

      But although the player has a public function called sendEvent I cannot seem to access it.

      I do this in the function when the player is being used and after the next page click event.

      var tmpOB:Object = tmpBAsset.content;

      which enables me to tmpOB.player and show the player object. If i then add the sendEvent function I get an error, sendEvent is not a function.

      Hopefully somebody can help

      Thanks