本文介绍了按钮翻转/滚出问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我在Mac上运行FlashCS3,使用Actionscript 3.0。 首先我要说的是我对Actionscript的新手。 (因为,只使用了几天新的。)所以请原谅我,如果我没有完整的术语。 我正在尝试创建一个交互式按钮在何处滚过播放某个电影剪辑,并在滚出时播放该电影剪辑。播放另一个影片剪辑。我知道,相当简单,对吧? 通过改变按钮的状态并让它不起作用来尝试这个之后,我在一本书中读到你可以创建电影剪辑表现得像纽扣。 所以我做到了这一点。剪辑按钮名为" btn_red" 在主时间轴中,我有一个带有此按钮的图层和一个动作图层。* 内 btn_red ,我有这个: I am running on a Mac, with FlashCS3, using Actionscript 3.0. First I''m going to say that I am really new to Actionscript. (As in, only been using for a few days new.) So please excuse me if I don''t have the terminology down completely. I am trying to create an interactive button where upon "rolling over" a certain movie clip is played, and upon "rolling out" another movie clip is played. I know, fairly simple, right? After trying this by altering the the button''s over state and having it not work, I read in a book that you can create movie clips that behave like buttons. So I have done this. The clip-button is called "btn_red" In the main timeline, I have the layer with this button, and an actions layer.* Within btn_red, I have this: 展开 | 选择 | Wrap | 行号 推荐答案 **来自上方** 我到了播放测试电影时的错误: 1176:静态类型flash.events:MouseEvent与可能不相关的类型flash.display:MovieClip的值之间的比较。 (第9行) 1120:访问未定义的属性btn_rd。 (第27行) 1120:访问未定义的属性btn_rd。 (第43行) 1119:访问可能未定义的属性句柄通过静态类型String的引用单击。 (第17行) 1136:参数数量不正确。预期2.(第52行) 1120:访问未定义的属性handleRollOver。 (第35行) 1120:访问未定义的属性handleRollOut。 (第51行) 任何帮助都会非常感激。我已经工作了好几个小时但仍然找不到问题.... 谢谢!**Continued from Above** I am getting these errors upon playing through "Test Movie": 1176: Comparison between a value with static type flash.events:MouseEvent and a possibly unrelated type flash.display:MovieClip. (Line 9) 1120: Access of undefined property btn_rd. (Line 27) 1120: Access of undefined property btn_rd. (Line 43) 1119: Access of possibly undefined property handleClick through a reference with static type String. (Line 17) 1136: Incorrect number of arguments. Expected 2. (Line 52) 1120: Access of undefined property handleRollOver. (Line 35) 1120: Access of undefined property handleRollOut. (Line 51) Any help would be really appreciated. I have worked over this for hours and still cannot find a problem.... Thank you! **来自上方** 我在播放测试电影时遇到这些错误: 1176:值与静态类型flash.events:MouseEvent和可能不相关的类型flash.display:MovieClip之间的比较。 (第9行) 1120:访问未定义的属性btn_rd。 (第27行) 1120:访问未定义的属性btn_rd。 (第43行) 1119:访问可能未定义的属性句柄通过静态类型String的引用单击。 (第17行) 1136:参数数量不正确。预期2.(第52行) 1120:访问未定义的属性handleRollOver。 (第35行) 1120:访问未定义的属性handleRollOut。 (第51行) 任何帮助都会非常感激。我已经工作了几个小时但仍然找不到问题.... 谢谢! **Continued from Above** I am getting these errors upon playing through "Test Movie": 1176: Comparison between a value with static type flash.events:MouseEvent and a possibly unrelated type flash.display:MovieClip. (Line 9) 1120: Access of undefined property btn_rd. (Line 27) 1120: Access of undefined property btn_rd. (Line 43) 1119: Access of possibly undefined property handleClick through a reference with static type String. (Line 17) 1136: Incorrect number of arguments. Expected 2. (Line 52) 1120: Access of undefined property handleRollOver. (Line 35) 1120: Access of undefined property handleRollOut. (Line 51) Any help would be really appreciated. I have worked over this for hours and still cannot find a problem.... Thank you! Hi Flan, 我是一个AS 2.0开发者还没有开始关注3.0。 在2.0中你不会使用像这样的事件处理函数,在MovieClip类中建立行为。像on(rollover),on(rollout),on(press),on(release)等。在AS 2.0中你可以简单地告诉movieclip gotoAndStop(" _over"); Hi Flan, I''m an AS 2.0 developer haven''t started looking at 3.0 yet. In 2.0 you wouldn''t use event handler functions like this, behaviours are established in the MovieClip class. Like on(rollover), on(rollout), on(press), on(release) etc. In AS 2.0 you would simple tell the movieclip to gotoAndStop("_over"); 展开 | 选择 | Wrap | 行号 Hi Flan, 我是一个AS 2.0开发者还没有开始关注3.0。 在2.0中你不会使用像这样的事件处理函数这样,行为就在MovieClip类中建立。像on(rollover),on(rollout),on(press),on(release)等。在AS 2.0中你可以简单地告诉movieclip gotoAndStop(" _over"); Hi Flan, I''m an AS 2.0 developer haven''t started looking at 3.0 yet. In 2.0 you wouldn''t use event handler functions like this, behaviours are established in the MovieClip class. Like on(rollover), on(rollout), on(press), on(release) etc. In AS 2.0 you would simple tell the movieclip to gotoAndStop("_over"); 展开 | 选择 | Wrap | 行号 这篇关于按钮翻转/滚出问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-24 21:16