Passing var to Flash
| From: | Miles Thompson | Date: | Wed, 23 Apr 2003 16:58:40 +0000 |
| Subject: | Passing var to Flash | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-145047@lists.php.net to get a copy of this message | ||
I'm using a Flash movie which will publish daily sets of news stories.
Writers of course need to preview their work, so they can see how it will look in the movie.
That's where I'm encountering trouble, with the preview.php and preview.swf. The movie
works fine on my test server, but not on the production machine.
It is as if the movie did not receive or accept the date variable passed to it.
Preview.php is called as follows, with the usual submit button.
<form method="post" target= "_blank"
action="preview.php?dtDate=<?php echo $dtLvTo?>">
Preview.php calls the preview.swf with this line, between <OBJECT> tags ...
<EMBED src="AllNS_preview.swf?dtDate=<?echo $dtDate?>" quality=high
bgcolor=#FFFFFF WIDTH="490" HEIGHT="362" NAME="AllNS_preview"
ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
Which renders to the following HTML:
<embed src="AllNS_preview.swf?dtDate=2003-04-23" qual <rest snipped>
Echoing dtDate within preview.php shows that it is passed correctly, as does the above fragment.
What I get is the movie, with no content. Within the movie, content is called for with this line ...
xmlReceiver.load( "http://" + host +
"feed_xml_story.php?dtDate=" + dtDate);
(host is defined in an included .as file)
Yes, I have tested the above, stand-alone, in the browser and it creates an xml file used by the
movie.
Does anyone have any suggestions? I've tried surrounding the date with single quotes and it
made no difference. The problem appears to be with the Flash movie getting the date.
Help & SWAG's will be appreciated - Miles Thompson