Flash CS3 script help...

Discussion in 'Web Design and Development' started by Poeben, Oct 19, 2007.

  1. Poeben macrumors 6502

    Jul 29, 2004
    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?

    	url = new LoadVars();
    	url.onLoad = function (success) 
    		if (success) 
    			_global.url = this.url.split("|");
    			_global.url.splice(_global.url.length - 1, 1); 
    			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);
  2. blake912 macrumors newbie

    Aug 5, 2008
    Display List

    Flash should create a textarea/link for each entry

    you need to have a function to add the text area to the display list (AS3)

    you do this by the addChild(); method. if you do a bit of research on that you should get it

Share This Page