Until today, I did not realize that any HTTP requests made by a Flash movie (including LoadVars.load()
, MovieClip.loadMovie()
, Sound.loadSound()
, etc) includes cookies — the cookies that would normally be sent by the browser anyway. In retrospect, this makes sense and is perhaps even obvious: since the Flash player asks the browser to make the connection, then it really is the browser doing the requests, so why wouldn’t the browser send and receive cookies as normal? For some reason, though, it was a surprise to me.
What does this mean? It means that it’s much easier for a widget to work in conjuction with PHP sessions, for example: I had been putting the session ID in FlashVars
so that the Flash movie could add the cookie manually with addRequestHeader()
, but it turns out that that is unnecessary.
Which version of Flash is this? I am having cookies crumble with Flash CS3 Pro (Actionscript 3.0).
flash 8. hmmm looks like this needs more investigation…?