ERROR Retrieving Flash URL Variables

Hello, I am working on a flash movie for a client and I have not used flash much before at all.
Reading many tutorials online I have come up with the following two files.

I have the object/embed code here below with the following src path sos.swf?wID=5.
I need that wID so when I load certain variables from a php page later on in the movie I can access that persons information (wID correspons to the primary table key).

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="383" HEIGHT="180" id="myMovieName"><PARAM NAME=movie VALUE="sos.swf?wID=5"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="sos.swf?wID=5" quality=high bgcolor=#FFFFFF WIDTH="383" HEIGHT="180"
NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>

I then have the following actionscript in my flash movie


var widgetID = _root.wID;

/* first create a new instance of the LoadVars object */ 
myVars = new LoadVars(); 
// call the load method to load my php page 
trace(widgetID);
myVars.load("sos.php?wID=" + widgetID);
// once vars have been loaded, we will have these variables:

var var_firstname = myVars.firstname;    // "pietro"
var var_years = myVars.years;    // "lana"
var var_months = myVars.months;   // "pietro@flash-php.it"
var var_days = myVars.days;
var var_minutes = myVars.minutes;

days.text = var_days;
years.text = var_years;
firstname.text = var_firstname;
months.text = var_months;
minutes.text = var_minutes;

I have tried several things and I am not sure just how to access the flash URL variables. To make sure I am putting the action script in the right place I have only one layer, and when I click on that, I enter the actionscript in the actionscript window for that layer. Is that the correct place to put it? I am pretty sure it is but I just want to double check.

The variables.text at the bottom are my dynamic text boxes that are displaying information from the sos.php file.

Nothing is showing up in my movie and I am unaware of good debugging techniques for actionscript. I have tried to trace(widgetID); but nothing shows up in my movie. I am not sure if that is because of the image I have on the screen or what.

Any help to get the URL variable into my movie and then to correctly pass it to my php file would be most helpful. I have hit a brick wall at this point.

By the way here is the part in my php script that sends the variables over. They do have data in them but nothing is being displayed in the dynamic text boxes.


$vars = "&firstname=".$name."&years=".$totalYears."&months=".$totalMonths."&days=".$totalDays."&minutes=".$totalMinutes."&meals=".$var_meals."&meetings=".$var_meetings."&movies=".$var_movies;
echo $vars;

Thanks again for anyone who can try to help me out.
I really appreciate it.