Hi,
I need that when the User is in a particular scene, an action is performed , Would anyone help me that check ?
how to check what scene I?
-
-
Call the action in the onstart of the scene.
Tuur -
I need each scena do a different action .
-
Ok you call an action in the onstart.
But you can also do <events onnewpano="callanaction()" />
In that action you can do
if(scene[get(xml.scene)].name == ilovekrpano, dothis());Etc
There are more options. It depends a bit on what you exactly want.
Tuur -
I did it and not squeegee , correct?
if ( scene [ get ( xml.scene )] name == scene_02 , name_action ()) ; -
if this is your exact code , you are missing one dot between the bracket and name
if ( scene [ get ( xml.scene )].name == scene_02 , name_action ()) ;
But as Tuur said, when you need to start some different action in many scenes, I would defenetlly use the onstart attribute, in the scene itself, then you can avoid this not so useful if ...
<scene name="scene_02" title="your title" onstart="dosomething();" thumburl="panos/02.tiles/thumb.jpg">
-
I can spend a code example using various actions for different scenes ?
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!