A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: denary to hex?

  1. #1
    Senior Member chi-styler's Avatar
    Join Date
    Jul 2001
    Location
    Bristol, UK
    Posts
    1,237
    Hiya,

    I'm trying to create a hex number based on a decimal. i.e.
    if decVar = 100, hexVar = 66, and when decVar = 0, hexVar = CC, and each appropriate value in between. Any ideas? Possible with an external script?

    Thanks, Chi
    [Edited by chi-styler on 07-08-2002 at 08:36 AM]

  2. #2
    Senior Member chi-styler's Avatar
    Join Date
    Jul 2001
    Location
    Bristol, UK
    Posts
    1,237
    bump

  3. #3
    Living Proof mave_the_rave's Avatar
    Join Date
    May 2002
    Location
    East Dulwich
    Posts
    1,006

    DEC TO HEX

    Hi,

    'quote'
    if decVar = 100, hexVar = 66, and
    when decVar = 0, hexVar = CC
    'end quote'

    What are you basing your calcultions 0n.

    Dec 100 = h'64 not h'66
    Dec 0 = h'0 not h'CC

    ?????

  4. #4
    Senior Member chi-styler's Avatar
    Join Date
    Jul 2001
    Location
    Bristol, UK
    Posts
    1,237
    Well, for each value between 0 and 100, the corresponding nearest hex value is created between 66 and CC. For example, 50 would mean 99 was created.
    Sorry, i didn't mean direct calculation.

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