-
Passing variable from php4 to flashMX
What script to I need to pass a variable set in a PHP4 file to MX.
PHP Line is...
$flashText = "a string";
MX line is...
????
-
try this:
php:
PHP Code:
$flashText = "&flashtext=a string";
echo $flashtext;
then you can access it as a variable like this:
var loader = new LoadVars();
loader.onLoad = function(done) {
if (done) {
trace(this.flashtext);
}
};
loader.load(somefile.php);
-
Thanks spacether,
More specificly I am trying to pull the variable off of a URL string.
http://www.whatever.net/Select.PHP?T...5393924&ENum=1
I am trying to use the Text variable.
I tryed this, with no success...
loadVariablesNum("http://www.whatever.net/dbText/"+Text+".txt", 0);
am I way off?
-
hmmmm
Their are two methods: The method you want is get but post is much better:
Loadvars-As the guys descibed above is the post mehtod it is the one id recommend but i dont know what your tryin to do
Get-look in flash for GetURL (atleast I think thats the command).....ohm let me think a while get URL should get you started though; that will pull the information off of a URL encoded string
You may be delving into a more advanced topic....but I still dont see why you dont just directly access the information behind the scenes, descirbe your problem more in depth i need some background on the problem.
I will own you, with ease, have a nice day.
-
Blood_God,
The user fills out a form then the PHP file emails another person with the information the user filled out. Sort of like those greeting cards you see.
The info from the form is being stored in a txt file that is randomly named by the php file. Therefore I can not hard code the URL in the flash file because it changes for each form that is filled out.
The URL I put down, in my pervious message got changes some how. the last part should be..
Select.PHP?Text=75393924&ENum=1
Text is the name of the txt file on the server.
Basicly all I need to do is have my .swf read the Text variable. For some reason I can't get it done.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|