A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: hex Color as variable in color object?

  1. #1
    im trying to do this

    myColor = new Color(myMC);

    myColor.setRGB(variable);

    we have all of the colors we need in css info in a database but im attempting to use the same values in flash. i can load the variables in fine but when i try to set them as a hex color it just assumes the letters are hex colors.

    any suggestions

  2. #2
    The Great euh eh you know paul67's Avatar
    Join Date
    Oct 2000
    Location
    the Netherlands
    Posts
    283
    make an array with the hexcolors


    base = new array()
    base["blue"] = "ox0000ff"
    base["red"] = "oxff0000"
    base["green"] = "ox00ff00"
    .....

    and take a look at the tostring() function
    and the parseint() function

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