I am at a loss for this one really. It works on 1 part of the swf but not the other. The following is on a keyframe.
Here's an example of the dig.php output: "status=Sorry, You are not a winner this time&checklog=6" (status is a dynamic text box in the movie).Code:stop(); loadVariablesNum("dig.php", 0, "POST"); //this constantly checks to see if the PHP script has sent //the variable 'checklog' back to the movie and directs accordingly this.onEnterFrame = function() { if (checklog == 5) { gotoAndPlay(58); delete this.onEnterFrame; } if (checklog == 6) { gotoAndPlay(59); delete this.onEnterFrame; } };
Now I've checked and checklog is being received into flash but it won't execute the commands in the onEnterFrame. The weird thing is I have the exact same script at the start of my movie except it's for users logging in:
It's identical and works fine. The only difference is loadVariablesNum is on a button movie clip (On release). I've tried putting the loadVariablesNum on a button for the script that isn't working but, just as I thought, it doesn't make a difference.Code:this.onEnterFrame = function() { if (_root.checklog == 1) { gotoAndPlay("sectorselection", 1); _root.checklog = 0; delete this.onEnterFrame; } if (_root.checklog == 2) { gotoAndStop(3); _root.checklog = 0; delete this.onEnterFrame; } };
You can see the swf here. Log in with user "cvotest" and pass "cvotest" so you have credits. Once you pick your sector you will be taken to a screen which I have cluttered with dynamic textboxes showing all the vars including checklog. You will see checklog=0. Select your square and then press "Dig". The code above then executes. It will then update checklog to 5 or 6 from the php file but the movie won't gotoAndPlay.
I've asked for a lot of help on here recently and have learned a lot from it. I wanted to figure this one out myself but I've searched all day and tried many different things but I'm now starting to give up hope. Can anyone bail me out one more time?![]()




Reply With Quote