Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: SuperFly CGI ! |
From: | PSWoods |
Date: | Fri, 20 Oct 2000 22:51:34 +0100 |
that kind of thing is SuperEasy to do with Perl (anyone remember Perl)?
i seem to remember there being a lot of interest in this among people who
built games - to save a high score or something. this code will read all
your value pairs and write a text file in urlencoded form that flash can
read. it will overwrite the file each time you call it.
#!c:\Perl\bin\Perl
#use strict;
use CGI qw(:standard);
$cur = CGI->new();
#change this to a good location
$fileLocation="C:/x/tempfile.txt";
if (param()) {
&printer;
} else
print "errorMsg\=error";
}
sub printer{
&openFile;
@stuff = param();
foreach (@stuff){
print MYFILE $_;
print MYFILE "\=";
print MYFILE $cur->param($_);
print MYFILE "\&";
}
&closeFile;
}
#this was made on a Win machine. you might have trouble with file locking on
a X-nix server.
sub openFile{
open (MYFILE, ">$fileLocation") || die "Can't open: $!";
($LOCK_EX = 2) || die"canot flock: $!";
}
sub closeFile{
truncate(MYFILE, tell(MYFILE)) || die "Can't truncate: $!";
close(MYFILE) || die "Can't close: $!";
}
Regards,
PSWoods
http://pswoods.com
Author of Flash 5 Developer's Guide by Osborne-McGraw Hill
----- Original Message -----
From: "Charles Goran" <cgoranfood [dot] com>
To: <flasherchinwag [dot] com>
Sent: Friday, October 20, 2000 12:55 PM
Subject: FLASH: SuperFly CGI !
> Hi everyone,
>
> I'm in desperate need of a superfly CGI script that will write variables
from
> flash to a text file and over write any variables that may have been
written
> before. I've checked all of the online resources that I could find, but
all I
> found were CGIs for things like dates and clocks.
>
> Thanks in advance!
>
> Cheers,
> Charles Goran
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: barneys.com source, Erik Kittlaus
Re: FLASH: barneys.com source, derrickito
FLASH: SuperFly CGI !, Charles Goran
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]