精品丰满熟女一区二区三区_五月天亚洲欧美综合网_亚洲青青青在线观看_国产一区二区精选

  • <menu id="29e66"></menu>

    <bdo id="29e66"><mark id="29e66"><legend id="29e66"></legend></mark></bdo>

  • <pre id="29e66"><tt id="29e66"><rt id="29e66"></rt></tt></pre>

      <label id="29e66"></label><address id="29e66"><mark id="29e66"><strike id="29e66"></strike></mark></address>
      學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 電腦硬件知識 > 鍵盤鼠標(biāo) > flex鼠標(biāo)雙擊事件怎么實(shí)現(xiàn)

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

      時間: 沈迪豪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;

        //前后兩次的單擊的時間

        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