You are not logged in.

igor.socha

Intermediate

  • "igor.socha" started this thread

Posts: 200

Occupation: Photographer

  • Send private message

1

Monday, January 7th 2013, 10:37am

using AND OR with if in functions?

I have:

if(hotspot[spot1]visible==1,func1(),func2() );

if(hotspot[spot2].visible==1,func1(),func2() );

how to use AND or OR if I want to do func1 if spot1 AND spot2 is visible and spot1 OR spot2 is visible?
(like in javascript && and || )
THANX A LOT!!!
Best regards,
Igor Socha

igor.socha

Intermediate

  • "igor.socha" started this thread

Posts: 200

Occupation: Photographer

  • Send private message

2

Monday, January 7th 2013, 10:46am

So, this is one of the examples for "if" http://www.krpano.com/docu/actions/#if

Source code

1
2
3
4
5
if(varA GT 5,
    if(varA LT 10,
        trace('varA is between 5 and 10')
      );
  );


So this is how AND work? if variable A is greater than 5 AND at the same time lower than 10 than trace.... ???
so, how to do OR ?

thanx!!!
Best regards,
Igor Socha

3

Monday, January 7th 2013, 1:39pm

Hi, see here Using AND or OR for Multiple Conditions

Good luck ! ;-)

igor.socha

Intermediate

  • "igor.socha" started this thread

Posts: 200

Occupation: Photographer

  • Send private message

4

Monday, January 7th 2013, 3:06pm

uff, little complicated, but thanx :)
*g*
Hi, see here Using AND or OR for Multiple Conditions

Good luck ! ;-)
Best regards,
Igor Socha