佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1505|回复: 5

如何让stop 停在选择性的frame里?

[复制链接]
发表于 16-1-2009 02:08 AM | 显示全部楼层
原帖由 zhixuen 于 15-1-2009 05:14 PM 发表
Actually I'm not flash designer, I'm working with software. My friend is taken travel leave this 1 week.

He had no time to do this flash project. This is a small flash animation project.

Howeve ...



我想是位編程人員的話, 不管是 desktop application 還是 web application 的編程道理都是一樣的...

animation 是個 object, AS 的 structure 和 Java 是差不多相同的
回复

使用道具 举报


ADVERTISEMENT

 楼主| 发表于 14-1-2009 09:47 PM | 显示全部楼层 |阅读模式
大家好,第一次到这里发帖,
请问如何让stop() 停在我要得frame。比如

当animation执行着,user 按了下body of flash之后animation 就会停留在我选择的frame,但不是直接到哪里,而是animation会继续执行,当道那个frame 才停,但是当我在之前按多一下,那个function将不会执行。。。。。。

请各位大大帮帮忙,不知道应该如何。。。
回复

使用道具 举报

发表于 14-1-2009 11:55 PM | 显示全部楼层
原帖由 zhixuen 于 14-1-2009 09:47 PM 发表
大家好,第一次到这里发帖,
请问如何让stop() 停在我要得frame。比如

当animation执行着,user 按了下body of flash之后animation 就会停留在我选择的frame,但不是直接到哪里,而是animation会继续执行,当道那 ...



MovieClip.prototype.stopframe = function(num:Number)
{
        this.num = num;
        delete this.onEnterFrame;
        this.onEnterFrame = function()
        {
               if(this.num == this._currentframe)
               {
                       this.stop();
                       delete this.onEnterFrame;
               }
        }
}


//使用例子
animation.stopframe(10);
回复

使用道具 举报

 楼主| 发表于 15-1-2009 11:51 AM | 显示全部楼层
原帖由 super-tomato 于 14-1-2009 11:55 PM 发表



MovieClip.prototype.stopframe = function(num:Number)
{
        this.num = num;
        delete this.onEnterFrame;
        this.onEnterFrame = function()
        {
               if(this.num ...



Sorry because do not have chinese input.

Now I inserted  a button name Button1

where the code should be located ? sorry I do not familar to Flash.

Button1.onrelease = animation.stopframe(10);

MovieClip.prototype.stopframe = function(num:Number)
{
        this.num = num;
        delete this.onEnterFrame;
        this.onEnterFrame = function()
        {
               if(this.num == this._currentframe)
               {
                       this.stop();
                       delete this.onEnterFrame;
               }
        }
}
回复

使用道具 举报

发表于 15-1-2009 04:56 PM | 显示全部楼层
原帖由 zhixuen 于 15-1-2009 11:51 AM 发表



Sorry because do not have chinese input.

Now I inserted  a button name Button1

where the code should be located ? sorry I do not familar to Flash.

Button1.onrelease = animation.stopfra ...




Button1.onRelease = function() {animation.stopframe(10); }

該去買本初基書看看怎麼應用
回复

使用道具 举报

 楼主| 发表于 15-1-2009 05:14 PM | 显示全部楼层
Actually I'm not flash designer, I'm working with software. My friend is taken travel leave this 1 week.

He had no time to do this flash project. This is a small flash animation project.

However, I don't have flash experience but i have to accomplish it within 1 week.

I have been done all the animation part.

The user requested this kind of function so I have to do for him.

By the way, what is the meaning of animation. It is a method or object ?
回复

使用道具 举报

Follow Us
您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 19-12-2025 01:55 AM , Processed in 0.111286 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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