actionscript 3 - Convert text string to hexadecimal using flash builder -
i want convert mac address hexadecimal string using flash builder.. used code
var networkinterface : object = networkinfo.networkinfo.findinterfaces(); var networkinfo : object = networkinterface[0]; var physicaladdress : string = networkinfo.hardwareaddress.tostring(); txtreq.text = physicaladdress + "-" + txtserial.text var reqcode:uint = uint(txtreq.text); var reqcode1:string = reqcode.tostring(16); txtact.text = reqcode1;
when run application,
txtserial.text = 123 , physicaladdress = c6-17-31-a9-ef-ff...
but txtact.text got 0.
then how fix problem , in flex builder how convert ff-ff-ff-ff-ff text hexadecimal code...
you should use parseint(reqcode,16) instead of reqcode.tostring(16);
Comments
Post a Comment