14 Replies Latest reply on Apr 18, 2007 1:13 PM by kglad

    Load variables from a perl script

    lvbao Level 1
      Basically I want to load the date of the server from a Perl script to my Flash. However it looks like the onLoad function doesn't load successfully; it always goes to the else condition. I've tried to put the Perl script & the SWF file in the same/different directory. What i am doing wrong here? Please see the scripts below:

      var externalData:LoadVars = new LoadVars();

      externalData.onLoad = function(success:Boolean):Void{
      if(success) {
      theDate.text = externalData.serverDate;
      } else {
      theDate.text = "";


      my $cYr = (localtime)[5]+1900;
      my $cMth = (localtime)[4]+1;
      my $cDay = (localtime)[3];

      my $today = "$cMth/$cDay/$cYr";

      print "&serverDate=", $today, "\n";

      Thanks in advance