谁能把这段AS2.0代码转换为3.0的?
AS2.0的镜头代码,即写入一个方块内,挪动方块就能挪动显示的画面。// Action script...
//
function camControl()
{
parentColor.setTransform(camColor.getTransform());
var _loc4 = sX / this._width;
var _loc3 = sY / this._height;
_parent._x = cX - this._x * _loc4;
_parent._y = cY - this._y * _loc3;
_parent._xscale = 100 * _loc4;
_parent._yscale = 100 * _loc3;
} // End of the function
function resetStage()
{
var _loc2 = {ra: 100, rb: 0, ga: 100, gb: 0, ba: 100, bb: 0, aa: 100, ab: 0};
parentColor.setTransform(_loc2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
} // End of the function
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;
转为AS3.0代码怎么转?求解?
我在网上查了,没有这种代码。但是谁读过大学学过,帮我转换成AS3.0的。
不懂帮顶 这里可能没人懂这个…… 依然不懂帮顶 大学学这玩意儿干什么?大学是混文凭的。
页:
[1]