dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: gotAndPlay problem

  1. #1
    Junior Member
    Join Date
    Mar 2005
    Posts
    29

    gotAndPlay problem

    hi, im using flash 8 and i have this code in a keyframe:

    Code:
    userinput.restrict="a-zA-Z0-9";
    Selection.setFocus(userinput);
    passinput.restrict="a-zA-Z0-9";
    status="Enter your information and submit";
    this.onEnterFrame = function () {
    	if(checklog == 1){
    		gotoAndPlay(27);
    	}
    	if(checklog == 2){
    		gotoAndPlay(15);
    	}
    }
    now, when it goes to frame 15 it stops. i have no idea why, but i think it maybe be because of the function, im not sure.

    i also have this on a button in the same keyframe:
    Code:
    on (release) {
    	loadVariablesNum("newlogin.php", 0, "POST");
    }
    can anyone help?

  2. #2
    Member Pepember
    Join Date
    Jul 2001
    Location
    Berlin
    Posts
    886
    i guess the problem is that the gotoAndPlay() functions are called over and over again since the onEnterFrame() function isn't told to stop.
    this might help:
    this.onEnterFrame = function () {
    if(checklog == 1){
    delete this.onEnterFrame;
    gotoAndPlay(27);
    }
    if(checklog == 2){
    delete this.onEnterFrame;
    gotoAndPlay(15);
    }
    }
    Please sign here

  3. #3
    Junior Member
    Join Date
    Mar 2005
    Posts
    29
    that worked great! thanks!

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