This content has been marked as final. Show 6 replies
Isn't a cookie as simple as a named text file in a particular directory?
You could figure out what to put into such a file by examining some
existing cookies and then using something like FileIO or any other
write-capable xtra to create one.
I wouldn't go as far as calling a nonexistent feature a bug, but here's
I suppose you open the webpage with something like:
I'd pass a parameter on the URL indicating which CSS-file to load as
main (and implicitly which as alternates), catch that parameter with
whatever serverside language you have and use it well :)
so something like:
Althoug probably possible, I personally would not get into editing
cookies. Doing off-standard stuff with the internets and it's plethora
of browsers would have me shivering.
Hope this helps,
> My Macromedia Director DVD project has got 3 designs.
> My website has got 3 CSS scripts, that have the 3 designs as well.
> 3 Designs for the following groups:
> 1. for teachers
> 2. for students
> 3. for employers
> The website can change CSS scripts by setting a cookie.
> How can I get Director to create a cookie, so that the users of the DVD will
> see the same design when the go to my URL. All is setup, but the cookie.
> And please do not tell my that it doesnt excist... that would be a major bug.
I'm not sure how a Director Projector would be able to write a cookie for each browser on a user's system (I'm sure its possible - but a simpler solution might be to pass a css preferences in the URL query string.
In other words, rather than going from your Director movie to foo.com, go to foo.com?css= teachers for example,
Then, on your website, check the query and set the appropriate cookie.
I tried a http query, but it doesnt open the correct CSS.
I will not try to write a cookie with FileIO, because the save location could be a different place on every PC.
I tried about everything that you people suggest, but I think I will have to do it the easy way and write a redirect for each of the 3 designs. Too bad, it gives me 3 extra php files. Thanks anyways guys. If you do think of something, please post.
you could open a webpage that writes the cookie.
and then you open the webpage that reads the cookie otr the writerpage redirects you directly.
Ugly but it might work :)
How do you decide which stylesheet to show if people view the webpage
directly (not from link on DVD)? You need to have a decision mechanism
Hard to definitely say at a distance, but I would have the logic in the
PHP something like:
// see if $_GET["style"] is set
// if so, (visitor probably from from DVD) read value and echo
// if $_GET["style"] is not set but cookie _is_ set, read and echo style
// if none of the above apply (no $_GET and no cookie), echo a default style
> I tried a http query, but it doesnt open the correct CSS.
> I will not try to write a cookie with FileIO, because the save location could
> be a different place on every PC.
> I tried about everything that you people suggest, but I think I will have to
> do it the easy way and write a redirect for each of the 3 designs. Too bad, it
> gives me 3 extra php files. Thanks anyways guys. If you do think of something,
> please post.
> Xander Smalbil