主题:  出现了BUG了 帮忙解答

tearman

职务:普通成员
等级:1
金币:0.0
发贴:47
#12004/8/25 17:16:53

Flash 动画

我的源代码:
_root.jt._visible = false;
_root.jt._x = -500;
_root.jt._y = -500;
_root.menu1.dao.onPress = function() {
    xxx = _root.menu1._x;
    yyy = _root.menu1._y;
    _root.menu1.onEnterFrame = function() {
        if (_root.jt._visible == true) {
            startDrag(_root.menu1);
        }
    };
};
_root.menu1.dao.onRelease = function() {
    stopDrag();
    xxxx = _root.menu1._x;
    yyyy = _root.menu1._y;
    n1 = xxx-xxxx;
    n2 = yyy-yyyy;
    _root.menu1.onEnterFrame = function() {
        if (xxxx<xxx) {
            _root.menu1._x += ((xxxx-(n1/10))-_root.menu1._x)/30;
        }
        if (yyyy<yyy) {
            _root.menu1._y += ((yyyy-(n2/10))-_root.menu1._y)/30;
        }
        if (xxxx>xxx) {
            _root.menu1._x += ((xxxx-(n1/10))-_root.menu1._x)/30;
        }
        if (yyyy>yyy) {
            _root.menu1._y += ((yyyy-(n2/10))-_root.menu1._y)/30;
        }
    };
};
_root.menu1.dao.onRollOver = function() {
    Mouse.hide();
    _root.jt._visible = true;
};
_root.menu1.dao.onRollOut = function() {
    Mouse.show();
    _root.jt._visible = false;
    _root.jt._x = -500;
    _root.jt._y = -500;
};
delete xxxx;
delete yyyy;
delete xxx;
delete yyy;
delete n1;
delete n2;



Immm_5d

职务:普通成员
等级:1
金币:0.0
发贴:41
#22004/8/25 20:54:58
if(_root._xmouse>***&&........){delete this.onEnterFrame ........}
请试一下~我现在没FLASH~没法试


我是一条无忧无虑的鱼,每天徜徉在广阔的大海,和日月为伴,和星星嬉戏,从来不知愁滋味。直到有一天,我遇到了他---众生的邱比特,我知道他不可能属于我一个人,但是一颗心就这样遗失在他的身上。从此,我变成了现在的我,不会游泳的鱼……

御林军

职务:普通成员
等级:1
金币:0.0
发贴:42
#32004/8/26 9:40:38
问题应该出在这里:_root.menu1.dao.onRelease

onRelease只是表示在按钮范围内松开鼠标,如果在按钮范围外就不管了,你把方块拖到场景边以后,如果继续拖动,再松开鼠标,这表示你是在按钮区之外放开的,这种情况在程序里没有出现,FLASH不知道怎么处理,当你把鼠标再次直到场景内的时候,按钮还以为你没有松开过鼠标,因此继续拖动,出现了这种情况

releaseOutside表示在按钮范围外部放开鼠标的事件,应该有这个判断



tearman

职务:普通成员
等级:1
金币:0.0
发贴:47
#42004/8/26 10:31:18
能不能告诉我这个判断语句的格式怎么写:

如果,属表指针没在按钮上,那么......



blusemic

职务:普通成员
等级:1
金币:2.0
发贴:119
#52004/8/26 11:33:39
if(_root._xmouse>***&&........){
stopDrag();
}
这样也可能可以



tearman

职务:普通成员
等级:1
金币:0.0
发贴:47
#62004/8/26 12:03:52
if(_root._xmouse>***&&........){
stopDrag();
}
什么意思不明不白呀?
还有, outside 那个判断句加在哪???怎么加呀????
新手勿怪!!!!



tearman

职务:普通成员
等级:1
金币:0.0
发贴:47
#72004/8/26 13:49:05



tearman

职务:普通成员
等级:1
金币:0.0
发贴:47
#82004/8/26 14:59:34



tearman

职务:普通成员
等级:1
金币:0.0
发贴:47
#92004/8/26 17:50:12
版主,别睡了快醒醒帮帮忙啊!!!!!!!!!!!!!!!!!!!!!!!!!!



5DFlash Designer

职务:版主
等级:3
金币:10.0
发贴:1306
#102004/8/27 15:26:19
这不是desing的问题,帮你装一下



UndeadCraft

职务:版主
等级:4
金币:10.0
发贴:1993
#112004/8/30 8:43:23
整个比较乱.startDrag不要写在onEnerFrame里面.你再试一下.拖出FLASH界限之后本来就会有一些问题的.