dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: changing textfield properties

  1. #1
    Junior Member
    Join Date
    May 2002
    Posts
    17

    changing textfield properties

    I want to create a function that I can call to change the properties of the text field to no border, no background, and different text color. This is what I tried but it didn't work:

    _global.changeFields = function(){
    this.background=false;
    this.textcolor=0xffffff;
    this.border=false;
    }
    myTextField.changeFields();

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Your textfield will automatically have no border and no backgroundcolor, since that is default setting. The text color you can determine either by clicking on the textfield and manually stting it to white in the property inspector or if you have html text loaded into the field just set
    PHP Code:
    <font color="#FFFFFF>text here</font> 
    There are other ways but this is simplest.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    Junior Member
    Join Date
    May 2002
    Posts
    17
    I want it to change dynamically actually. I have a button that the user will click and then i want all the text fields to change. I tried to make a keyframe on the layer and then change the properties but that didn't work.

    So when the user clicks the button, the text fields will lose the border, color, and be unedittable.

  4. #4
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    name your button (for example myButton) and put this script in the actions keyframe:

    myButton.onPress = function(){
    with(textField){
    backgroundColor=false;
    border=false;
    }
    }

    for text color please check actionscript help. I don't have anything here now.

    You can also just make it invisible if you want that

    textField._visible = false;
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

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