Jump to content

Slider with pointermove not working mobile


Recommended Posts

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


    function SpinMoveFun()
        console.log("Ap Progress: autoPlay_clicked = "+autoPlay_clicked)
        if(autoPlay_clicked == true)
function doDrag(event)
        //console.log("Ap Progress: dragging = "+roulette_wheelShape.dragging)
            newPosition = roulette_wheelShape.data.getLocalPosition(app.stage); //
            //console.log("Ap Progress: newPosition = "+newPosition)
            console.log("Ap Progress: "sliderLeftMarginroulette_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)                


Link to comment
Share on other sites

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 by jonforum
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...