Converts a hex string returned by ssCore.FileSys.readFileBinary into an Array.


First available in version 3.5 build 314.

Not available in ActionScript 3.


dataArr = StringUtils.hexStringToArray(dataStr)

dataArr - Array - The hex string data represented as an Array.


dataStr - String - A hex string formatted as two characters per byte returned from ssCore.FileSys.readFileBinary.


Editing binary values cannot be done directly in ActionScript. However, if the data can be represented as an array of bytes you can then manipulate data at the byte level. Use this function to convert a hex string returned by ssCore.FileSys.readFileBinary to an Array.

Due to speed limitations of ActionScript 1 and 2 it is not recommended to convert large amounts of data. At 300 KB, depending on system resources, the Flash Player will most likely warn the user about a script taking too long.

See ssCore.FileSys.appendToFileBinary, ssCore.FileSys.readFileBinary, ssCore.FileSys.writeToFileBinary, and StringUtils.arrayToHexString.


var r = ssCore.FileSys.readFileBinary({path:"startdir://file.swf"});

var myArray = StringUtils.hexStringToArray(r.result);