Variable declared in Action, access error, please help~

  • Hi, I'm newbie here.

    I made a little planet intro action like this:


    the trace(ohlookat) in "lpinit" action show correct, but in the "lp" action,trace(ohlookat) display 0; if I can't access the variable in another action? Anyone help, thx!


    Best regards,

    Jove.

  • Hi

    I personally use in such situations 'get();' method:

    The variables are available at any time - globally.


    tween(view.hlookat, get(ohlookat), 2.5, easeInOutQuad);
    ...


    Try it

    Piotr

  • This means that the panorama was in position view.hlookat = 0, when You get ohlookat variable (onxmlcomplete event).

    Move the panorama and try this:

    Piotr

  • Hi spacerywirtualne,

    I found the point. the onxmlcomplete event executed twice, so the second time ohlookat set to a viewlookat with 0, but why onxmlcomplete event executed twice? I think I must check the documentation.

    Thanks!

Jetzt mitmachen!

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