Hey, I saw your shout: Make a square the size of the Workspace and convert it to a symbol. Middle Registration and it is a movie clip. Name it vcam_mc then add this code to the symbol :
onClipEvent (enterFrame) {
y += (root.player.y-y)/4;
x += (root.player.x-x)/4;
}
-————————
Now go INTO the symbol an…
show moreHey, I saw your shout: Make a square the size of the Workspace and convert it to a symbol. Middle Registration and it is a movie clip. Name it vcam_mc then add this code to the symbol :
onClipEvent (enterFrame) {
y += (root.player.y-y)/4;
x += (root.player.x-x)/4;
}
-————————
Now go INTO the symbol and select the first frame and right click it and hit actions then add this code to it:
parentColor.setTransform(camColor.getTransform());
function camControl() {
parentColor.setTransform(camColor.getTransform());
var scaleX = sX/this.width;
var scaleY = sY/this.height;
parent._x = cX-(this.x*scaleX);
parent._y = cY-(this.y*scaleY);
parent.xscale = 100*scaleX;
parent.yscale = 100*scaleY;
}
function resetStage() {
var resetTrans = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(resetTrans);
parent.xscale = 100;
parent.yscale = 100;
parent.x = 0;
parent.y = 0;
}
this.visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = “exactFit”;
var cX = Stage.width/2;
var cY = Stage.height/2;
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
==-=-=
Hope I helped!
This is AS2 By the way,
show less