| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Jan 2001
Location: Los Angeles
Posts: 24
|
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"; } |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
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. |
|
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|