A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Dynamic Text

  1. #1
    Member
    Join Date
    Apr 2002
    Posts
    59

    Dynamic Text

    Hi, I would like to be able to put links in my text when I import it dynamicaly I have the html box checked but it seems whenever I view the movie it views all the text with the html commands and all what is the problem? ur help will be very much appreciated.

  2. #2
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    Make sure that the text is passed to the textfield using the htmlText-property not the text-property.

    Code:
    textfieldInstance.htmlText = variableFromFile;
    /Mirandir

  3. #3
    Member
    Join Date
    Apr 2002
    Posts
    59
    where do i put that action script?

  4. #4
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    Well how do you import the text into your movie? And how is it connected to the textfield? Using a variable or an instance?

    Here is an example using a textfield with an instance name of myText and using LoadVars object to load the variables in. Both the textfield and the loadvars object are on the same timeline. if not you must specify the path to the textfield using dot notation in the onLoad event handler for myVars.

    Code:
    var myVars = new LoadVars();
    
    myVars.onLoad = function(success)
    {
        if(success)
        {
            myText.htmlText = this.myText;
        } else
        {
            trace("loading failed")
        }
    }
    
    myVars.load("myTextFile.txt");
    The myTextFile textfile looks like this:
    Code:
    &myText=< a href='http://www.flashkit.com' >Flashkit< /a >
    /Mirandir
    Last edited by Mirandir; 01-09-2003 at 07:58 AM.

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