A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: gotoAndStop problem

  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 the frame labelled "home" as it should do ?????

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

    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("home");
    }
    }

    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
    on this:
    cancommence = function() {
    if (commence == "yes") {
    gotoAndStop("home");
    }
    }
    the function is declared wrong?? me thinks

    function cancommence() {
    if (commence == "yes") {
    gotoAndStop("home");
    }
    }
    Well in MX 04 its that way so just s thought :-)
    NOW! look whats happened! I told you to watch this space and now its gone.

  3. #3
    Junior Member
    Join Date
    Feb 2007
    Posts
    7

    still didnt work

    you were right, but unfortunately it still doesnt work :-(

    Thanks anyway.

  4. #4
    Senior Member
    Join Date
    Aug 2004
    Location
    plymouth-uk
    Posts
    313
    do you want to post the fla file up [MX04 version] and will look at it for ya :-)
    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