Check this Code please
- Started
- Last post
- 3 Responses
- phlojonaut
I am no Action script guru, i'm a designer, but I know enough to make my flash movies somehow intelligent :)
Please help me out with this if you can...
I defined a variable
answer1 = flase;
on the first frame of the moveia few frames later
i have a button called next with the following script:on (release) {
if (answer1 = true) {
nextFrame();
_root.TOP.play();
_root.BOTTOM.play();
}
else {
_root.error.nextFrame();
}
}in other words, this button ( an next button) should check to see if that variable is true, and if it is not, it should play a movie, the "error" movie...
the variable is being changed by other buttons on the screen...
in any case...
as of right now.... even tho' the variable answer1 = false, when i click the next button ( the one with the long script above) this variable cahnges to true, and the movie continues, this is instead of playing the error movie, which is what i need it to do...Please look over this if you can, have time, and let me know if you see something i'm not seeing...
thanks a bunch
- motivdesign0
Change this:
if (answer1 = true) {
To this:
if (answer1 == true) {
- motivdesign0
By using == instead of = you're actually checking for an equality instead of setting the variable itself.
- phlojonaut0
yeah for real.....
thanks man....i completly forgot that one "=" is used for declaring variables
i love you man :)