A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [MX04] Loading Text From File Using Listbox And Textara

  1. #1
    Junior Member
    Join Date
    May 2007
    Posts
    2

    [MX04] Loading Text From File Using Listbox And Textara

    Hello, I am making a website in flash and I have successfully loaded the about me page into a textarea and now I would like to be able to have it changed by clicking on an item in a listbox. Here is a function that I am working with:

    Code:
    function selPage()
    {
    
    //to get the item data
    thisText = new LoadVars();
    thisText.load("pages.txt");
    thisText.onLoad = function(success) {
    if (success) {
    		  thePage.text = thisText + navBox.getSelectedItem().data;
    	    }
    }
    }
    See that thisText + naveBox... ect.. ?

    That is where my problem is. I need it to load thisText.whatever. Here is how my pages.txt is setup:
    ]
    &webDesign=<span class="maintext">Web Design</span><br>
    <span class="subtext"><br><br>Websites...</span>
    &myFlash=<span class="maintext">Web Design</span><br>
    <span class="subtext"><br><br>Flash...</span>
    My listbox (navBox) has values and then the data would be "webDesign" and "myFlash"

    So I want thePage to equal thisText.navBox.getSelectedItem().data; I cannot do it like that, so how would I?

    Thanks

  2. #2
    Junior Member
    Join Date
    May 2007
    Posts
    2
    I figure out I could do this:

    Code:
    thePage.text = thisText;navBox.getSelectedItem().data;
    But that loaded it very wrong. Is there a way to do what I want? What other way is there to try it?

    Thanks

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