国产成人v爽在线免播放观看,日韩欧美色,久久99国产精品久久99软件,亚洲综合色网站,国产欧美日韩中文久久,色99在线,亚洲伦理一区二区

學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 電腦硬件知識 > 鍵盤鼠標(biāo) > flex鼠標(biāo)雙擊事件怎么實(shí)現(xiàn)

flex鼠標(biāo)雙擊事件怎么實(shí)現(xiàn)

時(shí)間: 沈迪豪908 分享

flex鼠標(biāo)雙擊事件怎么實(shí)現(xiàn)

  學(xué)習(xí)前端的同學(xué)你們知道怎么你們知道什么是flex 鼠標(biāo)雙擊事件嗎?不知道的話跟著學(xué)習(xí)啦小編一起來學(xué)習(xí)了解flex 鼠標(biāo)雙擊事件。

  flex 鼠標(biāo)雙擊事件的代碼

  <?xml version="1.0" encoding="utf-8"?>

  <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

  xmlns:s="library://ns.adobe.com/flex/spark"

  xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">

  <s:layout>

  <s:BasicLayout/>

  </s:layout>

  <fx:Script>

  <![CDATA[

  import flash.utils.getTimer;

  import mx.controls.Alert;

  private var delay:uint = 300;

  //前后兩次的單擊的時(shí)間

  private var firstClick:uint;

  private var lastClick:uint;

  protected function buttonId_mouseWheelHandler(event:MouseEvent):void

  {

  //buttonId.x = event.delta;

  if(firstClick == 0) {

  firstClick = getTimer();

  myText.text += "firstClick:"+firstClick+"\n";

  }else {

  lastClick = getTimer();

  myText.text += "lastClick:"+lastClick+"\n";

  if(lastClick-firstClick<delay) {

  myText.text += lastClick-firstClick+"\n";

  Alert.show("doubleClick");

  }

  firstClick = getTimer();

  }

  }

  ]]>

  </fx:Script>

  <fx:Declarations>

  <!-- 將非可視元素(例如服務(wù)、值對象)放在此處 -->

  </fx:Declarations>

  <!--<s:Button x="258" y="227" label="button" id="buttonId" mouseWheel="buttonId_mouseWheelHandler(event)"/>-->

  <s:TextArea id="myText" x="204" y="39"/>

  <s:Button x="258" y="227" label="button" id="buttonId" click="buttonId_mouseWheelHandler(event)"/>

  </s:Application>

鼠標(biāo)雙擊事件相關(guān)文章:

1.java鼠標(biāo)雙擊事件

2.怎么用JS實(shí)現(xiàn)鼠標(biāo)單擊與雙擊事件共存

3.如何設(shè)置鼠標(biāo)事件

4.win7鼠標(biāo)怎么設(shè)置單雙擊

5.鼠標(biāo)事件屬性詳解

2006633