0 Replies Latest reply on Mar 15, 2013 9:16 AM by mandar vedak

    How to set session

    mandar vedak Level 1

      How can I set/create a "Session" in flash AS2.

      for example, I want click on a button, then an action will fire. This action will set an session and will save a score like a (for example 3000 points).

      Then I wanna use this session(string) in php.

      How can I do that?


      onEnterFrame = function () {


      delete showTime;




      var myVars:LoadVars = new LoadVars();


      myVars.playerName = "your";

      myVars.playerScore = score;


      myVars.send("score-board.php", "_parent", "POST");

      SessionVar.set("Score", "playerScore"); // this is right for create session in as2



      or in php ==============================

      echo($_POST['playerName'] . "'s score: " . $_POST['playerScore'] . " points.");