Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.23 / 5.00 3,881 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.93 / 5.00 4,634 ViewsHello!
Right... so, I know how to use booleans.. to a certain extent.
Firstly I state my boolean exists by calling it a variable.
var attackIsSelected:Boolean = true;
I like booleans mainly due to the ifStatements available
if (attackIsSelected){
trace("attack");
}
Is it possible to use Booleans that have more than the two options of true and false?
I would believe this would be done through Arrays of somesort, although I'm not to familiar with them -especially not in conjunction with Booleans.
I cannot find tutorials for these to this manner either.
Please could you give a basic script on how I can use arrays with Booleans and I'll apply them accordingly
If there were
-4 options my boolean could have
- if statments like if(thisBoolean=quarter)
that would be perfect
I hope this makes sense and isn't too much trouble.
The whole idea of a boolean, is something that only has two states. True or false, 1 or 0.
If you want more, you could simply use an int.
var attackIsSelected:int = 0;
if(attackIsSelected == 0) // is your first state
if(attackIsSelected == 1) // is your second state
if(attackIsSelected == 2) // is your third state
and so on.
At 4/10/13 04:48 PM, 4urentertainment wrote: The whole idea of a boolean, is something that only has two states. True or false, 1 or 0.
If you want more, you could simply use an int.
var attackIsSelected:int = 0;
if(attackIsSelected == 0) // is your first state
if(attackIsSelected == 1) // is your second state
if(attackIsSelected == 2) // is your third state
and so on.
That's perfect, thank you very much!
Btw
Is this not possible?
movieClip1_mc.button1_btn.movieClip2_mc.gotoAndStop(1);
I can't seem to get the movieclip inside the button inside the movieclip to gotoAndStop frame 1
How would I go about it?
Are you sure he's actualy there?
Try some traces like
trace(movieClip1_mc);
trace(movieClip1_mc.button1_btn);
trace(movieClip1_mc.button1_btn.movieClip2_mc);
I code Flash Games! Check out the Stealth Pervert and VOID