|
查看: 1582|回复: 9
|
[急急急]请问我要在那里加 on (release)
[复制链接]
|
|
|
请问我要在那里加
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);
}
谢谢先。 |
|
|
|
|
|
|
|
|
|
|
发表于 26-3-2009 01:50 PM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|

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

楼主 |
发表于 27-3-2009 06:11 PM
|
显示全部楼层
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|