Flash Return VAr

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Flash Return VAr

Post 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]
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

... What is '[VARIABLE]'?
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post 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;
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Better said,

how to get --> recibe.decrypted into MyVariable = Testing();
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

Post 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.
Post Reply