Hi guys, 1st time posting. I am having some trouble learning AS3. Here’s my case, I am trying to load an external php variable into Flash and I have no idea how to store the variable’s value properly.
In php, I have the following variables
$chance = 3;
$segment_value1 = 25;
$segment_value2 = 25;
$segment_value3 = 50;
By using the URLVariables method, I know that I can load those values into Flash, but whenever I declare it dynamically, it display me the string.
var chance:Array = new Array;
for (var i = 0;i < URLVariables.chance;i++) {
chance.push(“URLVariables.segment_value”+(i+1));
}
The result gives me chance[0]=segment_value1. The actual value I want is to make chance[0] to be 25, chance[1] to be 25, and chance[2] = 50 but my result is still strings instead. Is there a proper way to do this? Thanks
[IMG]http://board.flashkit.com/board/images/statusicon/user_offline.gif[/IMG] [[IMG]http://board.flashkit.com/board/images/buttons/quote.gif[/IMG]](http://board.flashkit.com/board/newreply.php?do=newreply&p=4279994)