SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Actionscript - LoadVars() assigning variable

    Hi im new

    looking for some help if anyone can please on this problem.

    Actionscript using LoadVars() doesnt seem to allow the variable to be assigned to the send_Score object, it becomes undefined.

    trace(score) prints out as it should be

    but when trying to pass it into the send_Score object (send_Score.myScore = score) it becomes undefined.

    Any help greatly appreciated

    Code:
                    trace(score);
    		var send_Score:LoadVars = new LoadVars();
    		
    		send_Score.myScore = score;	
    		
    		
    		var score_result:LoadVars = new LoadVars();
    			
    		
    		score_result.onLoad = function(success:Boolean) 
    		{
    			if (success) 
    			{
    				trace(this.scoreIn);
    				trace(this.scoreError);
    			} 
    			else 
    			{
    				trace("Error connecting to server.");
    			}
    		}
    		
    		send_Score.sendAndLoad("urlHere", score_result, "POST");

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's a Flash and Actionscript forum. I suggest you ask your question there.

  3. #3
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    couldnt find that must of missed it.

    Anyway problem solved, code was fine, was not exporting the movie as a flash 7 movie so was missing some library files. my silly fault.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •