A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: changing dynamic text color

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    16

    Talking

    How do I change the color of dynamic text without making it an object? Eg. If I click on a button (not component button)it should change the color of the text on it.


    thanks

  2. #2
    Junior Member
    Join Date
    Mar 2002
    Posts
    21
    on the properties panel there's a color thing.
    i don't know if that's what you mean though.

  3. #3
    Junior Member
    Join Date
    Apr 2002
    Posts
    16
    Not really. I am talking about changing the color thru actionscript.


    Thanks

  4. #4
    Senior Member
    Join Date
    Apr 2002
    Location
    Hong Kong
    Posts
    171
    It seems that you cannot give a text field on a button an instance name, so you cannot change the color of it. But you can easily do this with a MC that appears to be a button.

    Create an MC on the stage and give it an instance name of "myMCButton". In that MC, create a dynamic text field called "mcText" and put whatever text you want in it.
    Then in the MC put the following code
    on (release) {
    this.mcText.textColor = 0x000066; // dark blue
    }

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