Re: Passing var to Flash

From: Date: Thu, 24 Apr 2003 16:33:31 +0000
Subject: Re: Passing var to Flash
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145179@lists.php.net to get a copy of this message
The variable passed from the php script <embed src="AllNS_preview.swf?dtDate=2003-04-23" will be available in _level0 or _root in the flash movie. So xmlReceiver.load( "http://" + host + > "feed_xml_story.php?dtDate=" + dtDate); should be xmlReceiver.load( "http://" + host + > "feed_xml_story.php?dtDate=" + _root.dtDate); try that and see how it goes. You could create a dynamic text field in flash and set the value to _root.dtDate to verify that you are getting the value. --- Miles Thompson <milesthompson@ns.sympatico.ca> wrote: > 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 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo http://search.yahoo.com

« previous php.general (#145179) next »