翔鹰帝国网|帝国时代论坛|帝国时代系列|神话时代
 找回密码
 注册翔鹰会员(昵称)
搜索
查看: 1400|回复: 5

谁能把这段AS2.0代码转换为3.0的?

[复制链接]

47

主题

0

精华

438

积分

子爵

耕战
16
鹰币
441
天龙币
0
回帖
234

翔鹰建站十周年纪念章

附庸关系0
发表于 2014-11-15 18:29:33 | 显示全部楼层 |阅读模式
AS2.0的镜头代码,即写入一个方块内,挪动方块就能挪动显示的画面。
// Action script...
// [Action in Frame 1]
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代码怎么转?求解?

回复

使用道具 举报

47

主题

0

精华

438

积分

子爵

耕战
16
鹰币
441
天龙币
0
回帖
234

翔鹰建站十周年纪念章

附庸关系0
 楼主| 发表于 2014-11-15 18:30:37 | 显示全部楼层
我在网上查了,没有这种代码。但是谁读过大学学过,帮我转换成AS3.0的。
回复

使用道具 举报

57

主题

1

精华

3006

积分

枢机主教

耕战
10
鹰币
1470
天龙币
125
回帖
6979

翔鹰建站十周年纪念章二级帝国勋章十字军勋章创意工坊通行证

附庸关系6
发表于 2014-11-15 20:29:42 | 显示全部楼层
不懂帮顶
回复

使用道具 举报

419

主题

19

精华

8万

积分

教宗

耕战
13491
鹰币
41765
天龙币
18
回帖
6051

特级嘉禾勋章三级帝国勋章十字军勋章翔鹰建站十周年纪念章

附庸关系0
发表于 2014-11-15 23:20:51 | 显示全部楼层
这里可能没人懂这个……
004时代:战役时代
我很乐意看到有人在MOD技术上超过我。
回复

使用道具 举报

57

主题

1

精华

3006

积分

枢机主教

耕战
10
鹰币
1470
天龙币
125
回帖
6979

翔鹰建站十周年纪念章二级帝国勋章十字军勋章创意工坊通行证

附庸关系6
发表于 2014-11-16 08:58:30 | 显示全部楼层
依然不懂帮顶
回复

使用道具 举报

10

主题

0

精华

3932

积分

公爵

耕战
692
鹰币
2507
天龙币
0
回帖
219
附庸关系0
发表于 2014-11-16 09:47:24 | 显示全部楼层
大学学这玩意儿干什么?大学是混文凭的。
回复

使用道具 举报

本版积分规则

排行榜|小黑屋|翔鹰帝国

GMT+8, 2026-8-29 18:04 , Processed in 0.124750 second(s), 78 queries , File On.

Powered by Hawk Studio  QS Security Corp.® Licensed

Copyright © 2001-2025, Hawkaoe.net All Rights Reserved

快速回复 返回顶部 返回列表