Thursday, March 24, 2011

Alchemy (Array and ObjectArray)

Fiddling with Alchemy furthermore, i was stuck at parsing array of values from AS to C.
Originally, i thought simply by supplying the following code would get me the correct values; however, it turned out to be exactly the opposite of what i was expecting.

Originally:
AS3_ObjectValue(args, "arg0:IntType, arg1:StrType", &arg0, &arg1); //arg0, arg1 declared correspondingly

It turns out i need to make a slight change in order to get the values.
AS3_ArrayValue(args, "AS3ValType", &arr) // arr declared to be AS3ValType arr;
AS_ObjectValue(arr, "arg0:IntType, arg1:StrType", &arg0, &arg1); //then you will get the proper values

OH MY GOOOOOOOOODNESSSSSSSSSSSSSSSSSSSSSS, spent an hr in the morning just to figure that line out... CHI SIN!

No comments:

Post a Comment