-
Really newbie question.
So, I'm making a flash game, its a quiz game. I want lives in it, so when you miss a question you loose a life.
I cant find anything that can help me..
What I want to ask is, is there anyway to make a movie clip with say;
Frame 1;
Lives: 3
Frame 2;
Lives: 2
Frame 3
Lives: 1
Then a game over page.
How would I go about doing this? Everytime I do it, it just counts the question as a right answer and goes to the next frame.
Here is the code I am using.
on(release){
gotoAndStop("lives", 2);
}
What am i doing wrong?
-
first create a text box and set it to dynamic text. set the variable name to lives. remember to set an instance name. set your lives = 3. then set a var for your answer. if (answer == false) { lives --; }
-
Client Software Programmer
yeah do the frames thing, add an extra frame 4 though that has 0 lives and than code that frame like onEnterFrame gotoAndStop(whateverframe) get me?
-
Designer, Programmer, Musician
Do what rachelg said. Don't need to use movieclips or frames. Just use the first frame, make a Dynamic Textbox with the variable name to lives Then put this script on the 1st frame: And everytime you get a wrong answer put this:
You can then add a frame with the "GAME OVER" thing. Then in the first frame again add this lines:
stop();
onEnterFrame=function(){
if(lives==0){
gotoAndStop(2);
}
Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries
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
|