主题:  询问一下!一下AS意思是模拟CTRL+C 和CTRL+V

dearsammi

职务:普通成员
等级:1
金币:0.0
发贴:103
#12002/12/19 0:13:51
询问一下!一下AS意思是模拟CTRL+C 和CTRL+V
但是为什么换成其它键就不可以了呢!
那么下面AS又有什么意思呢!
比如说
Key.isDown (Key.CONTROL) and Key.isDown (67)
改成
Key.isDown (Key.CONTROL) and Key.isDown (77)

_root.onEnterFrame = function ()
{
    if (Key.isDown (Key.CONTROL) and Key.isDown (67))
    {
        if (Selection.getFocus () != null)
        {
            copy = Selection.getFocus ();
        }
    } else if (Key.isDown (Key.CONTROL) and Key.isDown (86))
    {
        if (Selection.getFocus () != null)
        {
            _root[Selection.getFocus ()] = eval (copy) + eval (copy);
        }
    }
};



5D荣誉版主

职务:普通成员
等级:2
金币:1.0
发贴:515
#22002/12/19 16:07:13
Key对象没有必要onEnterFrame了,本身key对象就可以add listener。
可以参照:
http://asp.6to23.com/mmommo/x-woods/tutorial/key.swf