dcsimg
A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: for oldnewbie(repost); rendering text as html dynamically

  1. #1
    Creating Creativity!!! digitalblood's Avatar
    Join Date
    Feb 2003
    Location
    India
    Posts
    143

    for oldnewbie(repost); rendering text as html dynamically

    How on earth is it poissible??? though the text box is enabled for html view, it displays text with all those html tags (displays as plain text). The fla is too big to be attached. PLEASE HELP
    Thanx in advance
    Rgds
    Bhaskee
    I don't want to run the world But I Wouldn't mind taking it for a RIDE!!

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Using LoadVars()?


    Are you using...

    my_textfield.htmlText = this.var1; ?

    Rather than...

    my_textfield.text = this.var1;

  3. #3
    Creating Creativity!!! digitalblood's Avatar
    Join Date
    Feb 2003
    Location
    India
    Posts
    143

    Using loadVariables();

    The script on the button1 on main movie (which will call the MC into container MC which again contains my text box. Quite confusing, eh?) is as follows:
    ---------------------------------------------------
    on (release) {
    _root.MiniDisplayBox.attachMovie("Dispbox", "Dispbox1", 1);
    flag="bot1";
    }
    where "MiniDisplayBox" is the container MC and "Dispbox" is the MC present in the Library which contains my text box
    -----------------*********-------------------------

    The script on frame containing my text box is as follows:

    ---------------------------------------------------
    if (_root.flag=="bot1"){
    loadVariables ("hr.txt",this.Display);
    }
    if (_root.flag=="bot2"){
    loadVariables ("expertise.txt",this.Display);
    }
    if (_root.flag=="bot3"){
    loadVariables ("Appsdev.txt",this.Display);
    }
    if (_root.flag=="bot4"){
    loadVariables ("Recacc.txt",this.Display);
    }
    if (_root.flag=="bot5"){
    loadVariables ("valCust.txt",this.Display);
    }
    -----------------------**********-----------------------

    where am i going wrong? I have enabled the html tab also. but the display is plain text.
    -----------------------------------------------------------
    (Dear Mr. oldnewbie, please check your mailbox, sent attachment{.swf & .txt})
    Thanx & rgds
    Bhaskee
    I don't want to run the world But I Wouldn't mind taking it for a RIDE!!

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Can't do much without the .fla!
    If it's to large to e-mail (even zipped up!), upload it to your server and provide me with a link to download it from there. You can e-mail me at the same address you sent me the .swf & text.

    Must be either a path problem, or maybe you have to embed your font, if you haven't tried it already.

    If the folder picture is the mc that holds your textfield, then add a trace on the first frame of that mc:

    trace(this);

    That should display the correct path to the output window. Try that path on your buttons.

  5. #5
    Creating Creativity!!! digitalblood's Avatar
    Join Date
    Feb 2003
    Location
    India
    Posts
    143

    oops!!

    I am afraid i am not at such liberty. My sys Admin. might not allow me to do that. any way I will try to do that. but i doubt on it. Will try to compress using stuffit. Do u have it with u?
    Thanx
    Bhaskee
    I don't want to run the world But I Wouldn't mind taking it for a RIDE!!

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You better make it quick... I'm leaving for a 2 weeks vacation at noon tomorrow, and I'm soon going to bed tonight!

  7. #7
    Creating Creativity!!! digitalblood's Avatar
    Join Date
    Feb 2003
    Location
    India
    Posts
    143

    deal

    wil send it to ya to ur mailbox. hopefully in .sit format. (also will try to compress the zip again)
    Thanx
    Bhaskee
    I don't want to run the world But I Wouldn't mind taking it for a RIDE!!

  8. #8
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    How about at least one or more of your text files, to check this out... Not much time left! Getting tired!

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Ok, this seems to work for me!

    if (_root.flag=="bot1"){
    trace(this);
    loadVariables ("hr.txt",_level0.MiniDisplayBox.Dispbox1);
    }

    See the bold above, that is the correct path for I guess, all of your buttons. Also notice the trace action I added... That's what outputed the correct path to your textfield. A neet little trick when looking for right paths in any movie clip. You just insert that on the first frame of the movie clip, and it outputs the path to that movie clip, up to the instance name of that movie clip, that you have to add to the path.

    Now this assumes, your text files start with Text=..., that's your textfield's variable.
    It works as corrected above for now. If you go adding fades, or masks on this, you'll most probably have to embed the font, so that it continues to show up.
    I'll be away for the next few weeks, so I won't be able to check up on you!

    Catch you later!

  10. #10
    Creating Creativity!!! digitalblood's Avatar
    Join Date
    Feb 2003
    Location
    India
    Posts
    143

    HOORRAAY

    That is listening to me like my kid. U really are the man. Thanx old pal. That was a gr8 favor from your side. I owe you one.
    Happy Holidays
    Rgds
    Bhaskee
    I don't want to run the world But I Wouldn't mind taking it for a RIDE!!

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