Hello!
I have a problem with a tutorial on the kirupa site–
http://www.kirupa.com/developer/actionscript/camera_panning.htm
[size=3]Merry-go-round of Spinning Images[/size]
I tryed to read the tutorial sometimes but cant figure out the problem
Here is my code on frame. (Should it even be on a frame?)
[color=blue]this.createEmptyMovieClip(“theScene”, 1);
theScene._x = 150;
theScene._y = 100;[/color]
[color=blue]objectsInScene = new Array();[/color]
[color=blue]focalLength = 500;
spin = 0;
displayPane = function(){
var angle = this.angle + spin;
var x = Math.cos(angle)*this.radius;
var z = Math.sin(angle)*this.radius;
var y = this.y;
var scaleRatio = focalLength/(focalLength + z);
this._x = x * scaleRatio;
this._y = y * scaleRatio;
this._xscale = this._yscale = 100 * scaleRatio;[/color]
[color=blue]this._xscale = Math.sin(angle);
this.swapDepths(Math.round(-z));
};
angleStep = 2Math.PI/8;
for (i=0; i < 8; i++){
attachedObj = theScene.attachMovie(“pane”, “pane”+i, i);
attachedObj.angle = angleStep * i;
attachedObj.radius = 100;
attachedObj.x = Math.cos(attachedObj.angle) * attachedObj.radius;
attachedObj.z = Math.sin(attachedObj.angle) * attachedObj.radius;
attachedObj.y = 40;
attachedObj.display = displayPane;
objectsInScene.push(attachedObj);
}
panCamera = function(){
spin -= this._xmouse/1000;
for (var i=0; i < objectsInScene.length; i++){
objectsInScene*.display();
}
};
theScene.onEnterFrame = panCamera;[/color]
[color=black]This was the code, but nothing is showed :([/color]
I have a movieclip called pane.
[color=red]I can lay up the file if needed[/color]
Someone knows the problem then PLEASE post !!!