I have a URLLoader which normally requesting the data to be in Text format, anyway on a specific conditions it might gets a Binary as result, which is actually just 1 integer number in binary format. Anyway the conversation :
var ba : ByteArray = ( e.currentTarget as URLLoader ).data; // failing on this row.
var r : int = ba.readInt();
doesnt passing anymore since the result data is in text forma due the request header…
- How to convert the result data into integer ?
Simply, you need to change
But before you send a request. After, there’s no point doing that.
EDIT
To read text into a binary (ByteArray)