How can I trace the movements of the mouse and ignore the movements not

I have a program that records the position of the mouse each 300 ms over a period of approximately 9 hour minute.

However, I need to know the mouse ONLY when it is not the same now previous position (sometimes the user stops talking. I don't want to save 5 minutes from the same position of the mouse)

Here is the original program

var drawTimer:Timer = new Timer (300, 500000);

drawTimer.addEventListener (TimerEvent.TIMER, timeSampler);

function timeSampler(evt:TimerEvent):void {}

{trace (mouseX, ', ' + mouseY);

}

}

I tried to create a variable to capture the position of the mouse at a specific time

var posMouseX:Number = mouseX;

var posMouseY:Number = mouseY;

and to add a conditional statement in the function

If ((mouseX! = posMouseX) & & (mouseY! = posMouseY))
{trace (mouseX, ', ' + mouseY) ;}}

but I do not do this correctly because I no more than getting every movement of the mouse or none

Can anyone suggest a better way to do it?

Thanks in advance

The code above can do what you want

you will get the values only when the mouse is moved, there will be no duplicate values

stage.addEventListener (MouseEvent.MOUSE_MOVE, onMove);

function onMove(e:MouseEvent):void

{

trace (mouseX + "," + mouseY);

Add your code here to save the values, for example:

myArray.push (mouseX, mouseY);

}

as the timer still counting down and on full it will delete the scene event listener.

var drawTimer:Timer = new Timer (300, 500000);

drawTimer.addEventListener (TimerEvent.TIMER_COMPLETE, timeSampler);

function timeSampler(evt:TimerEvent):void

{

stage.removeEventListener (MouseEvent.MOUSE_MOVE, onMove);

}

drawTimer.start ();

Tags: Adobe Animate

