查看: 1892|回复: 5
|
又有新问题了。。。。请去第4楼....check button的问题
[复制链接]
|
|
我用做配对游戏,有两个问题,一个一个问题一个scene
第一个scene时没问题,但是在第二scene时就出现问题了...
coding:
建立两个元件,第一元件
onClipEvent (mouseDown){
if(this.hitTest(_root._xmouse,_root._ymouse,false)){
this.swapDepths(1);
startDrag(this,true);
}
}
onClipEvent (mouseUp) {
stopDrag();
if(this.hitTest(_root.b2)){
_x=_root.tx2;
_y=_root.ty2;
}else{
_x=_root.x1;
_y=_root.y1;
}
}
第二元件
onClipEvent (mouseDown){
if(this.hitTest(_root._xmouse,_root._ymouse,false)){
this.swapDepths(1);
startDrag(this,true);
}
}
onClipEvent (mouseUp) {
stopDrag();
if(this.hitTest(_root.b1)){
_x=_root.tx1;
_y=_root.ty1;
}else{
_x=_root.x2;
_y=_root.y2;
}
}
在第一个 frame
if(!started){
x1=a1._x;
y1=a1._y;
x2=a2._x;
y2=a2._y;
tx1=b1._x;
ty1=b1._y;
tx2=b2._x;
ty2=b2._y;
started=true;
}
stop();
为什么在第二个时第一个的元件依然会出现。。。???
[ 本帖最后由 不做天使 于 15-4-2007 02:10 PM 编辑 ] |
|
|
|
|
|
|
|
发表于 13-4-2007 09:55 PM
|
显示全部楼层
可以在 scene 2 的第一个 frame 放
removeMovieClip(元件一);
removeMovieClip(元件二); |
|
|
|
|
|
|
|
楼主 |
发表于 15-4-2007 01:45 PM
|
显示全部楼层
|
|
|
|
|
|
|
楼主 |
发表于 15-4-2007 02:05 PM
|
显示全部楼层
新的问题。。。。
做了一个check答案的button...
为什么永远都显示出错呢??
button check 的as
on (release) {
if (_root.a1.c == 1 && _root.a2.c == 1 && _root.a3.c == 1 && _root.a4.c == 1 && _root.a5.c == 1&& _root.a6.c == 1) {
gotoAndStop(3);
} else {
gotoAndStop(2);
}
}
这是在mc的as,
onClipEvent (mouseDown) {
if (hitTest(_root._xmouse, _root._ymouse)) {
startDrag(this, true);
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root.b1)) {
this._x = 145;
this._y = 130;
stopDrag();
c = 1;
} else if (this.hitTest(_root.b2)) {
this._x = 160;
this._y = 180;
stopDrag();
c = 0;
} else if (this.hitTest(_root.b3)) {
this._x = 180;
this._y = 220;
stopDrag();
c = 0;
} else if (this.hitTest(_root.b4)) {
this._x = 270;
this._y = 240;
stopDrag();
c = 0;
} else if (this.hitTest(_root.b5)) {
this._x = 140;
this._y = 270;
stopDrag();
c = 0;
} else if (this.hitTest(_root.b6)) {
this._x = 270;
this._y = 300;
stopDrag();
c = 0;
} else {
this._x = 60;
this._y = 70;
stopDrag();
c = 0;
}
}
底是那里出错了呢??
|
|
|
|
|
|
|
|
发表于 7-6-2017 11:54 PM
|
显示全部楼层
本帖最后由 123JO123 于 3-9-2017 07:24 PM 编辑
?? |
|
|
|
|
|
|
|
发表于 3-9-2017 07:22 PM
|
显示全部楼层
本帖最后由 123JO123 于 3-9-2017 07:24 PM 编辑
wong
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|