A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: Client Control

Hybrid View

  1. #1
    Senior Member
    Join Date
    Mar 2004
    Location
    Upper Marlboro, MD
    Posts
    146
    Hi Bret,
    I've been trying for a week now to get the data from my text file loaded into my dynamic text box and to scroll. I can't get it to work. Can you please tell me what I'm doing wrong ... I give up. Here's what I have:

    Code:
    content=new LoadVars();
    
    content.onData=function(welcome){
     text.setContent(0,welcome,1,2);
    }
    
    content.load("welcome.txt")
    
    myArray=welcome.split("\n");
    
    function showWelcome() {
    welcome.text=""
     if(count >= maxCount) {
     clearInterval(intervalId);
     } 
     for (x=count;x<=count+10;x++){
     	welcome.text+=myArray[x];
     }
     count++
    }
    
    maxCount=myArray.length
    intervalId = setInterval(this, "showWelcome", 1000);

  2. #2
    Senior Member
    Join Date
    Mar 2004
    Location
    Upper Marlboro, MD
    Posts
    146

    Load Vars help

    Can anyone help me ... this is driving me crazy. I've searched through several pages on the forum for how to use the LoadVars to import a text file and I can't seem to get my function to work. I don't know what I'm doing wrong. I have a text file (welcome.txt) that simply reads: My name is talytech. On frame 2 of my KoolMoves movie I have a dynamic text box named welcome and the variable name is welcome. I put the following AS code on frame 2:

    Code:
    content=new LoadVars();
    
    content.onData=function(welcome){
     this.welcome.setContent(0,welcome,1,2);
    }
    
    content.load("welcome.txt");
    that code returns the following in my dynamic text box: _level0.welcome

    I can't figure it out. Why won't it display what's in my text file? Please somebody help me ... I'm running out of time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center