[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgi-list
Subject:    Re: [CGI] CGI <-> Flash communications
From:       tedd <tedd () sperling ! com>
Date:       2003-11-20 15:40:13
[Download RAW message or body]

William:

Bingo -- that worked!

However, I found out that all one has to do is to change the embed 
portion to send a variable into flash. From the Flash side, I used an 
URL statement to pull out the url with the variable.

Many thanks. It sure is nice to get an answer to my question. Too bad 
I had to go to another forum to get it.

tedd


PS: It's also interesting that I sent two identical emails to this 
list and I received an answer before I received back my original post 
-- In fact, I still haven't seen it come back to me.
---


> Hi
> 
> I did this last Christmas for a few ecards we were running at:
> 
> http://www.rachelsorganic.co.uk/ecards/
> 
> I ended up using code such as the following to pass parameters into the Flash:
> 
> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
> codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" \
>  width="500" height="325">
> <param name="movie" 
> value="card3.swf?FromName=&ToName=&ToEmail=&FromEmail=&message=">
> <param name="quality" value="high">
> <embed 
> src="card3.swf?FromName=&ToName=&ToEmail=&FromEmail=&message=" 
> quality="high" 
> pluginspage="http://www.macromedia.com/go/getflashplayer" 
> type="application/x-shockwave-flash" width="500" 
> height="325"></embed></object>
> 
> As you can see, I embeded a flash file 'card3.swf' and then passed 
> the parameters after that. This seemed to work for me. I have no 
> idea if this is a dirty hack and if this is suppose to be the 
> 'correct' way but it work, so, it stays.
> 
> Hope this helps.
> 
> Wil.
> 
> On 20 Nov 2003, at 14:29, tedd wrote:
> 
> > Hi:
> > 
> > Has anyone done any communications with Flash using cgi? In other 
> > words, has anyone been successful in passing data back and forth 
> > between the two.
> > 
> > Here's what I want to do:
> > 
> > 1.  Have Flash run a cgi script. I have no problem there -- in Flash it's a:
> > 
> > 	getURL("your.cgi");
> > 
> > 2.  Have the cgi script discover what web page called it. Again 
> > that's no problem, in my cgi script I use:
> > 
> > 	my $myURL = $ENV{REQUEST_URI};
> > 
> > 3. Finally and simply, have the Flash file receive the $myURL 
> > variable. *** This is where I'm having mondo problems ***
> > 
> > 
> > While I can successfully send variables to my cgi scripts, I can't 
> > get anything back from them to my Flash program. I know that I can 
> > have the cgi script write a text file and then have my Flash 
> > program read the text file, but that's a kludge.
> > 
> > I can't seem to get the cgi program to deliver the $myURL variable 
> > directly to Flash. In Flash they say that a LoadVariables() 
> > statement will do it provided that the cgi program will POST/GET 
> > the data. However, for a cgi script to POST/GET data, I believe 
> > that a submit needs to be performed via a form -- but, I don't know 
> > how to bypass the submit and just have it send the damn data. I'm 
> > bummed and confused.
> > 
> > Has anyone done this before? If so, I sure could use some direction 
> > -- I've been stumped for over a week with numerous postings to 
> > several different forums with absolutely no success. While everyone 
> > says it's possible, I have yet to find anyone who has done it. Or, 
> > more importantly anyone who would provide an example.
> > 
> > In any event, thanks for considering.
> > 
> > tedd
> > 
> > --
> > --------------------------------------------------------------------------------
> > http://sperling.com/
> > --
> > The CGI-LIST is sponsored by:
> > www.DinnerBroker.com!
> > Fine dining up to 30% off!
> > Exclusive access to tables!
> > http://www.dinnerbroker.com/
> > 
> > To unusbcribe, send an email contining the words: 'unsubscribe 
> > cgi-list' to the following email address: majordomo@jann.com
> > 
> > Archives of the following mailing lists are available at: 
> > http://www.perl.jann.com/
> > the CGI Mailing List
> > the mod_perl mailing list
> > the embperl mailing list
> > Searching, browsing and posting are available at http://www.perl.jann.com/
> > 
> > No one may in any way attempt to data-mine or archive the
> > mailing list for financial gain without the express permission
> > of Jann.com.
> > 
> --
> Wiliam Stephens
> 
> FBA MEDIA
> 
> Tel: 01970 636412
> Mob: 07976 018617
> 
> http://www.fbagroup.co.uk/


-- 
--------------------------------------------------------------------------------
http://sperling.com/
--
The CGI-LIST is sponsored by:
www.DinnerBroker.com!
Fine dining up to 30% off!
Exclusive access to tables!
http://www.dinnerbroker.com/

To unusbcribe, send an email contining the words: 'unsubscribe cgi-list' to the \
following email address: majordomo@jann.com

Archives of the following mailing lists are available at: http://www.perl.jann.com/
the CGI Mailing List
the mod_perl mailing list
the embperl mailing list
Searching, browsing and posting are available at http://www.perl.jann.com/

No one may in any way attempt to data-mine or archive the
mailing list for financial gain without the express permission
of Jann.com.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic