I recive value’s from a php-file into a movieclip called VarClip embedded in root via a submitbutton with this action:
LoadVariablesNum(“name.php”, _root.VarClip, “POST”);
The value’s are received there because I have dynamic-text boxes checking them…and they fill with the appropiate values…
so far so good…
But I need the values received to be available on a global-level so I can share them with other Clips in my Flash movie as well…
Is there a way to bind those values to global values when the arrive??
for exaple when I receive value pName from name.php:
to do something like to make this received variable global???
_global.gName = pName
This doesn’t seem te work though…
please help…someone…
thnx a million.
I just need the vars to be global, so they are accessible for every MovieClip in every timeline on every level…
I’ve tried serveral ways but nothing seems to work…
I origanally receive those value’s from a php -file and want to make them global…
Can you tell me how?
I’ve tried to make a container and want to load them into but the command
sendContainer.sendAndLoad(“name.php”, loadContainer)
doesn’t seem to load them into loadContainer at all…???
But I’ll put in a post where I’ll upload my whole code so you can have a better Idea what i’m doing…
Back again, here’s my code:
The whole thing has 3 frames,
I’ve got 2 inputtextboxes and a submit button in the first frame:
input-text userinput which gives var: user
input-text passinput which gives var: pass
submitbutton
…
In the first frame I’ve got this action
stop();
userinput.restrict=“a-zA-Z0-9”;
Selection.setFocus(userinput);
passinput.restrict=“a-zA-Z0-9”;
status=“Enter your information and submit”;
this.onEnterFrame = function () {
//vanaf hier is het spannend
if($checklog == 1){
_root.gotoAndStop(2);
}
if($checklog == 2){
_root.gotoAndStop(3);
}
}
…
On the submitbutton I’ve got this action:
on (release, keyPress “<Enter>”) {
if (user != “” && pass != “”) {
// Create varcontainers
sendContainer = new LoadVars();
loadContainer = new LoadVars();
// Set vars
sendContainer.username = user;
sendContainer.passwrd = pass;
status = "Begin Login Process - Wait...";
//textbox01 = sendObject.username;
//textbox02 = sendObject.passwrd;
// Start connection
sendContainer.sendAndLoad("newlogin.php", loadContainer);
checklog = loadContainer.checklog;
}
}
…
The reason I want to do this, is that I want to let the user loggin once, but immediately retreive all his/her data from the server, which i can then use later on in the movie…(color prefs, location, male/female info etc.etc)
Thats why I want them to go into global variables so I can do that…
Hope you understand me so you know what i’m trying to accomplish, my english is not that good…
Thnx a million