No, unfortunately its not that simple.
A couple big points of concern you should be aware of:
The "7 digit" (7 byte) hex value is too big for an AS3
uint
.uint
only supports 32-bit values, and a value like yours is going to need 7 byte * 8 bits/byte = 56 bits. EvenNumber
only handles up to 53-bit integers. You'll need to store it in a pair ofuint
s or approach the problem in a different way.Since you're receiving the hex bytes separately, they look more like a byte sequence than a number. Are you sure of their byte order? There are a many different ways to store a numerical value as a series of bytes. Some which put the higher values at the beginning, some at the end, and some that can even be more complicated than that.
Ultimately, once you're sure you have the right byte order, you will have to split the first 3-4 bytes from the second 3-4 bytes and parse each one into a separate uint
, then keep track of which one represents the big part of the number and which represents the smaller part of the number. Depending on what you need to do with the value, this may make things other things even more complicated (i.e. if you need to do math with the numbers).
If you really do need to go down that road, you may want to use an "arbitrary size" integer implementation, like this one:
http://as3asclublib.googlecode.com/svn-history/r29/trunk/data/BigInt.as