Touch examples of events?

I tried to get the touch events (touchstart, touchmove, touchstart) to work with my animation on board, but so far without success. Anyone has been able to do, and if so, are there examples or code can you tell me? My Google search was in vain until this point.

Hi Jack!

This is a key for a simple event drag / drop of a square &:

I created a red square on the edge, called 'rect', size 140x140px and added the JQuery code on stage (event: CompositionReady):

SYM. $("rect") .css ({"left margin": "'-70px", "margin-top": "-70px"});

$(document) .bind ("touchstart touchmove", Function {})

e.preventDefault ();

var x = e.originalEvent.touches [0] .pageX;

var y = e.originalEvent.touches [0] .pageY;

SYM. $("rect") .css ({top: there, on the left: x});

});

Explanation:

It is to focus the slide, you should always set top of margin and left margin the negative half of the size object

SYM. $("rect") .css ({"left margin": "'-70px", "margin-top": "-70px"});

the function starts on the event "touchmove touchstard", that is when you type something (= touchstart) and try to move (= touchmove)

$(document) .bind ("touchstart touchmove", Function {})

Disable scrolling by preventing the default behavior of the key

e.preventDefault ();

assign to y and variable x the position of your finger, if you keep it pressed

var x = e.originalEvent.touches [0] .pageX;

var y = e.originalEvent.touches [0] .pageY;

attribute to the element with the ID 'rect' x, y coordinates stored in the previous variables

SYM. $("rect") .css ({top: there, on the left: x});

});

To do that I started to learn how to handle the touchevents of this excellent tutorial: http://popdevelop.com/2010/08/touching-the-web/

You can get the file Edge here: http://www.terredainventare.it/Prova.zip and test the composition with safari mobile here www.terredainventare.it/touch/Prova.html

I hope this helps!

Davide

Tags: Edge Animate

