dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Changeable text field color?

  1. #1

    Changeable text field color?

    I have a dynamic text box where the text changes depending on what is selected in a list box (using variables.) Is there a way to also attach a bit of code so that the color of the text in the textbox also changes?
    @~.~@

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Where you define you textfield enter the following code:

    backgroundColor=true;
    backgroundColor=0xFF0000;//this is a red background
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    i meant that i want the text to change color depending on what i select, not the background. i basically want each item in the list to be a variable and say if (for instance) variable=a then the text color is red and if variable=b then the text color is blue. is this possible?
    @~.~@

  4. #4
    Senior Member
    Join Date
    Jan 2001
    Posts
    102
    Ok, on the textfield options check the render text as HTML buttom

    Your script goes like this if variable=a (font color="#FF0000") <font color="#FF0000"> Your text </font> (/font)

    else if variable=b (font color="#0000FF") <font color="#0000FF"> Your text </font> (/font)

    instead of using ( ) use < > i just used ( ) for demostration.


    i hope this helps if you need something else just tellme C ya
    Last edited by Gingko; 12-11-2002 at 11:07 PM.
    -=Gingko=-

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