AS脚本代码解释onClipEvent (load){ab = _parent.circle2;}onClipEvent (enterFrame){ac = ab._width / 2 - 5;mpos = Math.sqrt(ab._xmouse * ab._xmouse + ab._ymouse * ab._ymouse);if (ac < mpos){h = ac / mpos;_x = ab._xmouse * h + ab._x;_y = ab._ymouse

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 01:40:38
AS脚本代码解释onClipEvent(load){ab=_parent.circle2;}onClipEvent(enterFrame){ac=ab._width/2-5;mpos=Math.sqr

AS脚本代码解释onClipEvent (load){ab = _parent.circle2;}onClipEvent (enterFrame){ac = ab._width / 2 - 5;mpos = Math.sqrt(ab._xmouse * ab._xmouse + ab._ymouse * ab._ymouse);if (ac < mpos){h = ac / mpos;_x = ab._xmouse * h + ab._x;_y = ab._ymouse
AS脚本代码解释
onClipEvent (load)
{
ab = _parent.circle2;
}
onClipEvent (enterFrame)
{
ac = ab._width / 2 - 5;
mpos = Math.sqrt(ab._xmouse * ab._xmouse + ab._ymouse * ab._ymouse);
if (ac < mpos)
{
h = ac / mpos;
_x = ab._xmouse * h + ab._x;
_y = ab._ymouse * h + ab._y;
}
else
{
_x = _parent._xmouse;
_y = _parent._ymouse;
} // end if
updateAfterEvent();
}
onClipEvent (mouseDown)
{
if (_parent.hitme.hitTest(_root._xmouse,_root._ymouse))
{
} // end if
}
onClipEvent (mouseUp)
{
}
这个是眼珠子转动的代码 ,里面的对象有点乱 ,估计高手一看你就知道 ,我就不费力找了,我想了解下这个眼睛转动的设计思想是什么,

AS脚本代码解释onClipEvent (load){ab = _parent.circle2;}onClipEvent (enterFrame){ac = ab._width / 2 - 5;mpos = Math.sqrt(ab._xmouse * ab._xmouse + ab._ymouse * ab._ymouse);if (ac < mpos){h = ac / mpos;_x = ab._xmouse * h + ab._x;_y = ab._ymouse
主要注意flash的坐标和数学上的坐标y轴是方向相反的.数学上是向上,flash向下.flash的左上角是原点.
另外一个问题是这个眼珠随鼠标转动的实现中,是以眼珠正常位置的那个点作为原点(以下简称眼框原点).
鼠标所在位置,眼珠偏离时候所在位置和眼框原点3点一线.这样就让人看起来眼珠一直看着鼠标.
要实现的话,就是说,两两之间连线与X水平夹角要相同.
先算眼眶原点和鼠标的距离.除以(鼠标x坐标-眼框原点的x坐标),计算出水平夹角的cos值.
再用这个cos值去乘眼珠相对于眼框原点偏离的距离,得到眼珠必须处于的x偏离坐标.再+上眼框原点X坐标,得到这个眼珠在舞台上的绝对X坐标.
同理得出眼珠Y坐标.

AS脚本代码解释onClipEvent (load){ab = _parent.circle2;}onClipEvent (enterFrame){ac = ab._width / 2 - 5;mpos = Math.sqrt(ab._xmouse * ab._xmouse + ab._ymouse * ab._ymouse);if (ac < mpos){h = ac / mpos;_x = ab._xmouse * h + ab._x;_y = ab._ymouse 请问下面FLASH AS脚本是什么意思?请一行行解释说明.onClipEvent (load) {i=1;}此段中i是什么意思?是不是次数的意思?on(rollover) {i=0;}此段中的I是什么意思?还有变量不发送是什么意思?会不会影响程序? 谁能帮我解释下这段AS代码:急onClipEvent (load){function speed(num){speedX = -(_root._xmouse - hx) / num / 2;return (speedX);} // End of the functionfunction trans(){p = p + speed(100);range = (p + 291) * 3.141593E+000 / 180;re1 = Math.si flash 放大镜代码解释onClipEvent (load){Mouse.hide();startDrag(,true);speed = 4;scalex = 200;scaley = 200;image._xscale = scalex;image._yscale = scaley;}onClipEvent (mouseDown){scalex = 500;scaley = 500;}onClipEvent (mouseUp){scalex = 200;sca 谁帮忙解释这个shell脚本的含义::(){:|:&};:谁帮忙解释这个shell脚本的含义::(){:|:&};: 解释以下代码的含义,代码很简单代码很简单Private Type WIN32_FIND_DATA dwFileAttributes As Long ftCreationTime As FILETIME ftLastAccessTime As FILETIME ftLastWriteTime As FILETIME nFileSizeHigh As Long nFileSizeLow A 请帮帮我翻译一下以下这段代码onClipEvent (load) {previouslyOver = false;}onClipEvent (enterFrame) {currentlyOver = this.hitTest(_root._xmouse,_root._ymouse,true);if (!previouslyOver and currentlyOver) { previouslyOver = true; this.go unity3D其他物体咋表示就是其他物体的名字在哪.脚本代码 关于Flash的AS语言的解释.书本上介绍Flash的ActionScript脚本是由事件、动作和对象构成谁能解释下事件和动作的含义. 求解释flash这意思onClipEvent (load) { _parent.targetPosi = 200;}onClipEvent (enterFrame) { this._x = this._x+(_parent.targetPosi-this._x)/3; this._width = this._width+(_parent.targetScale-this._width); if (Math.abs(_parent.targetPosi-this._x) 解释每行代码含义create trigger biufer_employee__job_idbefore insert or updateof job_idon employeereferencing old as old_valuenew as new_valuefor each rowwhen (new_value.job_id3 )begin:new_value.commission_pct :=0;end; hour=hour*30+int(Minute/2)是什么意思制作一个时钟,代码有点看不懂onClipEvent(load){tm=new Date();}onClipEvent(enterFrame){Hour=tm.getHours();Minute=tm.getMinutes();Second=tm.getSeconds();}1、这段不可以直接写成下面的吗? AS脚本中常出现 this._parent._name 例如:names = this._parent._name.substring(4,6); sub声明 帮忙解释下这段代码的意思,Sub xiex(startX As Single,endX As Single,_startY As Single,endY As Single,Xstep As String,_ystep As Single,picX As Single,picY As Single)Picture1.ClsDim XX As SingleXX = startY + ystepFor i = startX To e 关于按键精灵鼠标移动脚本的问题 下面是我的脚本代码IfColor x1183,y121,C0A965,0 ThenGoto ADADADElse Goto DHDHDHEnd IfRem ADADADMoveTo X1334,Y120Delay 600LeftClick 1Rem DHDHDHMoveTo X1000,Y150Delay 600LeftClick 1为什么这个 小小的if 条件语句问题flash脚本里~onClipEvent (enterFrame) {if (_root.menter>=1) {_root.menter = 10-int(getTimer()/1000);} else {stop();这句在影片刚载入的时候menter并没有初值啊,也就是说_root.menter>=1并不成立,可 求解释每段代码的含义, 通过脚本元素和HTML代码的混合使用判断一个随机数是否是偶数,是偶数显示“该数是偶数”,否则显示“该数