Welcome, Guest
  • Author Topic: setting background color with external CSS  (Read 2886 times)

    kofi addaquay

    • Global Moderator
    • Senior Programmer
    • *****
    • Posts: 450
      • View Profile
      • Scripton Interactive
      • Email
    setting background color with external CSS
    « on: 03/16/07, 17:05 »
    something weird is going on. i am trying to set background color of a text box through external css and not any other method. the definition in my xml is like this

    .myTest
    {
       background-color: #00FF00;
    }

    the text field is fully functioning cos i can put text in and color it etc etc. but i cant set the background for the text field. i know i can use the 'backgroundColor' , but that is within my actionscript. i dont want to do that. i want to set the color of my text background from the stylesheet. any ideas..i have tried all ..i think . i also noticed in the documentation ..that background color was not part of the supported css styles. true ??
    « Last Edit: 03/19/07, 11:15 by kofi addaquay »

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: setting background color with external CSS
    « Reply #1 on: 03/17/07, 04:52 »
    you have to create a styleObject and assign it to the field.
    happy flashing
    8)
    Ronald

    kofi addaquay

    • Global Moderator
    • Senior Programmer
    • *****
    • Posts: 450
      • View Profile
      • Scripton Interactive
      • Email
    Re: setting background color with external CSS
    « Reply #2 on: 03/17/07, 09:11 »
    ah ! nice !...so be using the styleObject, i am about to load the stylesheet and reference the css classes by name and apply it to the text fields. excellent. i will give this a shot on monday and see how it goes. will also paste a lil sample code of how it works... since there is no reference of styleObject on this site. Thanks Ronald
    « Last Edit: 03/17/07, 09:12 by kofi addaquay »

    kofi addaquay

    • Global Moderator
    • Senior Programmer
    • *****
    • Posts: 450
      • View Profile
      • Scripton Interactive
      • Email
    Re: setting background color with external CSS
    « Reply #3 on: 04/02/07, 17:23 »
    Style Object didnt work as expected. Ended up using javascript to read and write to a css file and then return those values via external interface for flash to use.

    Laterz