i got this poblems...

  • hye all.. im trying to do flash button here for krpano interface... (will distribute later upon complete)

    but im stuck at this problems

    1084: Syntax error: expecting rightparen before tween(view.fisheye, 0.0 ,distance(1.0, 0.10), easeoutquad, set(view.stereographic,true);.


    Code
    this.button_planet.addEventListener(MouseEvent.CLICK, planetbutton_clicked);this.button_planet.useHandCursor = true;
    function planetbutton_clicked(mouseevent:MouseEvent):void{
    krpano.call("tween(view.architectural, 0.0, distance(1.0, 0.25), easeoutquad);"             "tween(view.fisheye,       0.0 ,distance(1.0, 0.10), easeoutquad, set(view.stereographic,true);"             "tween(view.fisheye, 1.0, distance(1.0, 0.75));"             "tween(view.fov,     130, distance(179, 0.75), easeoutquad, set(view.fovmax,150););"             "tween(view.vlookat,  90, distance(179, 0.75), easeoutquad););"}


    thank you

  • I'm taking a stab at this... and hopefully won't lead you down the wrong path...

    But I think you might be closing your quotes " too soon...

    Looking at some other samples on the forum... it looks like you would only need...

    Code
    krpano.call(" tween(--); tween(--); tween(--); ")

    In addition... the end of the line doesn't seem to match up to the front of the line and close out correctly...

    Somebody will probably come along and correct me... which is why I shouldn't post in the AS3 section of the forum... but I figured I give you some thoughts.

  • thank you Jarreda... it doesnt work if i do adjust the closing line...

    thank you also Graydon... anyway.. im still stuck.. i do try a few closing line.. but still couldnt work...

  • Try this:

    Code
    function planetbutton_clicked(mouseevent:MouseEvent):void
    {
    	krpano.call("tween(view.architectural, 0.0, distance(1.0, 0.25), easeoutquad);tween(view.fisheye, 0.0 ,distance(1.0, 0.10), easeoutquad, set(view.stereographic,true)); tween(view.fisheye, 1.0, distance(1.0, 0.75)); tween(view.fov, 130, distance(179, 0.75), easeoutquad, set(view.fovmax,150);); tween(view.vlookat,  90, distance(179, 0.75), easeoutquad)");
    }


    Thats all in 1 line.

    The krpano.call calls something in krpano in the form of a string. You gave like 4-5 different strings. Alsoo you had 1 ) too many in there.

    If this doesnt work, make an action in the xml with the tweens in it. And call it with krpano.call("action(someaction)");

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!