PDA

View Full Version : Flashvars Problem


dfalzoi
01-13-2009, 08:30 PM
I have an HTML file using Flashvars. In the same location is a folder called egn, which has a folder called templates with my fla and swf files and another folder called upload with my XML file. When I use this code, everything works great:

<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','800','heigh t','120','title','Profiles','src','egn/templates/IAPFlashDocXML3','quality','high','pluginspage','h ttp://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','Flas hVars','xmldoc=egn/upload/FlashBannerXML.xml','movie','egn/templates/IAPFlashDocXML3' ); //end AC code</script>
<noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="800" height="120" title="Profiles">
<param name="movie" value="egn/templates/IAPFlashDocXML3.swf?xmldoc=egn/upload/FlashBannerXML.xml" />
<param name="quality" value="high" />
<param name=FlashVars value="xmldoc=egn/upload/FlashBannerXML.xml">
<embed src="egn/templates/IAPFlashDocXML3.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="800" height="120"></embed>
</object></noscript>

However, when I go to put my HTML file in a folder called templates that is on the same level as the egn folder, this code does not work:

<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','800','heigh t','120','title','Profiles','src','../egn/templates/IAPFlashDocXML3','quality','high','pluginspage','h ttp://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','Flas hVars','xmldoc=../egn/upload/FlashBannerXML.xml','movie','../egn/templates/IAPFlashDocXML3' ); //end AC code</script>
<noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="800" height="120" title="Profiles">
<param name="movie" value="../egn/templates/IAPFlashDocXML3.swf?xmldoc=../egn/upload/FlashBannerXML.xml" />
<param name="quality" value="high" />
<param name=FlashVars value="xmldoc=../egn/upload/FlashBannerXML.xml">
<embed src="../egn/templates/IAPFlashDocXML3.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="800" height="120"></embed>
</object></noscript>

I read that the path is based off of the movie name, but I don't have any better luck when I stick another ../ in front of the XML paths. Any ideas for what I'm doing wrong?

mainegate
01-14-2009, 02:28 PM
Your xml file and/or your files your trying to access in your xml file are probably not on your server. You need a crossdomain policy.

dfalzoi
01-14-2009, 08:17 PM
I actually just changed them to the same folder and altered the paths, but no luck. Any other ideas?

dfalzoi
01-15-2009, 03:33 PM
Nevermind - I just used different code from here that doesn't work with javascript. All set - whew!
http://www.permadi.com/tutorial/flashVars/indexAs3.html