Hello All,
I've scoured these forums, looked over ALL of the examples and spent the last 3 days pouring over my code to see what the problem is and I still can't figure it out. Here's the overview:
I have a php file that is passing a User ID (user) variable to a Flash (Flash8) swf file. The User ID is used to pull in specific information about the user and then other data is loaded (via AS2) that displays the users details.
I've tested this using browser url:
[full path removed]/flash/myswf.swf?user=22
And it works perfectly (both FF and IE). I then run the php script below and it seems my swf file is not receiving the user id variable (note full url paths have been removed):
PHP Code:
<?php session_start(); ?>
<!DOCTYPE html PUBLIC "[dtd link removed]">
<html xmlns="[xhtml link removed]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MySWF</title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body style="margin:auto 0;text-align:center; vertical-align:middle;">
<div style="width:100%;text-align:center;" >
<script type="text/javascript">
AC_FL_RunContent( 'codebase','[swflash link removed]','width','500','height','375','user','<?php echo $_SESSION['_default']['user_id'];?>','title','MySWF','src','flash/myswf','quality','high','pluginspage','[ShockwaveFlash Path Removed]','movie','flash/myswf' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[http cab file removed]" width="500" height="375" title="MySWF">
<param name="movie" value="flash/myswf.swf" />
<param name="quality" value="high" />
<param name=FlashVars value="user=<?php echo $_SESSION['_default']['user_id'];?>" />
<embed src="flash/myswf.swf" quality="high" pluginspage="[shockwave flash]" type="application/x-shockwave-flash" width="500" height="375" user="<?php echo $_SESSION['_default']['user_id'];?>"></embed>
</object></noscript>
</div>
</body>
</html>
I also checked the resulting page via my browser's
View->Page Source which seems to show the FlashVars variable (user) is being properly passed (see below):
PHP Code:
<!DOCTYPE html PUBLIC "[dtd link removed]">
<html xmlns="[xhtml link removed]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MySWF</title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body style="margin:auto 0;text-align:center; vertical-align:middle;">
<div style="width:100%;text-align:center;" >
<script type="text/javascript">
AC_FL_RunContent( 'codebase','[swflash cab link removed]','width','500','height','375','user','22','title','MySWF','src','flash/myswf','quality','high','pluginspage','[shockwave link removed]','movie','flash/myswf' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[swflash link removed]" width="500" height="375" title="MySWF">
<param name="movie" value="flash/myswf.swf" />
<param name="quality" value="high" />
<param name=FlashVars value="user=22" />
<embed src="flash/myswf.swf" quality="high" pluginspage="[ShockwaveFlash link removed]" type="application/x-shockwave-flash" width="500" height="375" user="22"></embed>
</object></noscript>
</div>
</body>
</html>
The problem I'm having is although the PHP script seems to be passing the correct User ID to the swf file - the swf file doesn't load the user's data which causes a "User Not Found" error.
But given that I can pass the user variable to the same swf file via my browser url address: [full path removed]/flash/myswf.swf?user=22 and everything works fine. Passing this via the php script does not work.
Any help would be very much appreciated!
wn