Cookies: possible without using QSXE component?
I want to read in the value of a cookie using a script in a movie. The reason for this is that I appear to have hit a bug in the QuickTime plugin. I have tried setting the pan angle of a movie using a value stored in a cookie. This works fine for panoramas in different browsers, but not for object movies. With object movies, it only works properly in Safari.
Looking in LiveStage, I see some cookie actions, but they all seem to be QSXE based. I really want to avoid having a component download (why oh why does Apple have its head in a dark place regarding component downloads???) Is there some way to communicate with cookies without QSXE?
Thanks,
John Riley
Re: Cookies: possible without using QSXE component?
Hi John:
How are you accessing the cookies in 'regular' QTVR movies?
Patrick Cheatham
--
CheathamLane | spinControl:VR
Berkeley, California
VR Photography
Web, Flash & QuickTime Development
Re: Cookies: possible without using QSXE component?
Patrick, look at the source of the first page containing an object movie. The page is at http://growingontrees.com/tmp/vr/ (I tried to put the source here, but couldn't get past the parsing of the html on the board) There are two plates with hotspots in multiple frames. The left one (hotspot 2) has the code that is being used, the right one (hotspot 1) has a simple URL. The functionality is tested only with the left plate.
******************************************************
The page you go to by clicking on a hotspot (the hotspot sends "javascript:openPage('02.thm')" without quotes) has a button that simply sends you back to the first page. The relevant source there is:
********************************************************
********************************************************
The source in the first page is supposed to set the pan angle of the object movie on return to the value stored in the cookie before you went to the second page.
This code works fine for panos in every browser we have tested; for objects, it only works in Safari (well, and also Shiira, but that doesn't really help. I need Mozilla-based browsers to work too.) I don't know why. Any help would be greatly appreciated.
BTW- the code pops up an alert showing the angle when you go back to the first page (or load the first page the first time). It _does_ show the correct angle in browsers other than Safari, but the plugin fails to set the movie to the angle as it should. (And, of course, using Internet Explore on Windows, the object does not go back to the angle it should.)
Thanks,
John
Re: Cookies: possible without using QSXE component?
Without knowing the answer to my first question -- Using PHP and SESSION variables might do the trick. That, or have your movie hit a PHP script which stores values in a temp database (or permanent, whatever) and can return them to your movie based on a Session ID or timestamp or similar.
As for storing an actual cookie client-side I think it's a no-go.
Patrick Cheatham
--
CheathamLane | spinControl:VR
Berkeley, California
VR Photography
Web, Flash & QuickTime Development
Re: Cookies: possible without using QSXE component?
Are you saying that PHP could return the values to the movie? Via the Plugin commands? I worry that that would hit the same problems I am having now, where the value is read from the cookie, but the plugin doesn't set the angle as it should. Maybe with the URL in my reply above, you can see if I am making any stupid mistakes with the plugin that might be forgiven in Safari, but not in other browsers.
OR, do you mean that the data could be stored via PHP into an XML file/database, then read back into the movie using a script in the movie and QTLists to set the angle?
John
John Riley
Re: Cookies: possible without using QSXE component?
Hey John:
1) the return (alert) of the current angle, when the page loads, says "undefined" -- this could be because of the browser insatniating things before they're really, uh, insantiated. :) That is, the QT Object movie appears fully loaded but it really isn't. Sort of.
2) Your page crashes Safari over here.
Can you recreate your page _not_ using any Javascript embedding technique? That might help troubleshooting.
That said, my experience with using Javascript to communicate with/to/from QT has been iffy at best. I would seriously consider using the QTList abilities of QT in conjunction with PHP (or similar, ASP etc) for any interactive things you need which could be done server side. QT can call to a PHP script, and a PHP script can be made to return XML formatted information.
You don't have to load this PHP script in a browser window, it just is used to give info to QT. At my site, the VR 'gallery' hits a PHP script, whose sole function is to poll the database, then return an XML-formatted list of URLs, titles, dates, etc. QT thinks it's reading an XML file, but it's really contacting a PHP script which returns XML.
At any rate, if you can linnk me to a page that won't crash Safari ;-) , I'll take another peek.
Cheers,
Patrick


Re: Cookies: possible without using QSXE component?
John,
I don't believe there is. The question was asked in Oct 2005 on the list and there wasn't a response.
Kevin