Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 4 of 4

Thread: custom item for tracking XY joystick/mouse movements

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2005
    Posts
    3,328
    I think this ought to be do-able, especially if you have a javascript programmer who is will to help you. You can tell the programmer that if they can get the script to work in IE then it ought to work just fine in MediaLab. You need to tell them that the data need to be passed like form data using the method=post command. Because you could have a LOT of variables if you are sampling once per second (or even more frequently), you might consider having the data merged into fewer variables which can be sorted out later. E.g., instead of coordinates x=457, y=1036, at time 3050ms representing 3 separate variables, you could have this be a single string variable with a value of "457-1036-3050" or something like that.

    See also: www.empirisoft.com/support/showthread.php?t=536

    And ps., I'll be happy to help if you need it. See how far you can get with the javascript and then let me know if you run into any trouble with it. Sounds like a great custom item!

  2. #2
    Join Date
    May 2006
    Posts
    16
    Thanks! I have forwarded your message to the programmer and he has indicated that he is thinking along the same lines. He sent me a prototype that worked ok, except for one problem - the javascript did not sample the position at the same intervals of time. I had asked him to try a 15-16 ms resolution, but the program wrote data anywhere between every 16 ms to 64 ms over the course of the sampling. I have asked him to try a 100 ms resolution - hopefully that should work!

  3. #3
    Join Date
    Nov 2005
    Posts
    3,328
    This code sample might help--it's a simple example of some javascript rt code. Never used it myself but thought it might help in your case.
    Attached Files Attached Files

Similar Threads

  1. Custom item - Autosum
    By akipaki_sf5 in forum MediaLab Older Versions: Sharing Area
    Replies: 16
    Last Post: 12-06-2008, 02:31 PM
  2. Blank screen on custom item
    By njsporn in forum MediaLab Older Versions: Troubleshooting
    Replies: 1
    Last Post: 07-27-2007, 07:17 AM
  3. Create a custom instruction item?
    By jarvis24 in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 07-23-2007, 10:31 AM
  4. Hiring a programmer for a custom item?
    By jarvis24 in forum MediaLab Older Versions: How Do I...
    Replies: 3
    Last Post: 11-17-2006, 08:26 AM
  5. custom item with background image
    By rkozink in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 05-04-2006, 01:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •