dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: how do i trace a color in hexadecimal numbers?

  1. #1
    Senior Member
    Join Date
    Jul 2008
    Posts
    418

    how do i trace a color in hexadecimal numbers?

    i want to trace(0x285D6C); or something. but i don't want it to be converted to decimals in the trace. how do i do this?

    thank you
    I program in AS3 only.

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    Colors are generally stored in a uint, which has a toString method which takes a radix in which to express the value.

    Code:
    trace("0x"+myColor.toString(16));

  3. #3
    Senior Member
    Join Date
    Jul 2008
    Posts
    418
    Thanks!
    I program in AS3 only.

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