MTASC incompatibilities

In org.jivesoftware.xiff.data.auth.SHA1, there is this function:

private static function str2blks(str:String):Array

{

var nblk = ((str.length + 8) >> 6) + 1;

var blks = new Array(nblk * 16);

for (var i = 0; i < nblk * 16; i++)

{

blks[i] = 0;

}

for (var i = 0; i < str.length; i++)

{

blks[i >> 2] |= str.charCodeAt(i) << (24 - (i % 4) * 8);

}

blks[i >> 2] |= 0x80 << (24 - (i % 4) * 8);

blks[nblk * 16 - 1] = str.length * 8;

return blks;

}

MTASC complains that the variable i is not defined. The function should probably look like this:

private static function str2blks(str:String):Array

{

var nblk = ((str.length + 8) >> 6) + 1;

var blks = new Array(nblk * 16);

var i;

for (i = 0; i < nblk * 16; i++)

{

blks[i] = 0;

}

for (i = 0; i < str.length; i++)

{

blks[i >> 2] |= str.charCodeAt(i) << (24 - (i % 4) * 8);

}

blks[i >> 2] |= 0x80 << (24 - (i % 4) * 8);

blks[nblk * 16 - 1] = str.length * 8;

return blks;

}

There is another similar problem in org.jivesoftware.xiff.im.Roster, line 534: eventObj is redefined, but already exits

Hi, after patching macromedia components all seems working fine with mtasc.

I’'m using it for a professional application an it is working fine.

Follow the tutorial here

http://osflash.org/mx_v2_components_patch

And remember to patch a copy of the class, not the originals, so you can continue compile with MM.

Hope this helps.

Bye, Marco