Similar Questions

  • How can I add the speaker notes to a slide using applescript?

    How can I add the speaker notes to a slide using applescript? I am able to create slides, add a title and bullet points, but when I try to add the speaker notes, it does not work.

    say thisSlide

    -set the title

    set the text of the object to the default title at "TITLE" element

    -create a bulleted list

    the text of the object of the item to the default body ¬

    "Bullet Point 1" & return & "Bullet Point 2" & return & "Bullet Point 3"»»

    -put the presenter notes

    ¬ the text value of the object of the presenter notes

    '' Here is my presenter notes.

    How can I add the speaker notes to a slide using applescript?

    Maybe like this:

    say thisSlide

    -put the presenter notes

    Set presenter notes to "here is my presenter notes.

    end say

  • MS Photo Gallery, how can I activate the "do not show this again" when the dialog box appears whenever I try to download a picture to another location?

    How can I activate the "do not show this again" when the dialog box appears whenever I try to download a picture to another location?

    The dialog box that appears frequently when I try to convert or download photos, shows the shadow of this question - I want to make it active until the times dialog box stops appearing I scroll the photo folders.

    Thank you

    I got the last part of what you wanted, which was simply not the message

    The key is that you have to allow this program through your windows firewall.

    Go to your look for the windows Firewall Control Panel,

    There should be a list to allow a program through windows firewall, look at the top left.

    If you feel safe doing this, vlc is not one that I would feel safe with, but to you, it has a function to browse to find the program to be added to your trusted list or access through your firewall.

    Still, it may give you a warning but could release the message?

  • How can I remove the tabs not closed.

    How can I close the tabs I have open but never had to close.

    To the right of the address bar, there is a flag with the number of open tabs. Touch it and see a list of all the tabs. Tap the three dots in the upper right and choose "close all tabs".

  • How can I trace the IP address of the machine source "remote shutdown"?

    Hello

    I have Activate Shutdown event log in my XP machine, however again, I'm not able to trace the IP on 15 XP workgroup computer that stop away from my machine.

    Is the command that could have been used: stop, f, r, m- t: 0

    Can anyone suggest me how to trace this IP of the remote machine?

    Or at least tell me what protocol or port shutdown.exe uses when it sends the command remotely.

    I captured ProcMon, Journal NetMon and wire-shark, yet, I have no idea to start my investigation.

    Help, please.

    Nothing of what you said is causing me to believe that a remote machine is responsible for - or - nothing to either exclude it.

    Recommend that you disable the administrator account to see if the actions continue or don't use is no secpol.msc:

    Local policies | Security options | Accounts: Administrator account status

    .. .set to disabled.

    You are welcome.

    You can also rename the account using accounts: Rename administrator account

    ----------------------

    In addition, you can go to local policies | The audit policy | Audit system events

    and the two checkboxes for the success and failure

    In this way, newspapers will be created with details about what you can see in the case where the Viewer. The Windows logs. Security

    ------------------------

    In addition, if you check on the user rights assignment section, it is useful as things "Force shutdown from a remote system" - you can remove administrators from there.

  • How can I get the file NOT menu to display in the title bar?

    For Firefox I know I can go in: config and set "browser.draw.tabs.defaultDrawInTitlebar" and "browser.draw.tabs.DrawInTitlebar", false, but I have no idea on Thunderbird because I don't know how to access to the about: config page, or if it still exists.

    You can reach everything: config Options > Advanced Options > General > Config Editor.

  • How can I trace() the length of a table outside the onLoad()

    Hello evryone, I have a question that I need to get the length of an array, but outside the onLoad()

    Here is my code:

    var O:XML = new XML();
    O.ignoreWhite = true;
    O.onLoad = {function (success)}

    var photos: Array = this.firstChild.childNodes;
    _root. PanelH = photos.length * 200;
    trace (PanelH);
    };
    trace (PanelH);
    O.Load ("VideosBank.xml");

    I shure is possible, but I can't find

    If the table you're talking about is the photos, then for access from outside the function you have to declare it outside the function.

    var photos: Array;

    O.onLoad = {function (success)}

    pictures = this.firstChild.childNodes;
    _root. PanelH = photos.length * 200;
    trace (PanelH);
    };

    You will not be able to trace something of significant long until after the onLoad function has completed table however.

  • How can I adjust the toolbar not always be at the top? __

    I can't stand my new computer.  It is not for lack of the computer.  This is Windows 7.

    EVERY previous version of Windows allowed the user to uncheck "keep the taskbar above other windows" in the taskbar properties.  Windows 7 has removed this feature, which was one of the first things I've ever done on all Windows machines I've ever worked, dating back to 1989.

    Hide automatically is NOT the answer.  Please Microsoft - remedy!

    This is an interesting thread.

    http://social.answers.Microsoft.com/forums/en-us/vistagaming/thread/219e43ad-303C-4CD5-A30B-8780d608c45f

    HTH

    If I brought you joy, vote! If I answered your question, click, propose as answer! > WT

  • How can I change the text (not the form fields) in the forms of the documents I created in LiveCycle ES pre?

    I can't edit it in Adobe Acrobat X or DC (it gives me an error message saying that I need to edit in LiveCycle Designer), but when I try to use the new LiveCycle Designer ES4 the function of editing text appears in gray.

    Help, please!

    You must make all editions of text on a form in Designer in the designer. It is therefore more a regular PDF, but rather an XML contained in the PDF structure. So you can change is no longer the text form in Acrobat.

  • How can I change the language (not the spell, but the system) in Thunderbird?

    I installed Thunderbird on a second pc, and now it is in English. I want to change this language (System) in Dutch. This isn't on the spell checker, but only the language used in the application

    https://www.Mozilla.org/en-us/Thunderbird/all/

  • Support center XP has a redirect virus how can I get rid of him? IE8 and Google redirects but not on AOL

    I tried the plan of TDSS killer, MS esentials, McAfee, AVG, Reg Cure, MalWareBytes, AOL pc checkup to name a few, but still have the current redirect.

    DennisDeVries (snoopy055) Hi,

    1. what website it redirects to?

    2. did you of recent changes on the computer?

    3. where there any infection detected and deleted after execution of all tests on the computer?

    See the links below and check if it helps.

    What is the browser hijacking?

    http://www.Microsoft.com/protect/terms/hijacking.aspx

     

    Difficulty of your web browser hijacked

    http://www.Microsoft.com/security/spyware/browserhijacking.aspx

  • How can I separate two movies on the same timeline?

    I use the first elements 11 but that you him have not used for quite awhile so I forgot much of what I learned. So here's my question: I have two movies on the same timeline. How can I separate them. In other words, how can I move one on the timeline, so it won't confuse my editing on the other? But better yet - how can I make a movie on the timeline completely and change it later as a separate film. I have really four shorts - a minute long. I would like to change separately, with a new file name. I don't know how to do that more.

    Tommyvincent

    I did some research on the issues that you have raised in this thread.

    Comments...

    1.

    After you import a video into the assets of the project, you can right click it, select Rename. This file when you drag the timeline will have the new name.

    But...

    If you import a video into the assets of the project, drag it to the timeline, right-click clip timeline, select Rename from the pop-up, then the calendar file will be renamed but not its thumbnail in the active project. You rename this project asset vignette to match if you want. However, these traces yet files renamed to the original with original filename to its disk hard saving location.

    2.

    All down your Timeline... one way would be to export the clip selectively if she was included in the Group of the clips on the Timeline. Two conditions for

    a. change box, set the gray tabs on the work area bar to expand on the segment to export

    and

    (b) in the field of export, have a check mark next to the option "Action work area Bar only.

    3.

    If you have made a clip in the active project, double clicked to open the preview window, you can cut the clip with the points put in and Set Out and create "subitems" with new names in the active project. These "subitems" would be part of the media of this project which could be moved to the timeline when necessary.

    Please review and determine if all the foregoing is in the right direction for what you want to do.

    Thank you.

    RTA

  • How can I fix the icons who are unable to move the bar to the add-on?

    How can I fix the icons who are unable to move the bar to the add-on?

    It didn't help me, but it was a good try. I found an extension called U I 1.4.4 Fixer who did most of what I was looking for. Thanks for answering my question so quickly Cor - el.

  • How can I configure the folder in which a movie TS file stores the report?

    How can I configure the folder in which a movie TS file stores the report?

    Thank you

    Too bad... I found it

    Thank you

  • How can I change the Dutch version of movie maker 5.1 for XP in English?

    How can I change the Dutch version of movie maker 5.1 for XP in English?

    Hi peterrubin,

    You use Windows Movie Maker 5.1 or 2.1?

    If you are referring to Windows Movie Maker 2.1, you can download & install this update:

    Windows Movie Maker 2.1 Multilingual User Interface Packs


    Reference:
    download Movie Maker

    Hope the helps of information.

