Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

HTML Form -> HTML output + Flash

by wil (Priest)
on Dec 11, 2002 at 10:43 UTC ( #219053=perlquestion: print w/replies, xml ) Need Help??
wil has asked for the wisdom of the Perl Monks concerning the following question:

I'm playing around with loading form variables into Flash and I'm running into some logistical problems as well as some programming ones.

This is what I am trying to do:

1. HTML Form to be filled out by user.
2. HTML page outputted including a Flash movie (on the page), which needs to read a few variables from the form, filled out earlier.

Now I'm just having problems getting my head around loading up a HTML page and making available the variables to Flash. Why? Well, I need to output a Content-type:text/html to the browser to render the HTML and it seems I need to output a document-www-form type header for the Flash to be able to read the variables.

So how do I go about this? Can I write a script that outputs a text/html header and outputts HTML _and_ include a flash movie on that page that also needs to access the variables sent from the html form on the previous page?

I'm sure this is all relatively simple. I just need to get my head around it. Thanks for any help you can offer.

- wil

Replies are listed 'Best First'.
Re: HTML Form -> HTML output + Flash
by Jaap (Curate) on Dec 11, 2002 at 13:45 UTC
    The embedded flash movie (.swf) is not going to connect to the server separately to get the form variables is it?

    I don't know where you found the "document-www-form type header" (post your source) but this might not be for you.
(wil) Re: HTML Form -> HTML output + Flash
by wil (Priest) on Dec 15, 2002 at 14:39 UTC
    After much fiddling I found out that you can pass variables to flash directly in the HTML embed code of the webpage. For example:

    <embed src="flash.swf?var1=var1;var2=var2" quality="high" pluginspage= +"http://www.macromedia.com/go/getflashplayer" type="application/x-sho +ckwave-flash"></embed>

    A working version of this can be found here.

    Have fun! :-)

    - wil

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://219053]
Approved by Bukowski
help
Chatterbox?
[abner]: yes. i am familiar with mysql but ignorant about how to get around the fact that placeholders can only represent single scalar values.
[abner]: my $sth = $dbh->prepare(' SELECT * FROM charge WHERE cpt = ?') or die "Couldn't prepare statement: " . $dbh->errstr;
[abner]: what if i want SELECT * FROM charge WHERE col1 = x and col2 = y?
[atcroft]: abner: So you are wanting to do something like my $sth = $dbh->prepare(' SELECT * FROM charge WHERE col1 = ? and col2 = ?;'); $sth->execute(' asdf', 'asdw');?
[atcroft]: (Full disclosure: I may have the idea right but small typographical errors, so please test any code I suggest. :) )

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2017-01-24 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (202 votes). Check out past polls.