I know that this is quite a late reply, but I have just recently installed Flash 5 and have an answer to this question.
IlyaM is definitely on the right track. Using a perl script to output the URLs to the swf file is the way to go.
Example:
First let's create the flash (swf) file:
- Create a new flash project.
- Select one of the shape tools (square, circle, etc) and draw a quick shape.
- Use the 'select tool' to select the shape and hit F8 (or go to Insert->Convert to Symbol) Select the button option and hit OK.
- Right-click this button on your stage and select 'Actions'. This is where ActionScript comes into play
- Click the right-pointing arrow at the top of the little 'Actions' window. Select the 'Expert Mode' option.
- Copy and paste the following code into the right-hand side textbox:
on (release) {
loadVariablesNum ("/path/to/script.pl", 0);
getURL (address, "_blank");
}
- Make sure you replace "path/to/script.pl" to the path of the perl script.
- Note that the getURL() function is passed address and not "address". This is because address is the variable name we will send to flash via the perl script.
Next up we have the perl script:
1. Open your favorite script editor and enter the following code:
#!/path/to/perl -w
use strict;
use URI::Escape;
my $url = "http://www.yahoo.com";
print "Content-type: text/plain\n\naddress=$url";
2. $url is the URL of the page you want flash to open when you click that button you created. Note that the script passes the url via the 'address' variable.
There, you have something that works! Of course, this could be made much better by allowing the passing of multiple URLs to the flash file, but that can be homework ;)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.