佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1582|回复: 9

[急急急]请问我要在那里加 on (release)

[复制链接]
发表于 26-3-2009 01:44 PM | 显示全部楼层 |阅读模式
请问我要在那里加
on (release) {
        getURL("http://www.xxxx.html", "_self");
}


我不知道那里加。

homeButton.addEventListener(MouseEvent.MOUSE_OVER, homeMouseOver);
homeButton.addEventListener(MouseEvent.MOUSE_OUT, homeMouseOut);

ourworkButton.addEventListener(MouseEvent.MOUSE_OVER, ourworkMouseOver);
ourworkButton.addEventListener(MouseEvent.MOUSE_OUT, ourworkMouseOut);

aboutusButton.addEventListener(MouseEvent.MOUSE_OVER, aboutusMouseOver);
aboutusButton.addEventListener(MouseEvent.MOUSE_OUT, aboutusMouseOut);

contactusButton.addEventListener(MouseEvent.MOUSE_OVER, contactusMouseOver);
contactusButton.addEventListener(MouseEvent.MOUSE_OUT, contactusMouseOut);

buttonButton.addEventListener(MouseEvent.MOUSE_OVER, buttonMouseOver);
buttonButton.addEventListener(MouseEvent.MOUSE_OUT, buttonMouseOut);

function homeMouseOver (e:MouseEvent):void {
        homeText.gotoAndPlay("fadetowhite");
        homeRO.addEventListener(Event.ENTER_FRAME, homeAnimateUp);
}
function homeMouseOut (e:MouseEvent):void {
        homeText.gotoAndPlay("fadetoblack");
        homeRO.addEventListener(Event.ENTER_FRAME, homeAnimateDown);
        homeRO.removeEventListener(Event.ENTER_FRAME, homeAnimateUp);

}

function homeAnimateUp (e:Event):void {
        homeRO.y -= homeRO.y/4;
        if (homeRO.y <= 0) {
                homeRO.y=0;
                homeRO.removeEventListener(Event.ENTER_FRAME, homeAnimateUp);
        }
}



function homeAnimateDown (e:Event):void {
        homeRO.y += 33.5/4;
        if (homeRO.y >= 33.5) {
                homeRO.y=33.5
                homeRO.removeEventListener(Event.ENTER_FRAME, homeAnimateDown);
        }
}

function ourworkAnimateUp (e:Event):void {
        ourworkRO.y -= ourworkRO.y/4;
        if (ourworkRO.y <= 0) {
                ourworkRO.y=0;
                ourworkRO.removeEventListener(Event.ENTER_FRAME, ourworkAnimateUp);
        }
}

function ourworkAnimateDown (e:Event):void {
        ourworkRO.y += 33.5/4;
        if (ourworkRO.y >= 33.5) {
                ourworkRO.y=33.5
                ourworkRO.removeEventListener(Event.ENTER_FRAME, ourworkAnimateDown);
        }
}

function ourworkMouseOver (e:MouseEvent):void {
        ourworkText.gotoAndPlay("fadetowhite");
        ourworkRO.addEventListener(Event.ENTER_FRAME, ourworkAnimateUp);
}

function ourworkMouseOut (e:MouseEvent):void {
        ourworkText.gotoAndPlay("fadetoblack");
        ourworkRO.addEventListener(Event.ENTER_FRAME, ourworkAnimateDown);
        ourworkRO.removeEventListener(Event.ENTER_FRAME, ourworkAnimateUp);
}

function aboutusAnimateUp (e:Event):void {
        aboutusRO.y -= aboutusRO.y/4;
        if (aboutusRO.y <= 0) {
                aboutusRO.y=0;
                aboutusRO.removeEventListener(Event.ENTER_FRAME, aboutusAnimateUp);
        }
}

function aboutusAnimateDown (e:Event):void {
        aboutusRO.y += 33.5/4;
        if (aboutusRO.y >= 33.5) {
                aboutusRO.y=33.5
                aboutusRO.removeEventListener(Event.ENTER_FRAME, aboutusAnimateDown);
        }
}

function aboutusMouseOver (e:MouseEvent):void {
        aboutusText.gotoAndPlay("fadetowhite");
        aboutusRO.addEventListener(Event.ENTER_FRAME, aboutusAnimateUp);
}

function aboutusMouseOut (e:MouseEvent):void {
        aboutusText.gotoAndPlay("fadetoblack");
        aboutusRO.addEventListener(Event.ENTER_FRAME, aboutusAnimateDown);
        aboutusRO.removeEventListener(Event.ENTER_FRAME, aboutusAnimateUp);
}