Maybe you are looking for

  • Updated Firefox updated to its latest version 12.0. Now my plugin Adobe Flash freezes and blocks all websites when it is turned on even if it's the latest version.

    Today updated Firefox updated to its latest version 12.0. Immediately after the update, I couldn't load most of the sites. The web browser would just freeze. I have determined that the culprit is the Adobe Flash Plugin, however; even with the latest

  • HISTORY, CACHES, COOKIES

    I have a HP Pavilion Enterainment Notebook PC tx1219us. I'd work on. When I came back the story had been changed to custom settings. they had checked the caches, cookies. also they had checked remember cookies until they expire. I want to know is if

  • How about a utility to create a play list?

    Sandisk may not give us a simple utility to create playlists? I tried the instructions, but they do not work. I miss drag my playlists of WMP to my Clips and BAM! fact. This jam thing is a true loser. SanDisk help us? BTW, wy not simply use our phone

  • Update Windows 7 broken

    Since Microsoft decided to cram Windows10 down our collective throats, my update on Win7 function no longer works.  I tried all the possible solutions for this problem, but so far nothing including works clean reinstallation of the software. Is the o

  • PIN delivery confirmation

    Hello Is it possible to get a notification that my Pin message has been delivered? Or should I query all messages and check their articles for Message.Status.TX_DELIVERED? Best regards.