Zoom in and out with mousebuttons (trackball)

  • Hi,

    for a museum, I´ve set up a small plugin based on the followmouse.as script to pan around without clicking the mousebuttons. They use a trackball with 2 buttons, and the problem is, that these buttons can just be used as left and right mousebutton.
    Now I have to disable the contextmenu, and set the buttons to zoom in and out. Is this possible ? Any suggestions, how to do this ?
    Since I´m not very experienced in programming, and don´t do this very often, I need a little bit support with this.
    Thanks!

    Oliver

  • So I fiddled it out, and - really - it wasn´t too difficult to find the solution for zooming.
    There´s still the problem with the context menu. Referring to Adobe's Actionscript reference, I have defined a listener for right_click to get rid of it, but it still appears by releasing the right button.
    Also it would be great, if mousedown panning could be disabled too, because it badly interacts with the mouse_move script, specially at zooming.

    Here´s my script (originally the followmouse.as from Klaus):


  • Hi!
    I just make this code :)
    it's new gesture for touch devices and for mouse too
    double click and hold, and move up and down for zooming.
    For make it possible, simple include code in your tour.
    Feature can be disabled by set(clickmovezoom.enabled,false);
    Enjoy

    XML EDITED and updated

    Andrey *thumbup*

    PS free for all

  • Working everywhere (flash, html5)


    Hi Andrey,

    thanks a lot for your help. I just saw that I wrote TRACKPAD, but it´s a TRACKBALL. I´ve corrected this in my first posting.

    Anyway, it works now as it should with the code I posted before ! In the standalone player, the context menu is disabled. Now I´m fine *wink*

    Cheers

    Oliver

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!