Have loaded a php variable into flash but cant apply it in a function...

Posted by Paul Elliot on Stack Overflow See other posts from Stack Overflow or by Paul Elliot
Published on 2010-01-29T15:50:02Z Indexed on 2010/04/15 7:03 UTC
Read the original article Hit count: 330

Filed under:
|
|
|
|

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

© Stack Overflow or respective owner

Related posts about actionscript

Related posts about php