A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [RESOLVED] Unwanted HTML Markup in Text Box Value

  1. #1
    Junior Member
    Join Date
    Nov 2000
    Posts
    28

    [RESOLVED] Unwanted HTML Markup in Text Box Value

    I've inherited a Flash MX 2004 document that has some text entry points that verify you've entered the right text before continuing or provide you a warning message and urge you to try hard. They're set up like so:

    Code:
    on (keypress "<Enter>")
    {
        if (titleInputText == "hoped-for text entry") 
        {
            gotoAndPlay("someNamedTarget");
        }
        else 
        {
            comment = "Hey--enter hoped-for text entry to continue!";
        }
    }
    Some of them just weren't behaving at all correctly. With some handy-dandy trace() statements, I found that a few of them were returning values that included HTML formating of the text. Instead of getting

    Code:
    something entered

    I was getting

    Code:
    <FONT = "Arial">something entered</FONT>

    which is causing me all sorts of problems. How on earth can I turn off the HTML tags? Where did it come from?

    (Why, yes, I do know just enough to get myself in trouble. Why do you ask?)

    Any help would be greatly appreciated on this.

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    Try selecting the text box and and unselecting the "< >" button on the Properties panel. Assuming your users don't need to input HTML. If that doesn't work, give the textfield an instance name and get the value of instanceName.text.

  3. #3
    Junior Member
    Join Date
    Nov 2000
    Posts
    28
    Now, that's the part that's driving me crazy. Looking at the properties of the text box, the "<>" is deselected already! So where is the HTML coming from if not from there?

    I'll try naming the thing and letting you know how it goes.

    Thanks.

  4. #4
    Junior Member
    Join Date
    Nov 2000
    Posts
    28
    Well, the naming didn't work either.

    So I removed the offending elements and remade them exactly as it looked like they had been, and now they work with both the variable value and the .text call.

    Huh. Odd, but true.

    Thanks for the help.

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