A Flash Developer Resource Site

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Feb 2007
    Posts
    7

    gotoAndStop problem

    I have the following code in frame 1 of my swf.
    The php code is definately returning all the variables back to the swf correctly (i have checked), but the swf is NOT jumping to frame 2 as it should do ?????

    The problem is definately in the AS code where if the variable called "commence" is "yes" then go to frame 2.

    P.S
    Im using Flash 8.

    Thanks in advance.


    ---------------------ACTIONSCRIPT CODE BELOW----------------------


    _root.login_btn.onRelease=function() {
    if (passinput.text == "") {
    statusnote = "Field Empty";
    }
    else {
    statusnote = "Authenticating - Please Wait......";
    loadVariablesNum("sitelogin.php", 0, "POST");
    }
    }


    cancommence = function() {
    if (commence == "yes") {
    gotoAndStop(2);
    }
    }

    cancommence();

    stop();



    ----------------PHP CODE BELOW------------------------


    <?
    $pass=$_POST['pass'];
    //connect to database
    if ($pass){
    mysql_pconnect("blah blah.net","blah blah","blah blah") or die ("didn't connect to mysql");
    mysql_select_db("blah blah") or die ("no database");
    //make query
    $query = "SELECT * FROM v2members WHERE sitepassword = '$pass'";
    $result = mysql_query( $query ) or die ("didn't query");
    //see if there's an EXACT match
    $num = mysql_num_rows( $result );
    if ($num == 1){
    echo "&statusnote=Password Accepted&commence=yes&";
    } else {
    echo "&statusnote=Authentication Failed !&commence=no&";
    die();
    }
    }
    ?>

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    plymouth-uk
    Posts
    313
    i have seen this thread some where before......;-)
    NOW! look whats happened! I told you to watch this space and now its gone.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts




Click Here to Expand Forum to Full Width


HTML5 Development Center