Have loaded a php variable into flash but cant apply it in a function...
- by Paul Elliot
hi I have created an actionscript function which stops an animation on a specific frame which works fine. I have then loaded in a php file with a variable which will contain the number for the frame i want the animation to stop on. This has loaded in fine and i have loaded it in a function. what i cant seem to do is to get the variable into the function which tells the animation to stop playing.
here is my code:
//load variables
varReceiver = new LoadVars(); // create an object to store the variables
varReceiver.load("http://playground.nsdesign6.net/percentage/external.php");
//load variables
//function1
varReceiver.onLoad = function() {
//value is the var that is created.
var paul = this.percentage;
}
//function1
//function2
this.onEnterFrame = function() {
if(this._currentframe==(percentage)) {
this.stop();
this.onEnterFrame = undefined;
}
}
play();
//function2
cheers
paul