-
I only have until friday (may 5th) to have the framework for this up and running, so as you can imagine, I'm sweating it. How do I get CGI (or PHP, it doesn't matter) to write flash variables to a text file? The CGI script that I wrote doesn't work and I'm stuck. Also, is there a way to run a CGI script in flash without having the browser go to another page? Any help would be GREATLY appreciated!
Thanks,
Jaime
-
Senior Member
Toony, you have to write the variables in the following format ( in .txt file ):
var=value
in Perl use
$variable='var='.value;
write it to a file.
use LoadVariables in Flash
create a variable name=eval( "var")
create a txtfield named name.
This is verry basic as you see hope it helps
Mad-Sci
-
Thanks so much! You are a lifesaver (and a genius.) One question though. What is the appropriate code to have perl write to a file? I have been using:
open(FILE, ">variable.txt");
print FILE $buffer;
close(FILE);
But, I'm new to perl, and I am unsure if its correct.
Thanks again for the help.
"Toony"
-
Senior Member
Toony, the question is do want to append to file or not. If you want to append use:
open(FILE, ">>variable.txt");
print FILE $buffer;
close(FILE);
but you have to have a counter to create an array something like:
$Flash_var='name'.$counter.'='.$value.'&';
so you get:
name1=value&name2=value$....
call input_name=eval("name"$count);
see what i mean.
Mad-Sci
-
I really didn't want to append the file, just overwrite what was already there. All I am doing is saving certain user info into a text file. Thanks for your help!
Jaime
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
|