Howdy Andrew
As far as your cookies situation , might I suggest
the HTML5 localStorage feature.
I've found the feature to be a lot more useful
than traditional cookies.
Of course one of the things I did early on
was to add a couple of extra functions to the storage prototype,
so that I could more easily stash objects.
Storage.prototype.setObject = function(key, value)
{
this.setItem(key, JSON.stringify(value));
}
Storage.prototype.getObject = function(key)
{
var szItem =this.getItem(key) ;// Attempt to fetch the
object from local storage
if(szItem ==null)return null ;// If null , bail
try {
var oResult= JSON.parse(this.getItem(key))
return oResult ;// Parse the string to an object.
}catch(oError){
return null;
}// End Try/Catch
}
On 10/11/2011 09:11 PM, Andrew Shellshear wrote:
> Heya chaps,
>
> I'm writing a game in SVG. There's a (fairly crude) demo at:
> http://www.otherleg.com/games/mapGame_new/mapGame.svg
>
> (use wasd to move around)
>
> My intention is that players can login and create their own areas of the
> world. It'd be nice if people don't have to enter their username and
> password every time they go there. It appears, however, that cookie creation
> isn't supported in ECMAScript.
>
> What do people do in this kind of circumstance?
>
> I was thinking perhaps:
> - embed the svg in some html
> - use the html to get login details and set cookies
> - html script starts an svg ecma script on successful login.
>
> However, I'm not sure how the get the last step going.
>
> Alternately, is there anything in ECMAScript/SVG that allows persistence
> across sessions?
>
> Thanks,
>
> Andrew Shellshear.
>
>
------------------------------------
-----
To unsubscribe send a message to: [email protected]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/