Why doesnt it stop?

  • Adde
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Jul 13, 2004
  • Posts: 47
  • Status: Offline

Post September 29th, 2004, 12:31 pm

Ive made a quiz in flash, heres the result frames code. I want it to stop but it doesnt! Why? And whats the right code?


Code: [ Select ]
if (result==10) {
    message = "WOW! ALL ANSWERS RIGHT! INCREDIBLE!";
} else if (10 && result >=7 {
  message = "Whoa!!! You got" + result+ ", so you still have something to work on!";
} else if (7 && result >=4) {
  message = "Sucker! only " + result+ "right so TRY AGAIN!";
} else {
  message = "*plum* YOU REALLY SUCK! ONLY " + result+ "ANSWERS RIGHT! SUCKING!";
}
stop();
  1. if (result==10) {
  2.     message = "WOW! ALL ANSWERS RIGHT! INCREDIBLE!";
  3. } else if (10 && result >=7 {
  4.   message = "Whoa!!! You got" + result+ ", so you still have something to work on!";
  5. } else if (7 && result >=4) {
  6.   message = "Sucker! only " + result+ "right so TRY AGAIN!";
  7. } else {
  8.   message = "*plum* YOU REALLY SUCK! ONLY " + result+ "ANSWERS RIGHT! SUCKING!";
  9. }
  10. stop();
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post September 29th, 2004, 12:31 pm

  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Joined: Dec 29, 2003
  • Posts: 5169
  • Loc: SC-USA
  • Status: Offline

Post September 29th, 2004, 1:18 pm

Code: [ Select ]
if (result==10) {
    message = "WOW! ALL ANSWERS RIGHT! INCREDIBLE!";
} else if (10 && result >=7 {
  message = "Whoa!!! You got" + result+ ", so you still have something to work on!";
} else if (7 && result >=4) {
  message = "Sucker! only " + result+ "right so TRY AGAIN!";
} else {
  message = "*plum* YOU REALLY SUCK! ONLY " + result+ "ANSWERS RIGHT! SUCKING!";
}
stop();
  1. if (result==10) {
  2.     message = "WOW! ALL ANSWERS RIGHT! INCREDIBLE!";
  3. } else if (10 && result >=7 {
  4.   message = "Whoa!!! You got" + result+ ", so you still have something to work on!";
  5. } else if (7 && result >=4) {
  6.   message = "Sucker! only " + result+ "right so TRY AGAIN!";
  7. } else {
  8.   message = "*plum* YOU REALLY SUCK! ONLY " + result+ "ANSWERS RIGHT! SUCKING!";
  9. }
  10. stop();


There are some errors in your code that may be causing the whole code block not to process(closing parenthesis of the first 'else if' condition). If you take out the whole "if" chain, does the stop() work then?

I think your 'esle if' conditions should be...

Code: [ Select ]
else if (result < 10 && result >=7) {....


As you have it now, it should skip the first part of the condition and only check for the second.
- dM
  • Adde
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Jul 13, 2004
  • Posts: 47
  • Status: Offline

Post September 30th, 2004, 10:03 am

Ok! Thx a lot! Will try it out later!

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 31 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.