foochuck Posted May 12, 2010 Share Posted May 12, 2010 I'm running a regular PHP website. On the top of my page there is a flash object that plays music. You can toggle the music on or off with a flash button. By default, the flash music plays on each page, so if you were to turn the music off and then go to another page, the music starts playing again. I'm trying to set a cookie so that if a user turns the music off, when they go to another page, the flash player remembers whether to play or not. I am feeding a variable to my flash object called 'playMusic' which accepts either true or false. However I'm not sure how to have flash send a cookie to php if the button is turned off. Also I'm not sure how to set a cookie or if I should set a session for this. Any suggestions would be appreciated. -foo Quote Link to comment https://forums.phpfreaks.com/topic/201513-php-cookie-flash-question/ Share on other sites More sharing options...
Muddy_Funster Posted May 12, 2010 Share Posted May 12, 2010 Flash can't send a cookie to php because php is on the server, not the client computer, and if everyone fed the server cookies it would get fat and slow. your options depend on how you are passing the variable to the Flash and how the variable is established before it is passed. Quote Link to comment https://forums.phpfreaks.com/topic/201513-php-cookie-flash-question/#findComment-1057214 Share on other sites More sharing options...
foochuck Posted May 12, 2010 Author Share Posted May 12, 2010 By default the music plays, that is set in the SWF object without a variable. On the pages where I don't want the music to play, I would just set that variable to false. The music plays by default. Is there any work around to control this? Quote Link to comment https://forums.phpfreaks.com/topic/201513-php-cookie-flash-question/#findComment-1057223 Share on other sites More sharing options...
Muddy_Funster Posted May 12, 2010 Share Posted May 12, 2010 quick fix = embed the music player in 1 tiny iframe and the rest of your pages in another big one have your navigation processed only by the big iframe. Quote Link to comment https://forums.phpfreaks.com/topic/201513-php-cookie-flash-question/#findComment-1057227 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.