I'm having some trouble with this code here. A brief rundown of what I am trying to do:
1. An ASP page outputs a string containing the contents of a directory.
2. Flash imports the string to an array
3. Flash should create a textarea/link for each entry
4. This link will ultimately control the source path of movie files
So I seem to have everything working except for the textarea part. The trace functions output what I expect them to, but i can not get it to output text areas when using variables in my for.. loop. I tried using numbers instead of variables for things like position and z-order. Any ideas?
1. An ASP page outputs a string containing the contents of a directory.
2. Flash imports the string to an array
3. Flash should create a textarea/link for each entry
4. This link will ultimately control the source path of movie files
So I seem to have everything working except for the textarea part. The trace functions output what I expect them to, but i can not get it to output text areas when using variables in my for.. loop. I tried using numbers instead of variables for things like position and z-order. Any ideas?
Code:
url = new LoadVars();
url.load("http://www.theaudiodepartment.com/demoFlash.asp");
url.onLoad = function (success)
{
if (success)
{
_global.url = this.url.split("|");
_global.url.splice(_global.url.length - 1, 1);
}
else
{
trace("Problem loading the ASP file...");
}
}
for (var i:Number = 0; i < _global.url.length; i++) {
var k:Number = (10 + i);
var c:Number = (10 * i);
var link = "link" + i;
this.createTextField(link, k, c, c, 300, 30);
link.html = false;
link.multiline = false;
link.wordWrap = true;
link.autoSize = "left";
link.text = _global.url[i];
trace (link);
trace (_global.url[i]);
trace ("layer = " + k + " coordinates = " + c);
}