I am currently trying to make a login system in Flash.
I tried downloading this source:
http://active.tutsplus.com/tutorials/actionscript/create-a-flash-login-system-using-php-and-mysql-part-1/
My only problem at this moment is that I want to make it change to next frame if the value is “1”.
So I changed this:
result_text.text = "" + event.target.data.systemResult;
Into this:
if (event.target.data.systemResult == "1") {
result_text.text = "Welcome!!";
this.gotoAndStop('2');
} else {
result_text.text = "" + event.target.data.systemResult;
}
But then it just says “Welcome!!” but it doesn’t go to next frame -.-‘
Does anyone have any ideas?
thisis your event in that context, because you’re in an event handling closure.Try
MovieClip(root).gotoAndStop(2);And make sure you lose the ” from around the 2, as @SrRichie already suggested.
From your screenshot, this should also work:
If
rootis null (and I haven’t looked through the tutorial you reference in detail, so I’m not sure), you may need to create a variable earlier in your code to refer toroot, and then callgotoAndStopon that.