dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: dynamic text boxes

  1. #1
    ------------------ uzerfrendly's Avatar
    Join Date
    Aug 2004
    Location
    Memphis
    Posts
    196

    dynamic text boxes

    can you have two dynamic text boxes in 1 scene? i am trying to load two different texts to two different boxes and one will work but the other says undefined. i have check everything and cant figure out why it isnt working.

  2. #2
    Member
    Join Date
    Sep 2004
    Location
    Sweden
    Posts
    35
    you have pretty much how many textfields you want. Maby if you posted your code also somebody could help you.

  3. #3
    ------------------ uzerfrendly's Avatar
    Join Date
    Aug 2004
    Location
    Memphis
    Posts
    196

    not a bad idea

    //tell Flash to display special characters
    System.useCodepage=true;

    // set the text field to use HTML tags
    Field2.html=true;

    //create a new "LoadVars" object
    myLoadVar = new LoadVars ();

    //load the contents of the text file into the LoadVars object
    myLoadVar.load("home.txt");

    //check to see if the loading is completed and, if so, put the contents in the text field
    myLoadVar.onLoad = function (success){
    if (success == true) {
    Field2.htmlText=myLoadVar.myText;
    }
    }

    i got this from a tute tho so it should work just fine as long as all the variables are defined correctly and i check them things 15 times

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Field2.htmlText = this.myText;

  5. #5
    ------------------ uzerfrendly's Avatar
    Join Date
    Aug 2004
    Location
    Memphis
    Posts
    196
    i figured it out. i was naming the "myLoadVars" identifier something different. now one is identified by myLoadVars and one is myLoadVars2. see kids thats what happens when you try and learn actionscript backwards, you miss out on important points.

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