Please , why doesn't this code work ?

50 views
Skip to first unread message

vmars316

unread,
Apr 23, 2013, 4:28:23 PM4/23/13
to enchantjs-...@googlegroups.com
Hello & Thanks ,
Please , why doesn't this code work ? 
I can't seem to get this  " {if (lieCheck |= 1) { " statement to work .
The " {if (lieCheck == 1) { " fires off all the time . 

I want the " if (lieCheck " to fire on every loop ...Thanks..vm

        lieCheck = 0; 
        
        {if (lieCheck |= 1) {
            lieCkLabel.text = "lieCheck |= 1"; 
            Obama1.tl.moveBy(288, 0, 90)   // move right
            .scaleTo(-1, 1, 10)      // turn left  
            .moveBy(-288, 0, 90)     // move left
            .scaleTo(1, 1, 10)       // turn right
            .loop();                 // loop it
           }; }
           
         {if (lieCheck == 1) {
            lieCkLabel.text = "lieCheck = 1"; 
            Obama2.tl.moveBy(288, 0, 90)   // move right
            .scaleTo(-1, 1, 10)      // turn left  
            .moveBy(-288, 0, 90)     // move left
            .scaleTo(1, 1, 10)       // turn right
            .loop();                 // loop it 
          };  } 




vmars316

unread,
Apr 24, 2013, 5:59:47 PM4/24/13
to enchantjs-...@googlegroups.com
Never mind , I decided to do it another way..vm
        

sidestepism

unread,
Apr 30, 2013, 4:07:57 AM4/30/13
to enchantjs-...@googlegroups.com
lieCheck |= 1 means "lieCheck = lieCheck || 1". "not-equal" is "!=", not "|=".
Reply all
Reply to author
Forward
0 new messages