lundi 27 mars 2017

Actionscript 3 drag and scroll instead of mouse wheel

I am using Flex 4.6 with Actionscript, When I run my windows application and an element is too long I am able to scroll though the element with my mouse wheel, how would I implement a click and drag horizonially and verically to scroll, I am not talking about dragging. I have this so far

private function siteplanInit():void
            {
                siteplan.addEventListener(MouseEvent.MOUSE_DOWN, md);
            }

            private function md(evt:*):void
            {
                stage.addEventListener(MouseEvent.MOUSE_DOWN, mu);
            }

            private function mu(evt:*):void
            {
                stage.removeEventListener(MouseEvent.MOUSE_UP, mu);
            }

but I dont know how to make an element scroll instead of drag

Aucun commentaire:

Enregistrer un commentaire