Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Flash General Questions > Other Flash General Questions

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-26-2001, 01:00 AM   #1
Flo
Registered User
 
Join Date: Jan 2001
Location: Los Angeles
Posts: 24
Default

This is the final script for a game ive created, the point of it is to click on body parts and match them to who you think they belong to. This last script is supposed to send the user if they clicked on the right parts to a celebration (scene2) it dont work though, any help would be great
on (press) {
torso == "sam";
}
on (press) {
if (girl =="sam" && eyes =="sam" &&
legs =="sam" && torso =="sam") {
gotoAndPlay ("scene2, 1");
}
}
---I have a variable set on each image----
on (press) {
girl == "eve";
}
Flo is offline   Reply With Quote
Old 01-26-2001, 02:05 AM   #2
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,612
Default

I hope all these actions aren't on the same button. You can only have one
on (press){
}

one each button. ALl command to occur on press should go within that command.

I'm not exactly sure what the problem is here, but can I suggest one thing. Rather than checking if everything equals "sam" or everything equals "eve", why not just check that everything is the same, btu not equla to nothing. Like this:

on (press) {
if (girl==eyes==legs==torso && girl !="") {
gotoAndPlay ("scene2, 1");
}
}

This says:
"if all these things are equal and 'girl' has a value (is not equal to nothing), then ..."
because if theya re all equal and 'girl' has a value, all the others must have a value also.

I hopet his helps

Cheers

Jesse
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder
Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:30 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.