TrustyProphet
01-18-2005, 08:37 PM
First, I'd like to thank Laguana for helping me a lot...so...thanks!!! :)
Now onto something that I tried for the past week and a half to figure out.
This is a VERY cheap method to get this to work, but it works, and the only way to even tell the variables are there, is to look at the source.
I looked everywhere for a method of opening cookies to send the variables to flash, and it seems that either you have to have the variables already in flash, or have some text displayed that you don't want. So, after having flash redirect to a different page this whole time, I decided to use DHTML layers :)
First, in your flash file, you'll need to call the variables from the PHP page...theres a bunch of things on how to do this, so just look inside another post ;)
Second, in your php file (or whichever contains the flash movie), open the cookie like usual, and echo the variables like so:
echo "&variable1=" . $variable1 . "&variable2=" . $variable2 . "&";
I put the "&" on the end to stop it from reading anything past that as a variable. So now flash can read it, but you have some unwanted text showing on your page...how to get rid of this? Simple! Stick the text behind the flash file :p
echo "<div style='z-index: 1; position: absolute; top: ??; left: ??'>&variable1=" . $variable1 . "&variable2=" . $variable2 . "&</div>";
Wrap the flash code in div tags too, and set the z-index to 2 so that it's above the text. :rolleyes:
Now I know this is probably the most obvious thing to do, and not the most proper, but it works, and I checked around my whole flash file to see if I could somehow highlight the variable text that was echoed and I can't.
If this helps at least one person on here then I'll be happy! Take care and thanks again Laguana for the help in the previous topic!
Matt C.
Now onto something that I tried for the past week and a half to figure out.
This is a VERY cheap method to get this to work, but it works, and the only way to even tell the variables are there, is to look at the source.
I looked everywhere for a method of opening cookies to send the variables to flash, and it seems that either you have to have the variables already in flash, or have some text displayed that you don't want. So, after having flash redirect to a different page this whole time, I decided to use DHTML layers :)
First, in your flash file, you'll need to call the variables from the PHP page...theres a bunch of things on how to do this, so just look inside another post ;)
Second, in your php file (or whichever contains the flash movie), open the cookie like usual, and echo the variables like so:
echo "&variable1=" . $variable1 . "&variable2=" . $variable2 . "&";
I put the "&" on the end to stop it from reading anything past that as a variable. So now flash can read it, but you have some unwanted text showing on your page...how to get rid of this? Simple! Stick the text behind the flash file :p
echo "<div style='z-index: 1; position: absolute; top: ??; left: ??'>&variable1=" . $variable1 . "&variable2=" . $variable2 . "&</div>";
Wrap the flash code in div tags too, and set the z-index to 2 so that it's above the text. :rolleyes:
Now I know this is probably the most obvious thing to do, and not the most proper, but it works, and I checked around my whole flash file to see if I could somehow highlight the variable text that was echoed and I can't.
If this helps at least one person on here then I'll be happy! Take care and thanks again Laguana for the help in the previous topic!
Matt C.