View Full Version : else gotoAndStop issue

04-26-2012, 05:14 PM
Hey Everyone,

I'm working on a mock system for training purposes at my job, and the first part of the training system is to setup a mock password protection system. I don't really care that someone could decompile the Flash document and find my user info, so I'm not going to any great lengths to keep it safe.

I have a Flash AS3 document where when someone signs in, if they use the correct username it will take them to a frame labeled "select_service" and if they use an incorrect username it will take them to a frame labeled "access_denied." So far, I've been able to get the correct user info to get the movie to "select_service" but incorrect user info will not advance to "access_denied."

I'm driving myself nuts trying to see what I did wrong here. Can anyone see where I might have made a mistake? Here's my AS (kept, of course, on a top level AS layer):

stop ();

submit_btn.addEventListener (MouseEvent.CLICK, passcheck);

function passcheck (event:MouseEvent):void{
if(company_input.text == "company" && user_input.text == "user" && pass_input.text == "$wisher1"){
gotoAndStop ("select_service");
else {
gotoAndStop ("access_denied");

04-26-2012, 09:48 PM
No worries, guys. Found the problem. Had a bad frame label. Thanks.