Groups | Blog | Home
all groups > flash actionscript > january 2004 >

flash actionscript : Help With Multiple If Statement Syntax


Rob Solberg
1/25/2004 10:41:16 PM
What am I doing wrong here? I want it to display different messages
depending on which MC it finds:

scanner.onEnterFrame = function() {
if (this.hitTest(_root.blue)) {
_root.display = "BLUE";
} else {
}
if (this.hitTest(_root.red)) {
_root.display = "RED";
} else {
}
if (this.hitTest(_root.cyan)) {
_root.display = "CYAN";
} else {
_root.display = "Please Scan An Item";
}
};

Thanks!
Rob|e.9



Jeckyl
1/26/2004 3:51:41 PM
scanner.onEnterFrame = function() {
if (this.hitTest(_root.blue)) {
_root.display = "BLUE";
} else if (this.hitTest(_root.red)) {
_root.display = "RED";
} else if (this.hitTest(_root.cyan)) {
_root.display = "CYAN";
} else {
_root.display = "Please Scan An Item";
}
};

AddThis Social Bookmark Button