function contactusAnimateUp (e:Event):void {
        contactusRO.y -= contactusRO.y/4;
        if (contactusRO.y <= 0) {
                contactusRO.y=0;
                contactusRO.removeEventListener(Event.ENTER_FRAME, contactusAnimateUp);
        }
}

function contactusAnimateDown (e:Event):void {
        contactusRO.y += 33.5/4;
        if (contactusRO.y >= 33.5) {
                contactusRO.y=33.5
                contactusRO.removeEventListener(Event.ENTER_FRAME, contactusAnimateDown);
        }
}

function contactusMouseOver (e:MouseEvent):void {
        contactusText.gotoAndPlay("fadetowhite");
        contactusRO.addEventListener(Event.ENTER_FRAME, contactusAnimateUp);
}

function contactusMouseOut (e:MouseEvent):void {
        contactusText.gotoAndPlay("fadetoblack");
        contactusRO.addEventListener(Event.ENTER_FRAME, contactusAnimateDown);
        contactusRO.removeEventListener(Event.ENTER_FRAME, contactusAnimateUp);
}

function buttonAnimateUp (e:Event):void {
        buttonRO.y -= buttonRO.y/4;
        if (buttonRO.y <= 0) {
                buttonRO.y=0;
                buttonRO.removeEventListener(Event.ENTER_FRAME, buttonAnimateUp);
        }
}

function buttonAnimateDown (e:Event):void {
        buttonRO.y += 33.5/4;
        if (buttonRO.y >= 33.5) {
                buttonRO.y=33.5
                buttonRO.removeEventListener(Event.ENTER_FRAME, buttonAnimateDown);
        }
}

function buttonMouseOver (e:MouseEvent):void {
       
        buttonText.gotoAndPlay("fadetowhite");
        buttonRO.addEventListener(Event.ENTER_FRAME, buttonAnimateUp);
}

function buttonMouseOut (e:MouseEvent):void {
        buttonText.gotoAndPlay("fadetoblack");
        buttonRO.addEventListener(Event.ENTER_FRAME, buttonAnimateDown);
        buttonRO.removeEventListener(Event.ENTER_FRAME, buttonAnimateUp);
}



谢谢先。
回复

使用道具 举报


ADVERTISEMENT

发表于 26-3-2009 01:50 PM | 显示全部楼层
原帖由 一团饭 于 26-3-2009 01:44 PM 发表
请问我要在那里加
on (release) {
        getURL("http://www.xxxx.html", "_self";
}


我不知道那里加。

homeButton.addEventListener(MouseEvent.MOUSE_OVER, homeMouseOver);
homeButton.addEventListener ...


create 一个actionscript layer..
然后再paste 在 script box 里
如果没错
回复

使用道具 举报

 楼主| 发表于 26-3-2009 02:01 PM | 显示全部楼层

回复 2# ahmen9 的帖子

可是这个已经是actionscript layer。所以要再加一个?
回复

使用道具 举报

发表于 26-3-2009 02:22 PM | 显示全部楼层
你的button在那个layer?
在actionscript layer create timeframe..然后highlight timeframe
再去script box paSTE CODE..
回复

使用道具 举报

 楼主| 发表于 26-3-2009 02:39 PM | 显示全部楼层
那就是说不是在我在前面paste一大段那里咯,
是需要create new layer?button 全部在同一个layer。
不是分开layer。如果我分开是不是比较容易?
回复

使用道具 举报

 楼主| 发表于 26-3-2009 02:42 PM | 显示全部楼层
一直出现
1087: Syntax error: extra characters found after end of program.
回复

使用道具 举报

Follow Us
发表于 26-3-2009 02:46 PM | 显示全部楼层
不是啦
actionscript layer是不能有图画的..
就单单paste script就好
你的Button跟script里头的全部是一样的variable?

[ 本帖最后由 ahmen9 于 26-3-2009 02:48 PM 编辑 ]
回复

使用道具 举报

 楼主| 发表于 26-3-2009 03:13 PM | 显示全部楼层

回复 7# ahmen9 的帖子

script 和 button 分开layer。刚才我试看把button分开,
是可以,不过这样就没有了effect。
对不起我的flash不是很expect。
回复

使用道具 举报


ADVERTISEMENT

发表于 27-3-2009 08:54 AM | 显示全部楼层
请樓主按 F1 搜索怎么使用 click 或 mouse down
以上很明确的显示这些都只是 mouse over 和 mouse out 的事件
回复

使用道具 举报

 楼主| 发表于 27-3-2009 06:11 PM | 显示全部楼层

回复 9# super-tomato 的帖子

谢谢。我昨晚已经解决了。
回复

使用道具 举报

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

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


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

GMT+8, 14-12-2025 09:45 PM , Processed in 0.145264 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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