break an action
-
-
https://krpano.com/docu/wiki/index.php/Actions_and_scripting
breakall
Flow control Breaks out of all currently running actions
stopall
Flow control Breaks out of all current actions and clears the queue of waiting actions -
Sure, that's right, but I don't want to break all currently running actions, but only the one in which my (desired) break command is...
-
Hi Ronny,
As I know, there is no break() action available...
But I think you can reach similar action using an if() action:Code<action name="myaction"> (do stuff) if (this == that, <!-- pseudo_break --> (do nothing); , <!-- else --> (otherwise do more stuff); ); </action>
Hi Protected ,
The definition for breakall() and stopall() ...
Quotestop / stopall()
- stops/breaks all current running actions/timersets/tweens
- removes the rest of the queued actionsbreakall()
- stops/breaks all current running actions/timersets/tweens
- continues with the rest of the queued actionsHope this help...
SAlut.
-
Thanks, Michel, but the disadvantage of "if" is that you can't nest them. And rarely my actions are that simple that they contain only one "if"...
So, now I think we desire two things:
- a "break" statement
- and nested if's
-
Hmm, I just saw in your reply to this question that you do use nested if's, apparently quite happily and successfully.
I wonder what I did wrong when I was trying this yesterday, and figured it didn't work. Will have to try again...
-
Hi Ronny,
Nested IF are possible ...
Look here for an example: How do I hide all plugins but one?edited: just see that you allready see it ...
SAlut
-
YES!!!!!
I just tested it, and even though I needed to make 20 corrections before I got it right (missing comma's or semicolons, parentheses in the wrong place, you name it). I'm so used to typing C# that whenever I type a condition, I fully automatically type a ) after it, and needless to say, one should not do that here...
Anyway, in the end I got it right and it works!
Now a whole new world is opening for my scripts...
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!