Similar Questions

  • Basic structure example-Help event

    Hi all

    I'm programming in Labview for two months... starter... I have a desire to use a structure of the event in my case, so I started with examples and had a problem understanding.

    It's the example, I don't speak labview\examples\general\dynamicevents.llb\dynamicallr for events.vi registry

    (1) the blockdiagram outside can while loop, you please explain the three data entries to the propertis of thrre under the registry event property node?

    (2) why use shift registers to send events to registry in while loop? Why dosent a tunnel works in this case?

    (3) within the structure of event event why do we still include "Event log" property node and how to reference its properties?

    (4) in the while loop, event 1 mouse down event, mouse to the bottom of the property is left free, but moving the mouse was connected to sone refernce, how it works?

    I would be happy if can refer me some books on event structures

    Thank you

    Concerning

    Neo

    NEO6 wrote:

    (1) at the beginning, when I hit the track, that all the events available for the structure of the event in time loop? (If I understand correctly, all of the events associated with the controls on the front panel and move the mouse exists since they are registered outside of the loop. Am I right?)

    Technically, all events are available.  It's just a question of what objects will cause events.  Initially, the mouse event move is registered to a NULL VI.  Since it is not one of those around, the event will not happen.  The mouse upwards and the mouse downwards have associated all the controls on the front panel.  If the mouse went upwards or downwards on a control, the event could trigger.

    NEO6 wrote:

    (2) as well as all the events of pannelcontrol, there are also moving a mouse event is already registered outside the while loop and sent to the structure of the event, but once again in the "Mouse down" event, we again record the event of "moving the mouse" and store in the shift register.  What is the difference between check-in outside loop while and inscription inside the structure of the event "mouse down"?   If registration within a structure of event is the event update already existing or the empty position for the structure of the event?

    We simply update object can cause the event.  Inside the mouse down event, we say that the current VI can cause an event mouse move.

  • GoodCitizen example Orientation events in Simulator v1

    good, someone at - it actually get GoodCitizen to work with landscape/portrait changes in the Simulator?

    first of all, I had to add 'true'.

    at the helm - descriptor.xml to get even the events of the direction received by the app.

    not a promising start for an application 'example '.

    If you start the app in landscape mode, then perform an angular upsweep of the lower right

    It rotates, but creates a small greyish window on the bottom of the screen and you do not

    See the cube rotating.

    If you re-coup from lower right, that he returned to landscape mode and things/cube work once again.

    If you start the application in portrait mode, the screen is totally black, no small greyish window even.

    a blow to turn you receives in a mode of work beautiful landscape.

    I put a fprintf (stderr, "surface_width = %d, height=%d\n"...)

    in the function resize() and regardless of orientation you * always * get a surface width

    of 1024 and a height of 600. It seems wrong to.

    Thus, anyone actually get this GoodCitizen be good with orientation in the simulator of the v1?

    Good afternoon dnp.

    A few notes on your desktop.

    1. you seem to have a fairly old version of things. Please go to this URL and download the latest SDK and Simulator

    https://bdsc.webapps.BlackBerry.com/native/download/

    Your Simulator should be 2.0.0.7971 (BlackBerryPlayBookSimulator-Installer-2.0.0-7971-Win-201202221232.exe) and SDk should be thus 7971 (installer-bbndk-2.0.0-win32-7971-201202171813-201202181253.exe installer).

    2. I suppose that you created a GoodCitizen project in the IDE. I ran a quick test like myself and noticed that bar - descriptor.xml has no parameters of a good when a project is created through FDI or downloaded here:

    https://bdsc.webapps.BlackBerry.com/native/sampleapps

    Yes, thank you very much for this bring to my attention. I contacted the team that is responsible for the maintenance of these places and they will be resolved short of time.

    For later use, there are a github repo that has all the native samples. It has all flags necessary bar-descriptor (that this plug in Board is maintained by authors of the actual sample)

    https://github.com/BlackBerry/NDK-samples/tree/master/GoodCitizen

    For example, to quickly sum things - update your sdk and Simulator, get the GoodCitizen correct out of the github and things will work. Meanwhile, let's fix the IDE samples and devportal.

    And let me know if you have problems with this.

  • Intercept touch green application event when the device is locked

    Hi, I'm new to blackberry. What I want is I want to take a key event (green or red button) when the device is locked and do specific tasks in my application that runs in the background if this button is pressed. Is this possible? How can I do?

    Just to be 100% accurate, it is possible for a keyListener (look to the top of the class) to pick up some events even when running in the background.  It can be different events when the device is locked.  Indeed, the events may be different depending on whether the "locked" screen is currently displayed or not. And the entire lot is dependent on operating system level, in other words, the same device running two different levels of OS will possess differently in terms of what keys can detect a listener in the background.

    So if you have a BONE and a specific device, so it might be something you can do, especially if it is an older operating system.  However if you try to create something that works generically, then know that I've tried and failed!.

  • PIM/PDAP add example contacts/events

    Hello

    Is there an example of Blackberry which details how to interact with PIM?

    I read online that net.rim.blackberry.api.pim has been replaced by
    NET. RIM. BlackBerry.API.PDAP but impossible to find examples.

    Thank you

    JO

    Will look @ PIMDemo example, as shown in another forum

  • BlackBerry 9900 touch event not firing

    Hey,.

    I am new to the BlackBerry development and need help. I use a BlackBerry 9900 to test.

    I have a single screen in my application that has several buttons. It reacts to the touch of the events if the button is highlighted.

    Here is my code:

    HorizontalFieldManager hfmRow = new HorizontalFieldManager();
    
    _firstButton = new ButtonField("First");
    _secondButton = new ButtonField("Second");
    _thirdButton = new ButtonField("Third");
    _fourthButton = new ButtonField("Fourth");
    _fifthButton = new ButtonField("Fifth");    
    
    hfmRow.add(_firstButton);
    hfmRow.add(_secondButton);
    hfmRow.add(_thirdButton);
    hfmRow.add(_fourthButton);
    
    add(hfmRow);
    add(_fifthRow);
    

    Try the following - replace / / perform a treatment with what you want on click

    _firstButton = new ButtonField("First"); _secondButton = new ButtonField("Second"); _thirdButton = new ButtonField("Third"); _fourthButton = new ButtonField("Fourth"); _fifthButton = new ButtonField("Fifth");
    
    HorizontalFieldManager hfmRow = new HorizontalFieldManager(){protected boolean touchEvent(TouchEvent message) {        int x = message.getX(1);        int y = message.getY(1); if (_firstButton.getExtent().contains(x, y)) {          //Do processing          return true;}else if (_secondButton.getExtent().contains(x, y)) {          //Do processing          return true;}else if (_thirdButton.getExtent().contains(x, y)) {          //Do processing          return true;}else if (_fourthButton.getExtent().contains(x, y)) {          //Do processing          return true;}else if (_fifthButton.getExtent().contains(x, y)) {          //Do processing          return true;}else{ return super.touchEvent(message);}}}; hfmRow.add(_firstButton); hfmRow.add(_secondButton); hfmRow.add(_thirdButton); hfmRow.add(_fourthButton);hfmRow.add(_fifthButton); add(hfmRow); add(_fifthRow);
    
  • When moving in different time zones, how to keep timely events?

    When I put an event in PST at the exact time in which it will happen and then change the time zone, the event moves to another time. I have not shot time zones. Some events move and others keep time. How can I get all the events to keep time?

    Events are created in the time zone that the Mac is currently defined in support of regardless of the time zone setting. When you change the time zone of the Mac, the events will appear to change the time since they will now display the event in the current time zone.

    Allowing the use of zone:

    • Adds a dropdown in the toolbar menu. You use the menu to change the time zone in which include all events. For example, an event for 12:00 Pacific time is shown at 7: 00 GMT.
    • Also allows you to set the time zone for each event. For example, if you set an event at 7: 00 GMT and then choose Pacific Time in the drop-down list in the toolbar, this event is posted at 12:00
  • How to determine the order of execution of the structure of the event

    Hello world

    I have a structure of the event were it contains four events. All the four events a separate buttons to run. Here, three events generates a digital output, remains an event (Finder) should find the order of these three events. For example, three events namely A, B and C. I run events in the order B, C and has. The event finder should find the order of the events previously performed (B, C and A).

    Thanks in advance.


  • Raising an event based on digital input? Treatment of a condition of emergency stop

    I'm working on a test sequence into LabVIEW.  I have a security which I am followed by a digital input the relay status, and I would like to pass to my failed state that I am in a State of emergency.  (In my case, this happens when a barrier is broken or emergency push button is pressed).

    It would be easy to do if I could use a digital input to trigger an event.  However, this doesn't seem to be possible.  I tried bind my digital input to a control, and then follow the State of the control as an event, but that doesn't seem to work.

    My main problem is that I can be in one of the stages of test 5 seconds approximately.  So far, I have not found a way to out or interrupt this step if my digital input changes state.  I can get it to transition to the failed state after the step in progress, but I want that it to transition immediately when the safety relay is broken.

    I've attached a picture that shows the basic structure of my program.  The actual program is much more complicated, so I hope this is enough information to get started.  I have stops in each loop attached together with the help of a subvi, which basically returns a Boolean TRUE if you press the 'stop' on the operator interface (it is one of the events of my structure of the event).

    It seems that it would be a fairly common situation that there must be some answer I'm missing.  Can anyone help? Thanks in advance...

    You need (somewhere) a loop that monitors the digital status and can detect the transition Fail.  The timing of this loop of 'surveillance' apply to how fast you can respond to failure.

    But now you need to trigger an event when this happens.  When I started programming in LabVIEW, I learned on the events of signs of value that could trigger programmatically a value indicator has changed.  However, a few years later I learned the user events, a more flexible method for generation "software interrupts' who have a number of advantages over value of signage.

    I don't know if you are looking for using LabVIEW or LabVIEW examples user events you'll find a good explanation for how to use these (use the Help Index, and then type user name).

    Bob Schor

  • Rate for the low number of County Digital events

    Hello

    I'm trying to use the example of digital counting examples DAQmx Events.vi to count the pulses of a photon counter.  As long as the light level is high enough, it works very well. But, when the light level is below a threshold, no count is read. I checked that's not because of the photon counter by testing with an independent instrument.

    It seems like it might have something to do with the rate at which counted events are unloaded (PCIe-6321) hardware in the computer, that is, there is a minimum threshold of count indictment before such a transfer of data occurs. I'm voting for the number of levels of every 100ms.

    Any help would be appreciated.

    Thank you

    Alex


  • How to get the ActiveX component value change event?

    Hi all

    LV 8.6.1

    I try to get the ActiveX component value change event. I covered forum and through examples, but I can't get an idea of how "Recalling vi. For example, in the example 'ActiveX event Callback for IE.vi' it is used "recall vi". I've added an example where the change event of value with the mouse to the bottom of the event are scheduled to the structure of the event. Mouse down event OK work but change the value no. Can anyone describe what I need to add to my example vi who value the change event works fine?

    BR, Jim

    Here is the solution! "Value changed event" is not performed in the structure of the event, but in "Reminder VI".

  • Event logging

    Hi all

    I was wondering if someone could point me in the right direction, where I can read and see examples of event logging.  I've written programs before that work well for a long period of time or until the program has stopped the end user, but sometimes the program will only last shortly and stop recording for example.  I would like to see what is happening.  I read a thread on the engines of the Action, but I don't know how to apply to my program (at least not yet).

    Any information would be greatly appreciated


  • features of Windows 7 pc Event Viewer

    the other day, so that navigation event viewer and explore what all the tools in the toolbar, or the opening of subscriptions or it could be analytical see debug logs... ? and whatever it is, he did so as long I know a few years, he goes to a wink in error, this is not a loophole situation with some options that I have no idea of what they are, and Ctrl alt delete seems the quiet way only to deal with, like the other give windows options with an important collapse.  Well well the other day, open the event viewer, I was greeted with a wink by mistake that covered several errors, I had no idea they were and started hitting the close button and the other options to will be and event viewer will stop. Now, I can get into the event viewer, but if I open or take place custom views. the screen flashes and then disappears from the event viewer, with no nada. Except if I go into Windows and applications logs and hit the properties of event I get this: log name: Application
    Source: Adobe Reader
    Date: 28/04/2016-12:28:05 AM
    Event ID: 0
    Task category: no
    Level: Information
    Keywords: Classic
    User: n/a
    Computer: ocean
    Description:
    The description for event ID 0 in source Adobe Reader cannot be found. Either the component that triggers this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

    If the event is on another computer, the display information had to be saved with the event.

    The following information has been included in the event:

    The event XML:

     
       
        0
        4
        0
        0 x 80000000000000
       
        214723
        Application
        Ocean
       
     

     
     

    is it a normal thing? can we see the coded message here, if there is one, how to fix this? Thank you

    Understand and interpret the event viewer reports are not an easy task. In the link below some basic information on the use of event viewer are detailed, which you may find useful:

    http://www.gerryscomputertips.co.UK/syserrors5.htm

    You pasted an event ID: 0 report in your message and asked can we see the cipher here. As a user who has considered several reports, my answer is no. The reason for the report is obscure and like the event viewer reports that it's probably simply reports for example, an event that something important has not been done. My experience tells me to go and find a larger report. If you have a problem with Adobe Reader search the application log.

    The wording in the paragraph immediately below, commonly appears in many reports of the event viewer.

    The description for event ID 0 in source Adobe Reader cannot be found. Either the component that triggers this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

    You probably won't find any official explanation for why it happens. It is not generated universally and arises only on specific computers. It is obvious, because for some reports of the event ID, you can see two variants of the same report.

    A report short event 20 as it should be:

    Log name: System
    Source: Microsoft-Windows-WindowsUpdateClient
    Date: 03/01/2015-16:30:23
    Event ID: 20
    Level: error
    Description:
    Installation failure: Windows failed to install the following update with error 0x800703f9: update for Windows 7 for x 64-based systems (KB3020338).

    An event report 20 abstract, showing the problem:

    Log name: System
    Source: Microsoft-Windows-WindowsUpdateClient
    Date: 26/11/2015-15:29:23
    Event ID: 20
    Level: error
    Description:
    The description for the 20 from source Microsoft-Windows-WindowsUpdateClient event ID is not found. Either the component that triggers this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event is on another computer, the display information had to be saved with the event.
    The following information has been included in the event:
    2149851149
    Upgrade to Windows 10 home page unilingual, version 1511, 10586
    EV_RenderedValue_2.00
    201
    EV_RenderedValue_4.00
     
        0x8024200d
        Upgrade to Windows 10 home page unilingual, version 1511, 10586
        {1C9F8193-45FF-42DF-8BA2-7DE52C1085A4}
        201
        {9482F4B4-E343-43B6-B170-9A65BC822C77}

    The section above highlighted in red appears in most / many reports. When you encounter a report as the second example, locate the section highlighted in red for the most useful explanation of what the report is.

  • Method 'Events' of billing for revenue generation

    Hello

    Among the methods of income generation is 'Events' and project billing Usage Guide says: 'Counts revenues based on events'... and also that «you can set project events in order to trigger the recognition of income...» »

    When I read Chapter 4 of the Guide of use billing project it says: "use the event Details window to enter and view the events for a task in project or top. Examples of events include a reduction in the Bill, a performance bonus, radiation of revenue or revenue adjustment. '

    What I don't understand is if I select the method of generation of revenue from the "events" how the system will calculate the amount of income? Will take into account the events listed in the Details of the event (for example, a cancellation of invoice) window more previously approved costs of the project (i.e. inputs expenditures in the window of expenses) for the calculation of income or only events manually entered in the case where window Details?

    Thanks in advance for your help.

    Kind regards

    CV

    Hello

    With the type of the distribution of event / * PARGDR will calculate the income from events entered manually or created automatically by the extension of the customer.

    Thank you

    Gene

  • Looking for a trial before a special event

    Hello

    LogInsight has the functionality to search for an event X and shows all events for 5 seconds before that?

    looking for example current events before the occurrences of X (which is originally X)

    VAC

    Hey Dan,

    You can build the query for error and set the time limits of the application of last week. However, show X second before/autour de/after thing I mentioned by selecting the clock icon next to an event applies to the event for which you have selected the icon of the clock (not all events). To do what you ask, you will have to do it manually. For example, if you have used the clock to an event icon and noticed something before the event that you think is a repeated situation then you can create a query to see how many times something else appears and see if it is strongly correlated with the error that you initially searched for. I hope that makes sense.

Maybe you are looking for

  • There is not enough disk space to download new messages.

    Please when Mozilla is going to permanently fix this problem.This limitation is stand to fully trust on Thunderbird.

  • its replacement by name email address

    I have the constant problem of my username of email being substituted when I type my email address in a form. Specifically, my name (derryls) is being replaced by 'derailed' even when I was typing my question right now in this form. If I very gently

  • Failing to update to iOS 9.2.1

    I just bought a new iPhone 6s a few days ago. I tried to restore from the cloud, but it failed, probably because my 5s did not back up in 6 months. So I put up as a new iPhone.  Now, today doing the update of IOS. He said "you can always install the

  • Satellite Pro 6100 USB XP SP2 remove USB device after suspend

    I have a Pro Satellite XpPro 6100 running.I have a problem since I installed SP2 of XP in that USB falls when the computer wakes from sleep. The computer is up there, but I can reproduce this with SP2 only. Fortunately, I did a Norton Ghost and I res

  • How can I add to my contacts who have not sent to me?

    I have a new MacBook Pro laptop and am able to send and receive emails fine.  I see the drop down to save a contact to my contacts once they sent me an email.  However, I can't find how just enter email addresses which have not yet sent by e-mail. Yo