[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Instance of Symbol 18 MovieClip in Frame 1 (1.28 KiB) ●
onClipEvent (load) {
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local6 = (this._xscale / 100) * 720;
var _local5 = (this._yscale / 100) * 480;
var _local7 = Math.sqrt((this._x * this._x) + (this._y * this._y));
var _local8 = ((this._x != 0) ? (Math.atan(this._y / this._x)) : 1.570796) - ((this._rotation * 3.141593) / 180);
var _local3 = sX / _local6;
var _local4 = sY / _local5;
_parent._x = _local3 * ((_local6 / 2) - (_local7 * Math.cos(_local8)));
_parent._y = _local4 * ((_local5 / 2) - (_local7 * Math.sin(_local8)));
_parent._xscale = 100 * _local3;
_parent._yscale = 100 * _local4;
_parent._rotation = -this._rotation;
}
function resetStage() {
_parent._rotation = 0;
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_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;
}