Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if statement...

Status
Not open for further replies.

bugg

Programmer
Jun 20, 2001
62
US
this is wierd, I have been wrestling with it for about 6 hours now, am thinking the only way to fix it is to get a beer and then, maybe, another...

I have two places where I have written very basic "if" statements, they are simple, ala:

onClipEvent (mouseMove) {
if (_root.movieclipA._x = (_root.movieclipB._x + 100)) {
_root.movieclipC.gotoAndStop (2);
};
};

whenever I publish to check it out, mcC goes to (2) regardless of the aforementioned condition being met. It's like the "if" isn't even there. Any Ideas???

thanks
bugg
 
sounds like your if statement condition (mcA is not equal to mcB)is not being met. in order for the if statement to execute mcA's _x position must equal to mcB's _x position + 100. but as i can see in your coding the "=" doesn't mean equal your basically setting the value of mcA's _x position!

copy and paste this into flash:

onClipEvent (mouseMove) {
if (_root.movieclipA._x == (_root.movieclipB._x + 100)) {
_root.movieclipC.gotoAndStop (2);
};
};


do you see where i put two equal signs instead of one?


hope this helps


-nub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top