Touch event - Forum

Forum Navigation
You need to log in to create posts and topics.

Touch event

How can we use the Touch event like (touchmove, touchstart, touchend, touchcancel)  in VisualNEO Web?

Mobile app developers will need so much these Events.

https://www.w3schools.com/jsref/event_touchmove.asp

https://www.w3schools.com/jsref/event_touchstart.asp

https://www.w3schools.com/jsref/event_touchend.asp

 

@asmat, in Project > Events > start-up add:

NeoScriptToJS

Then in your HTML markup you can use something like this:

<p ontouchmove="neosubroutine.mysubroutine(event)">Touch me!</p>

Let me know if it works.

 

Hi @Luishp, it is work but it is slower a hundred times than javascript code.

I don't know why when I mix javascript code and neoscript code the performance of the code becomes slow.

Is there any way to solve this problem?

@asmat that's quite strange. I have not noticed that problem.
In fact neoscript is just a customized javascript.

Hi @luishp

you can see better this problem in the attachment.

https://drive.google.com/file/d/1m33zzpsQyzpdBn9HT_WDcoDaSzYKibjS/view?usp=sharing

@asmat, that's not a speed problem.
It is the way VisualNEO Web variables are updated by default (in fact it's AngularJS).
Just use the neoscript comand "Refresh" before you get any value instead of waiting until it's updated.

Where I use the "Refresh" command?

 

Uploaded files:
  • You need to login to have access to uploads.

@asmat, check the attached file please.

Uploaded files:
  • You need to login to have access to uploads.

Thank you Luishp!