
Welcome Guest
|
#1
|
|||
|
|||
|
im using flash 8
i have a movie clip with all the playing cards one its own frame and a bet button which generates a random number and shows the card but how do i stop the same cards from showing . regards tommy heres the code from the bet button : ------------------------------------------------------------ Actionscript:
on (press) {
gotoAndStop(2);
credits = Number(credits)-Number(bet25);
num1 = Math.floor(Math.random()*55);
num2 = Math.floor(Math.random()*55);
num3 = Math.floor(Math.random()*55);
num4 = Math.floor(Math.random()*55);
if (num1 !== num2 & num3 & num4) {
card1.gotoAndStop(num1);
error = "yees";
} else {
num1=Math.floor(Math.random()*55);
}
if (num2 !== num1 & num3 & num4) {
card1.gotoAndStop(num1);
error = "yees";
} else {
num2=Math.floor(Math.random()*55);
}
if (num3 !== num1 & num3 & num4) {
card1.gotoAndStop(num1);
error = "yees";
} else {
num3=Math.floor(Math.random()*55);
}
if (num4 !== num2 & num3 & num4) {
card1.gotoAndStop(num1);
error = "yees";
} else {
num4+Math.floor(Math.random()*55);
}
card2.gotoAndStop(num2);
card3.gotoAndStop(num3);
card4.gotoAndStop(num4);
}and the code on the script frame: ----------------------------------------------------------- ///frame 1 Actionscript:
stop(); var bet25=25; var bet50=50; var bet100=100; Number(credits=1000); card1.stop() card2.stop(); card3.stop(); card4.stop(); //frame 2 stop(); Last edited by [PAUL FERRIE] : 08-03-2006 at 06:36 PM |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Available: Flash Game Developer | OSS | Work/Job Opportunities | 1 | 10-17-2007 11:09 PM |
| $$$ We're paying to sponsor game designers! $$$ | Westech | Work/Job Opportunities | 7 | 03-27-2007 01:09 AM |
| Flash action script game programmer needed in las vegas | sjelveh | Game Programming |
0 | 07-24-2006 09:32 PM |
| Need help making a flash game (dress up game) | peanuts | General Flash | 1 | 02-20-2005 12:39 PM |
| Postnuke Flash Game Developers Wanted | Northern | Work/Job Opportunities | 0 | 10-30-2004 12:07 AM |

Programming Languages



