佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1882|回复: 4

請問這AS2按鈕的寫法要如何在AS3中實現

[复制链接]
发表于 27-5-2009 09:34 AM | 显示全部楼层 |阅读模式
  1. on (rollOver) {
  2. this.gotoAndPlay(2);
  3. }
  4. on (rollOut) {
  5. this.gotoAndPlay(11);
  6. }
  7. on (release) {
  8. _root.gotoAndStop(1);
  9. }
复制代码


這個是應用在 movie clip 自制按鈕,有 roll out 效果的

但是到 AS3.0   “_root.gotoAndStop(1)” 就不能用了,請問在 AS3.0 要怎么寫呢? 謝謝
回复

使用道具 举报


ADVERTISEMENT

发表于 27-5-2009 01:43 PM | 显示全部楼层
在 Flash 中按 F1 參考 Actionscript 字典的例子
回复

使用道具 举报

发表于 31-5-2009 09:24 AM | 显示全部楼层
ttt.addEventListener(MouseEvent.ROLL_OUT, onRollOut_it);
ttt.addEventListener(MouseEvent.ROLL_OVER, onRollOver_it);
ttt.addEventListener(MouseEvent.CLICK, onClick_it);
function onRollOut_it(e:MouseEvent):void {

ttt.gotoAndPlay(11);
}
function onRollOver_it(e:MouseEvent):void {

ttt.gotoAndPlay(2);
}
function onClick_it(e:MouseEvent):void {

ttt.gotoAndStop(1);
}
回复

使用道具 举报

发表于 31-5-2009 09:25 AM | 显示全部楼层

回复 1# sora86 的帖子

回复

使用道具 举报

 楼主| 发表于 1-6-2009 12:39 PM | 显示全部楼层
謝謝

回去研究
回复

使用道具 举报

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

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


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

GMT+8, 11-12-2025 03:15 AM , Processed in 0.143585 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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