Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Problem touch event html5 interactive board LG at windows system

New Here ,
Apr 05, 2024 Apr 05, 2024

i Cant  drag and drop movieclip .The only event whitch work is "click"

touchend , touchmove, touchstart not working .

I am teacher , my physics simoulation work at mobile and pc but not on windows touch screen.

https://users.sch.gr/lefgeo/faraday/faraday12122020.html

 

Please help me.

TOPICS
Code
684
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 06, 2024 Apr 06, 2024

Hi.

 

I think that for devices that have touch capabilities but are not mobile, CreateJS fails decting them correctly. So you need to use native touch events.

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

 

Please let us know.

 

Regards,

JC 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 06, 2024 Apr 06, 2024

I will try . Although I already tried. It's not fair... Other tools like jqwery do just fine. It is not fair .....

We must found soloution.

Thanks .

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 06, 2024 Apr 06, 2024

you can use jquery in animate by "including" (click the + sign at the upper right of the panel) it in your global scripts panel

 

kglad_0-1712498946108.pngexpand image

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 07, 2024 Apr 07, 2024

Yes. I am trying to solve like this few hours ago. But it's not easy. Many js files export variables in a paradoxical ways ....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 07, 2024 Apr 07, 2024

i don't know what you mean, but ok.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 08, 2024 Apr 08, 2024

My English is not good. Î¥ou are right.... but i would just like to find a solution... i build free simulations for students and with this problem i can't help them as much as i would like. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 08, 2024 Apr 08, 2024

did you add the jquery library and use the jquery code that works in other situations?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 08, 2024 Apr 08, 2024

I have seen jqwery and createjs being used at the same time at HTML5 canvas. But i can not work at my applet. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 08, 2024 Apr 08, 2024

an applet is written in java, not javascript.  are you really working on an applet?

 

and i'm unaware of anything called jqwery.  there is a jquery, though it is pronounced the way you keep spelling it.  are you using something called jqwery or are those typos?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 16, 2024 Apr 16, 2024
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 16, 2024 Apr 16, 2024

but not for me

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2024 Apr 16, 2024

@Lef35957560mooa 

 

what?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 16, 2024 Apr 16, 2024
 
<!--<script src="files/jquery/external/jquery/jquery-3.4.1.min.js"></script>-->
<script src="files/jquery/external/jquery/jquery.js"></script>
<script src="files/jquery/jquery-ui.js"></script>
<link href="files/jquery/jquery-ui.css" rel="stylesheet">
<link href="files/jquery/jquery-ui-1.12.icon-font.min.css" rel="stylesheet">
<script src="files/jquery/jquery.ui.touch-punch.min.js"></script>
<script src="files/createjs/easeljs.min.js"></script>
Let me say again that my English is not good. I don't know how but I saw these files being used all together in applications. I actually think some of these are not classic gs files either. I thought they were a dialect of js. I don't know what's going on. I keep looking for a solution on how to do drag and drop using touch event  something like mouse event 
like 
 
that.e1t.on("pressmove", function (evt) {
 
var p = stage.globalToLocal(evt.stageX, evt.stageY);
//if (p.x>=600){
 evt.currentTarget.x = p.x
//}
 evt.currentTarget.y = p.y;
 
 
}, this);
 
 
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 17, 2024 Apr 17, 2024

do you see any errors in your browser's console?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 18, 2024 Apr 18, 2024

no errors , no work 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 18, 2024 Apr 18, 2024

/// this is my progress .i must found x , y function to move obj_1 (circle movieclip)   and of cource make to work //without errors 

  
createjs.Touch.enable(stage);
 
 
var touchX,touchY;
var that=this;
var obj_c=canvas;
var obj_1=this.obj_1;
var txt=this.txt;
//obj=obj_c;
var touch_enable=0;
 
 
 
var frequency = 3;
stage.enableMouseOver(frequency);
this.obj_1.addEventListener("mousedown", fl_MouseOverHandler);
 
function fl_MouseOverHandler()
{
touch_enable=1;
txt.text="mousedown="+touch_enable;
canvas.addEventListener('touchstart', sketchpad_touchStart, false);
canvas.addEventListener('touchmove', sketchpad_touchMove, false);
canvas.addEventListener('touchend', sketchpad_end, false);
}
 
 
function canvas_mouse_up_function(){
txt.text="End touch canvas"
        event.preventDefault();
canvas.removeEventListener('touchstart', sketchpad_touchStart, false);
canvas.removeEventListener('touchmove', sketchpad_touchMove, false);
canvas.removeEventListener('touchend', sketchpad_end, false);
}
 
 
canvas.addEventListener('mouseup', canvas_mouse_up_function, false);
 
 
 
obj_1.addEventListener("click", fl_MouseClickHandler_1.bind(this));
 
function fl_MouseClickHandler_1()
{
 
touch_enable=1;
txt.text=touch_enable;
canvas.addEventListener('touchstart', sketchpad_touchStart, false);
canvas.addEventListener('touchmove', sketchpad_touchMove, false);
canvas.addEventListener('touchend', sketchpad_end, false);
}
 
 
 
   function sketchpad_touchStart(e) {
        // Update the touch co-ordinates
   
       txt.text="touch Start"
        event.preventDefault();
    }
 
   function sketchpad_touchMove(e) { 
        txt.text="touch Move"
        event.preventDefault();
    }
 
 
 function sketchpad_end(e) { 
        txt.text="End touch"
        event.preventDefault();
canvas.removeEventListener('touchstart', sketchpad_touchStart, false);
canvas.removeEventListener('touchmove', sketchpad_touchMove, false);
canvas.removeEventListener('touchend', sketchpad_end, false);
    }
 
 
 function sketchpad_end_m(e) { 
        txt.text="End mouse window"
 
        event.preventDefault();
canvas.removeEventListener('touchstart', sketchpad_touchStart, false);
canvas.removeEventListener('touchmove', sketchpad_touchMove, false);
canvas.removeEventListener('touchend', sketchpad_end, false);
    }
 
  window.addEventListener('mouseup', sketchpad_end_m, false);
/*
canvas.addEventListener('touchstart', sketchpad_touchStart, false);
canvas.addEventListener('touchmove', sketchpad_touchMove, false);
canvas.addEventListener('touchend', sketchpad_end, false);
*/

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 18, 2024 Apr 18, 2024

sorry, i don't have time to debug your code.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 18, 2024 Apr 18, 2024

ok Thank you

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 18, 2024 Apr 18, 2024
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 08, 2024 Apr 08, 2024

What's the issue you're facing when using the native API?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines