-
[MX04] Who wants to be a millionaire
Hello,
My name is Chinmaya and this is my first post.I am currently making a who wants to be millionaire game with lifelines.I have got everything I need except the correct code for lifelines.The problem I am having is that when a person plays the game,once the lifeline is used and the answer is correct,the lifeline gets renewed on the next question.For example-
If a person is answering the first question and uses 50-50 lifeline,two answers of the total four get removed.If the person answers right then,when he reaches the next question the lifeline can be used again.
THANK YOU IF YOU CAN HELP ME.PLEASE HeLP ME!!
-
When you start the game set variables like:
fiftyfifty=true;
askaudience=true;
phonefriend=true;
As each one gets used, check whether they are "true" then set them to "false" after the player has used them.
-
Thank You A Lot!!!!!
Thank you very much.You are the first person wh ohas ever replied to my posts on this site or any other.Once again THANK YOU!!!!!!!
-
Hehe! no problem my friend.
-
A little problem!
I wrote and tried a code but I think I have made a mistake in writing it.Can you check it.
On first frame-
stop();
var fiftyfifty=true;
On button(fifty fifty) on the frame frame-
on(press){
var fiftyfifty=false
}
Some other also effects like remove these particular choices
On second frame(A frame with a new question)-
if(fiftyfifty=false){
var fiftyfifty=false}
This was my code,but still the fifty-fifty works in the second frame even after being used in first frame.(please dont make fun of my mistakes if I have made a very silly one).
IF THIS CODING IS TOTALLY WRONG,PLEasE Can YOU SEND ME ANOTHER CODE.
-
...dishing dimes on an .fla!
As Steve said, set up the variables at the beginning of your code...
code:
var fiftyfifty:Boolean=true;
var askaudience:Boolean=true;
var phonefriend:Boolean=true;
you don't want the 'stop();' action before these variables either...
Then, on your buttons...
code:
on(press){
_root.fiftyfifty=false;
}
On your second frame with your next question, why not try removing the buttons?...or going to a different instance of the fiftyfifty mc / button?...I don't know how your .fla is set out, but add this to your fiftyfifty mc if you have one...
(eg)
code:
if(_root.fiftyfifty==false){
this.removeMovieClip();
}
Or, you can change the 'this.removeMovieClip();' line to 'this.goToAndStop(2);'. Whereby, frame 2 could for example be a copy of the fiftyfifty logo / image but in b&w to sybolise you can't use that option anymore....??? (Just an idea)
edit :: forgot to say you need the extra '=' in the '==false' bit to check for equality.
-
I Get It!
OK!Now I understand.I'll try this and get back to you.Thanks!
-
I tried it and it doesn't work.Maybe i'm making a mistake again.I'll tell you an exact copy of what i was doing.
I MADE 2 FRAMES.ON FRAME 1- I wrote 1 with the pencil.
ON fRAME 2- I wrote 2 with the pencil.(did this just to diffrentiate between the frames.
On Frame 1-I made 2 buttons(1 fiftyfifty and one button for frame change(from frame 1- frame 2)
On Frame 2-I made 1 button which was the exact replica of the fiftyfifty in frame 1.
On frame 1,I put the code-
var fiftyfifty:Boolean=true;
stop();//need it for stopping the current frame
On button fiftyfifty on frame 1.I put the code-
on(press){
_root.fiftyfifty=false
}
On next button in frame 1 I put the code-
on(press){
gotoAndStop(2)
}
On frame 2 in the button fiftyfifty,I put the code-
on (press) {
if (_root.fiftyfifty == false) {
this.removeMovieClip();
}
NOW I CLICK ON FIFTY FIfTY IN FRAME ONE,THEN I REACH FRAME 2 BY CLICKING on THE BUTTON.but NOW WHEN I CLICK ON THE FIFTY FIFTY ON FRAME TWO,IT DOES NOT GET REMOVED.
HeLP!!!!!!!!!!!!!!!!!!!!!!!!
IT TOOK ME A WHILE TO WRITE THIS MESSAGE.
-
Senior Member
You cant use removeMovieClip() to remove movie clips placed on stage manually, it works for stuff added dynamically with attachMovie or duplicateMovie.
You could just hide the mc:
Instead of
this.removeMovieClip();
try
this._visible=false;
-
-
...dishing dimes on an .fla!
Cool...let us all see this when you have it published...
Interesting to see how it turns out.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|