| Erik W. 2005-06-27, 7:42 pm |
| I am new to using FlashVars, however I am usually pretty good at just figuring
things out myself. This time, however I have no answer as to why this doesn't
work (other than IE has always been a pain to work with). Hopefully someone
can help me out here.
The place flash is being used in is a menubar/header for my site, which
displays at the top of every page via an include in PHP. The way it's supposed
to work is, the user clicks a log-in button and they are taken to a new page
with a simple user/pass html form to log in. They type in their user/pass, and
it's then stored in a cookie and they are taken to their "Home" page. Now,
the page's PHP script sees they are logged in (via the cookie) and changes the
flash's OBJECT code to include the user's login name (in bold):
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/"
WIDTH="780" HEIGHT="110" id="menubarswf">
<PARAM NAME=movie VALUE="./flash/menubar001.swf">
<PARAM NAME=FlashVars VALUE="member_name=JohnDoe">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#222222>
<EMBED src="./flash/menubar001.swf" FlashVars="member_name=JohnDoe"
quality=high bgcolor=#222222 WIDTH="780" HEIGHT="110" NAME="menubarswf"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>
This allows the flash menubar to show "Currently Logged in as: JohnDoe" and
also adds some additional buttons, etc., which are only available to logged-in
users. It works perfectly in the following browsers that I have been able to
test it on:
FireFox 1.04 on Windows XP
IE4 on Windows NT Server
FireFox 1.0 on MacOS X
Safari 2.0 on MacOS X
But on IE6 on WinXP it ignores the FlashVars parameter. Now I know that IE
can be stubborn about refreshing content, so I tried clearing the cache,
setting it to look for new versions of the page on every visit, and even
renaming the swf file. I also made a visual change to the swf file to see if
it was loading the most current one, which it was. Nothing I do will make IE
tell flash about the variables. I know the cookie is working; I checked the
list of cookies. Also, IE does actually go to the "Home" page like it's
supposed to, just the menubar is not receiving the variables. Any ideas?
Thanks,
-Erik
|