I have an client application that sends data back from RED5 but i can't seem to set these values returned from RED5 in my TextFields:
The values i can see when i trace the returned values 3 parameters are returned:
1 United_Kingdom 1
tt is the variable that contains the movie clip which is imported correctly. getBroadcastXY is the function that gets called when RED5 sends back the response.
getBroadcastXY does get called because the console does output the data.
Just don't understand why the tt.txt_ct and tt.txt_yt never gets set. If i hard code these values they do set but not when i dynamically set them.
The datatypes are when sent from RED5 x (is of type long) , country (is of type string), y (is of type long)
In the switch statement the country does go through the right case statement.
Action-script
public function getBroadcastXY(ct:Object, country:Object, yt:Object){
var x:int = Number(ct);
var y:int = Number(yt);
switch(country.toString())
{
case "United_Kingdom":
//trace("hello1234");
setXY(x, y);
break;
case 'USA':
setXY(x, y);
break;
}
trace(ct.toString() + " " + country.toString() + " " + yt.toString());
}
private function setXY(ct:int, yt:int){
tt.txt_ct.text = ct.toString();
tt.txt_yt.text = yt.toString();
}