A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Urgent - scolling text colour

  1. #1
    Junior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    15

    Urgent - scolling text colour

    Hi,
    Is it possible to have a scrolling text field using the Scrollbar component that contains different colours of text within it.
    You can change it on the stage, but when the movie is tested, the changed colours do not show.
    Please help, thanks
    kbfm

  2. #2
    Flashkit Jedi

    Join Date
    Jul 2001
    Location
    Coruscant System
    Posts
    3,426
    If in a text box you had this text:

    'Hello there'

    You couldn't have 'hello' and 'there' different colours.

    XFM

  3. #3
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    If you create a textfield with the instance name myText and assign a scrollbar to the textfield, in the frame that contains the textfield you can use something like this to set the text,

    myText.html = true;
    myText.htmlText = "<p><font color=\"#ff9900\">This is some text</font></p><p><font color=\"#ffff00\">This is some text</font></p><p><font color=\"#ff0000\">This is some text</font></p><p><font color=\"#ffcc00\">This is some text</font></p><p><font color=\"#cccccc\">This is some text</font></p><p><font color=\"#00ff00\">This is some text</font></p><p><font color=\"#ff9900\">This is some text</font></p><p><font color=\"#ffff00\">This is some text</font></p><p><font color=\"#ff0000\">This is some text</font></p><p><font color=\"#ffcc00\">This is some text</font></p><p><font color=\"#cccccc\">This is some text</font></p><p><font color=\"#00ff00\">This is some text</font></p>";

    and the text will appear in the colours specified by the font tags.

  4. #4
    Junior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    15
    thanks, yes I realise that but when you place that text in a scrollbar component, the text will change to all be the same colour.

    I placed all my text in a movie clip, this got me past the problem.

  5. #5
    Junior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    15
    thanks catbert,
    my reply which appears after yours was refering to the post by Xurion_Flash_Man. Your idea is very good, i will give it a shot.

    kbfm

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