0 Replies Latest reply on Feb 4, 2009 7:18 PM by skaiwayne2

    Load and Play Remote SwF?

    skaiwayne2
      Hello everyone,
      I'm trying to create a flash player that uses LoadVars to get variables from a php file. The variables are a list of swf files. I am able to get the variables but when I launch it no swf's play. Here is what I am using:

      //Create LoadVars object and instantiate variables upon a successful Load ************************************************** **************

      dataObj = new LoadVars();
      dataObj.onLoad = function(success) {
      if (success) {
      var ads = dataObj.ads
      var siteUrl = dataObj.siteurl
      var myAdUrl = siteUrl + ads

      //************* Create and Array and split Ads from the comma into the Array ************************************************** *

      var myAds:Array = ads.split(",");

      //************************************************** **************

      /*for (var i = 0; i<myAds.length; i++) {
      trace(siteUrl + myAds );}*/


      //trace( myAds.length)

      function nextMovie()
      {
      for (var i = 0; i<myAds.length; i++) {

      trace(myAds.length)
      loadMovieNum(myAds
      , 1);
      this.onEnterFrame = function()
      {
      if(_level1._currentframe >= _level1._totalframes && _level1._totalframes > 1){
      this.onEnterFrame = undefined;
      this.nextMovie();
      }
      };
      } else {
      unloadMovieNum(1);*/
      }
      }
      nextMovie();
      _root.gotoAndPlay(1);
      }

      //}

      };
      // calls your php page this will load any variables onto the dataObj

      dataObj.load(" http://www.xxx.com/test/lv.php");

      stop();