ActionScript3的addFrameScript的什么点 [英] actionscript3 whats the point of addFrameScript

查看:128
本文介绍了ActionScript3的addFrameScript的什么点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想请教一下addFrameScript。

I want to ask about addFrameScript.

addFrameScript(0, frame1);   

这是什么脚本意味着什么?为什么它的0?

what is this script means? why its 0?

是有可能与其他号码或字替换0?

is it possible to replace 0 with other number or word?

public function try()
{
    addFrameScript(0, frame1);
    return;

}// end function

如果有人能帮助我理解?

If someone can help me to understand?

推荐答案

这无证方法用于调用一个函数时,影片剪辑实例播放头到达指定的帧,在这种情况下,第一帧, 0 (0为基础的指数)。你当然仅限于框架的可用数量;例如,添加一个脚本,你的最后一帧,你可以使用:

This undocumented method is used to invoke a function when a MovieClip instance playhead reaches the given frame, in that case the 1st frame, 0 (0-based index). Your are of course limited to the available number of frames ; for instance, to add a script you the last frame, you would use :

mc.addFrameScript(mc.totalFrames-1, lastFrameReached);

function lastFrameReached():void {
    trace("stopping the animation");
    mc.stop();
}

只是把它看作与Flash创作工具里面的一些code帧。

Just think of it as a frame with some code inside the Flash authoring tool.

这篇关于ActionScript3的addFrameScript的什么点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