View Full Version : Post array
Harkole
10-24-2001, 04:07 PM
Is it possible to post to a text file, the results of a array?
if this is from a flash player, do a search on the "fscommand"
if it is from a browser, your gonna have to learn some backend scripting like php,asp,cold-fusion, cgi etc.etc.etc.
Harkole
10-25-2001, 07:27 AM
Its from Flash 5. Thanks for the pointer though!
Jesse
10-25-2001, 07:47 AM
ad note that whatever method you use, flash willa utomatically pass your array as a comma separated string... unless you use XMLSocket
Harkole
10-25-2001, 09:33 AM
I'm working through the code from the E-Cards tutorial now... Dare say if I don't fathum it I'll be posting again! :D I think I'm following it so far and with some of my own tweaking may get there...
At least I know I can get it to read back!!! Its just this writeing to a data.txt file I'm having fun with! :(
Harkole
10-25-2001, 10:44 AM
I tried three diferent combinations, now I don't have an array, but also I don't get the variables to save to a .txt file... help me then you can shoot me if its something simple I'm missing, here is the "current" code...
on (release) {
uniqueID = Math.round(Math.random()*1000000);
if (layoutString != null) {
layoutString = layoutString + ", " + uniqueID + ", " + name + ", " + comment;
} else {
layoutString = uniqueID + ", " + name + ", " + comment;
}
gotoAndPlay (2);
loadVariablesNum ("data.txt", 0, "POST");
fscommand ("save", data.txt);
}
and here is the output from output window (this also works fine when outputed to a dynamic text box)...
Variable _level0.name = "Harkole"
Variable _level0.comment = "First Post"
Variable _level0.uniqueID = 193494
Variable _level0.layoutString = "193494, Harkole, First Post"
Help I'm going bald... fast!
Harkole
10-25-2001, 11:27 AM
OK I just found this script:
on (release) {
fscommand ("exec", "command.com\t/c\techo\ttxtInput\t>>writeFile.txt");
}
I now have two new problems :( the first....
Where in the code (posted above)?
The second...
What exactly does it all mean?
Thanks....
P.S Anyone got a wig?
red penguin
10-25-2001, 01:00 PM
check out this thread from were-here...
http://www.were-here.com/forums/showthread.php?threadid=43302
should answer a few questions you might have...
here (http://www.actionscripts.org/forums/showthread.php3?threadid=4357&highlight=save%2A+and+text) is where I found it...
Harkole
10-25-2001, 02:17 PM
OK its not playing nicly people...
Is it because I'm using Windows 2000nt SP2 with IE6 ???
Jesse
10-26-2001, 12:55 AM
woah nelly. let's go back a step. can you get a basic test case with the fscommand to work, with just one variable for instance?
if so, can you get it to work with an array?
Harkole
10-26-2001, 09:13 AM
nope and nope.... I even found the code on a forum copy and pasted it in and nothing, then found another (long winded) version using the command.com and that failed as well, that was only meant to store a fixed variable not even a input text box, but when I changed it to see if a text box would work, naadaa, the square root of nought!
Any thoughts Jesse?
Jesse
10-26-2001, 12:20 PM
This hsould work jsut fine:
myVar = "someValue";
fscommand ("save", "myFile.txt");
it does for me, on Win2k, SP2.
Keep in mind it works ONLY via the projector, not via the browser.
red penguin
10-26-2001, 12:52 PM
Harkole: How's the hair situation?
Harkole
10-26-2001, 02:34 PM
Originally posted by red penguin
Harkole: How's the hair situation?
How does Alapecha sound? (excuse the spelling)
Stand by for code test......
Harkole
10-26-2001, 02:44 PM
ok I here-by stand ready to be shot down in falmes.... :eek:
although no-one said this...
YOU HAVE TO BE in the published ".exe", its no good debugging, or publish preview... actually have to be in the ".exe" :D
if I was better at ascii art I would draw a big bullseye below, however you'll just have to pretend.... :p
Thanks for ALL the help people I needed it!!!:rolleyes:
It also feels like the hair on my head might be re-growing 2!
Jesse
10-27-2001, 12:54 AM
the SWF will do it too, just not in the Test Environment, which counts like a borwser for the most part.
|
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.