special button for 'drag2d' or drag3d' mousemode

  • id try this code

    <plugin name="mousebtn" url="./navbutton/btn_star.jpg" align="bottom" edge="center" y="40" x="-200" blendmode="screen" onhover="showtext(Game mode ON/OFF);" onover="set(blendmode,add);" onout="set(blendmode,screen);" onclick="switch(mousetype,drag2d);" />

    and this button should be 1 button only, just like on/off for fullscreen button


    <plugin name="littleplanet" url="../navbutton/btn_home.jpg" align="bottom" edge="center" y="20" x="+120" blendmode="screen" onhover="showtext(Little Planet);" onover="set(blendmode,add);" onout="set(blendmode,screen);" onclick="action(littleplanet);" />

    <plugin name="fisheyeview" url="../navbutton/btn_home.jpg" align="bottom" edge="center" y="20" x="+160" blendmode="screen" onhover="showtext(Fisheye View);" onover="set(blendmode,add);" onout="set(blendmode,screen);" onclick="action(fisheyeview);" />


    im failed... *g*</plugin></plugin>

    http://www.maya360.com/sample.html

    2 Mal editiert, zuletzt von bulp (23. März 2009 um 05:35)

  • Hi,

    if you want just one button, try this:

    Code
    <plugin ... onclick="switch(control.mousetype, drag2d, drag3d);" />

    the full path to the variable must be set - "control.mousetype"
    and the values between it should switch - "drag2d" and "drag3d"

    best regards,
    Klaus

  • Mr Klaus.... Thanks for the script... it works great....


    so this script also hv to modify like this?

    Code
    <plugin name="littleplanet" url="../navbutton/btn_home.jpg" align="bottom" edge="center" y="20" x="+120" blendmode="screen" onhover="showtext(Little Planet on / off);" onover="set(blendmode,add);" onout="set(blendmode,screen);" onclick="switch(control.view, littleplanet, fisheyeview);" />


    hehe.. *confused*

    2 Mal editiert, zuletzt von bulp (24. März 2009 um 09:39)

  • sorry, your code will not work

    the fisheye and littleplanet view is not a simple view setting,
    it's a variance of several combined parameters (fisheye,stereographic,vlookat,fov)

    add a user defined variable for the button (e.g. "viewmode"),
    change the value of this variable (e.g. "planet" or "fisheye") with switch on every click,
    and depending on the current value call a action for the change the
    view settings (for the view changing actions have a look at the little planet example)

    Code
    <plugin ...
           viewmode="planet"
           onclick="switch(viewmode, planet, fisheye); if(viewmode == planet, action(littleplant), action(fisheye));"
           />

    note - krpano 1.0.8 is needed for this!

    best regards,
    Klaus

  • that script didnt work...

    Code
    <plugin name="littleplanet" ..... viewmode="planet"        onclick="switch(viewmode, planet, fisheyeview); if(viewmode == planet, action(littleplanet), action(fisheyeview));"        />

    even if i change the fisheye to fisheyeview also didnt work...

    Code
    <plugin ... onclick="switch(control.mousetype, drag2d, drag3d);" />

    can i add on on more type here?... the 'moveto'
    i mean all the 3 mousetype setting in 1 button..

    *smile*

  • even if i change the fisheye to fisheyeview also didnt work...

    Hi, did you use version 1.0.8 and have included the <actions> for "littleplanet" and "fisheyeview"?
    I'm not sure at the moment how they are named in the littleplanet example,
    maybe the names differ a little bit,

    Zitat

    can i add on on more type here?... the 'moveto'
    i mean all the 3 mousetype setting in 1 button..

    in the next release (1.0.8 beta 7, should be ready soon) you can use as many values in the
    switch function as you want, then it switch trough all gives values
    e.g.

    Code
    switch(control.mousetype, drag2d, drag3d, moveto);

    best regards,
    Klaus

  • ... hehe... yes i did use version 1.0.8 beta and have include those action code.... id changed the name few times also still cant...


    hurm... when is the due date for version 1.0.8 beta 7 gonna be release? cant wait since the 'hotspot' missing is a big issue...

    anyway thank you very much Mr Klaus..

Jetzt mitmachen!

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