Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: return vars from Perl to Flash |
From: | Geoff Choo |
Date: | Tue, 9 May 2000 19:05:52 +0100 |
Hi,
Here's a bit of Perl script that will take a text string and URLencode the
spaces, control and punctuation characters.
This code fragment assumes that you have a field variable named "list" in
our flash movie.
$string = "This is the string to encode";
# We URL encode the text string here #
$string =~ s/(\W)/sprintf("%%%x", ord($1))/eg;
print "Content-type: text/text\n\n";
print "list=$string";
If you need a bit more help with the perl script or have any questions,
don't hesitate to get back to me.
cheers, geoff
At 16:48 09/05/00 +0100, you wrote:
>Date: Tue, 09 May 2000 09:26:28 -0400
>From: Helen Triolo <designeri-technica [dot] com>
>Subject: FLASH: return vars from Perl to Flash
>
>Any Perl scripters out there? I sent this a couple weeks ago and never
>got a response--thought I'd try one more time just in case someone
>knows...
>
>Could someone give me the correct 2 lines to return two variables to
>Flash from a Perl script. The following doesn't seem to work:
>
>print "Content-type: text/plain\n\n";
>print "ivar=5&svar='string of text'";
>
>Is that the right content-type? And how do you include a string of
>text, especially if it includes non-URL-encoded chars like spaces?
>
>Thanks in advance,
>Helen
Geoff Choo, Chief Engineer
Collective Wisdom Inc.
geoffchoocollective-wisdom [dot] com
"collective...making the complex clear"
http://www.collective-wisdom.com
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml
Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
Re: FLASH: return vars from Perl to Flas, Helen Triolo
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]