Blog

如何用鼠标左右键控制场景的切换

我有三个场景1,2,3,如何能够实现点击鼠标左键使场景切换从1->2->3,点击右键实现场景切换从3->2->1。 如果用按钮实现了这个功能,那很容易的,但如果不想看到按钮,那就只能用鼠标左右键来控制了!下面给大伙看下我的解决方法:
代码: 每一个场景第一桢写: fscommand("showmenu", "false");//隐藏鼠标右键 _root.onEnterFrame = function() { if (Key.isDown(2)) { //点击鼠标左键时 nextScene(); //到下一场景 } if (Key.isDown(1)) { //点击鼠标右键时 prevScene(); //到上一场景 } };

Words translated by CCJK

146,096,379

Request a call or contact us

  •  

    Call ccjk.support for professional assistance

  •  

    Click Here to leave us a message and be as detailed as possible.

We are Certified

Our Client Satisfaction

rating for previous quarte

4.00
  •  
    Inquiry Form

    Please take few minutes to fill
    inquiry form and get Free Quote

  •  
    Request a Call

    Click to receive Free Call, Our
    Representative will contact you

  •  
    Leave a Message

    Please leave us a message and
    be as detailed as possible

Over 95% of our clients recommend our language services to others


Copyright © CCJK Technologies Co., Ltd. 2000-2017. All rights reserved.
TOP