antonfrv
antonfrv

Reputation: 178

can not set flash.geom.Matrix3D rawData

consider the following code:

var t:Matrix3D = new Matrix3D(
    new Vector.<Number>([1,0,0,0,0,1,0,0,0,0,1,0,10,10,0,1])
);

trace(t.rawData[12]);

the trace command will print "0" for me, and it is visible with debugger that rawData contains an identity matrix actually. I simply can not set the values contained by Matrix3D!

I'm using flash 11.2.

Thanks, for any help!

Upvotes: 1

Views: 329

Answers (1)

Marty
Marty

Reputation: 39456

Pretty sure your syntax for creating a pre-filled Vector is wrong.

You should have:

new <Number>[values]

Instead of:

new Vector.<Number>([values])

Demo:

var wrong:Vector.<int> = new Vector.<int>([1,2,3]);
var right:Vector.<int> = new <int>[1,2,3];

trace(right[1]); // 2
trace(wrong[1]); // error

Upvotes: 1

Related Questions