5 Replies Latest reply on Oct 27, 2009 4:23 PM by Ron Colmen

    Make it happen automatically when the page loads

    Ron Colmen Level 2

      I need to make things happen automatically when the page loads. Basically here my_btn (on frame 1) is used to send data to the server. I need it to happen automatically when the page opens in the browser. Here's my curent code - not working! . is there a better way??

       

      myFunction = function(){
          trace( );
      var fin = "fin";
      XMLParser.load("test.php?fin="+fin, onFinish);
      };

      function onFinish($success:Boolean, $results:Object, $xml:XML):Void {
        if ($success) {

       

      //other actions here

      //at the end

       

      myFunction();