Page 1 of 1

Flash Return VAr

Posted: Fri Jul 27, 2007 5:38 pm
by ol4pr0
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hello Folks,


Quick question, trying to do some action script however its not going to well.

[syntax="actionscript"]
function testing() {
    envia = new LoadVars();
    flvURL = "BDAGMgdzVTFYel5tVCZUZQR3WzALPgl3";
    envia.r = flvURL;
    recibe = new LoadVars();
    envia.sendAndLoad("http://localhost/web/crypto.php", recibe, "POST");
    recibe.onLoad = function(recibido) {
        if(recibido) {
	trace(recibe.decrypted);
        }
    } return [VARIABLE];

}
myVariable = testing();
Inside the code trace is working nicely, however when i am trying to return the var, its says UNDEFINED

Please Advise!


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Fri Jul 27, 2007 6:36 pm
by superdezign
... What is '[VARIABLE]'?

Posted: Wed Aug 01, 2007 5:26 pm
by ol4pr0
Whats vriable,

How to get any variable returned from a ActionScript . Cuase i am having troubles doing so..

In this case how to get recibe.decrypted to myVariable;

Posted: Sat Sep 01, 2007 6:17 pm
by ol4pr0
Better said,

how to get --> recibe.decrypted into MyVariable = Testing();

Posted: Sat Sep 01, 2007 6:39 pm
by ianhull

Code: Select all


function testing(myVariable) { 
    envia = new LoadVars(); 
    flvURL = "BDAGMgdzVTFYel5tVCZUZQR3WzALPgl3"; 
    envia.r = flvURL; 
    recibe = new LoadVars(); 
   
    envia.sendAndLoad("http://localhost/web/crypto.php", recibe, "POST"); 
    recibe.onLoad = function(recibido) { 
        if(recibido) { 
        trace(this.decrypted.text); 
        _global.testing = this.decrypted.text;
        } 
    } 

} 

testing(myVariable);

//or

testing(_global.testing);


try and tell me exacltly what you are trying to achieve. and I should be able to help.