I'm using an external class to draw an object in my Flash movie but I need to get some variables from the Class as well.
I want to put the variable persPoints[0].x into a variable in my main document called newvar for example.
This is the part of the External Class I'm using
class Shape {
function set2DTo3D():Void { var persPoints:Array = new Array(); for (var i:Number = 0; i < this.pointsArray.length; i++) { persPoints[i] = new Object(); this.perspectief = this.scaleValue / (this.scaleValue - this.pointsArray[i].z); persPoints[i].x = this.pointsArray[i].x * this.perspectief; persPoints[i].y = this.pointsArray[i].y * this.perspectief; } this.draw(persPoints); } }
And somehow I will need to get that variable into my onEnterFrame funtion of my .fla below.
var kubusMC:MovieClip = this.createEmptyMovieClip("kubusMC", 0); kubusMC._x = Stage.width/2;//plaats de mc in het midden kubusMC._y = Stage.height/2;
var kubus:Shape = new Shape(punten, kubusMC, 300, 1, 0x222222, 85);
this.onEnterFrame = function() {
}
But how?!