JosPixi Posted October 1, 2020 Share Posted October 1, 2020 I used pointermove event and its not working in mobile, ofcourse i realized there is no pointer or mouse events in mobile. Does anyone know what's the alternative. I even tried with the following nothing works. touchmove for pointermove. touchendoutside for pointerupoutside touchend for pointerend touchstart for pointerdown roulette_wheelShape.on('pointermove',SpinMoveFun) function SpinMoveFun() { console.log("Ap Progress: autoPlay_clicked = "+autoPlay_clicked) if(autoPlay_clicked == true) { doDrag() } } function doDrag(event) { //console.log("Ap Progress: dragging = "+roulette_wheelShape.dragging) if(roulette_wheelShape.dragging) { newPosition = roulette_wheelShape.data.getLocalPosition(app.stage); // //console.log("Ap Progress: newPosition = "+newPosition) console.log("Ap Progress: "+ sliderLeftMargin, roulette_wheelShape.x,sliderRightMargin) if(roulette_wheelShape.x >=sliderLeftMargin && roulette_wheelShape.x <=sliderRightMargin) { roulette_wheelShape.x = newPosition.x - offset.x; //console.log("slider.x = "+slider.x) if(roulette_wheelShape.x < sliderLeftMargin) { roulette_wheelShape.x = sliderLeftMargin; } if(roulette_wheelShape.x > sliderRightMargin) { roulette_wheelShape.x = sliderRightMargin; console.log("Spin on right case 4") } } currentWidth = sliderRightMargin - roulette_wheelShape.x console.log("currentWidth = "+currentWidth) PerPixelAutoplay = AutoPlayVal_php/sliderLength AutoPlayVal = Math.round(currentWidth * PerPixelAutoplay) temp_AutoPlayVal = AutoPlayVal; curAutoPlayVal = AutoPlayVal; AutoSpinCount_text.text = AutoPlayVal+"X" console.log("currentWidth = "+currentWidth,AutoPlayVal,PerPixelAutoplay,AutoPlayVal) } } Quote Link to comment Share on other sites More sharing options...
jonforum Posted October 4, 2020 Share Posted October 4, 2020 (edited) I can help you. but you would need to restructure your code. formatting is unreadable. I know that the technology of this forum is outdated, but it is possible to present things well with tags tools. use script balise with js. if you don't take the time to present things well, it is likely that no one will take the time to help you. Edited October 4, 2020 by jonforum Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.