PDA

View Full Version : Help with getting another MC to play



darc10222
April 11th, 2006, 04:48 AM
There could probably be a simpler way with what Im trying to do with my game altogether but Ill just stick to what Im trying right now. Im trying to get it to say
If fire=true then firebar gotoandplay(2).
But I cant find the code.

onClipEvent(mouseDown){
if(fire=true){
_root.firebar
gotoAndPlay(2);
}
}

Thats what Ive got so far. And I've tried improving it but its not working. I know that code should not work but I've tried more than just that. Can someone please help?

nathan99
April 11th, 2006, 07:24 AM
just use


if (fire){

or


if(fire == true){


See:
http://www.n99creations.com/?pID=tutorials&col=Blue&tut=basics_of_actionscript_for_flash&p=1&l=Flash_MX_04

bombsledder
April 11th, 2006, 09:18 AM
that doesn't really explain why :O, the real reason why is because your saying

if(fire=true){

so its setting fire to true everytime that script runs,

=, sets a var to something
==, is for comparing

and the other ones too that im not gonna go into detail about