<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Managing savegames with Flash shared objects</title>
	<atom:link href="http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/</link>
	<description>italian geek and PROgrammer</description>
	<lastBuildDate>Sat, 11 Feb 2012 05:27:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Daniele Fernandes</title>
		<link>http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-619070</link>
		<dc:creator>Daniele Fernandes</dc:creator>
		<pubDate>Sun, 08 Aug 2010 21:31:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-619070</guid>
		<description>First, I have found in web some codes that produce similar effects, but they are too complicated and I can’t understand them. The codes in your page are simple and work fine. So, thanks very much!
But I am trying hard to make an application in which the user can drag the movies (created by attachMovie) and when he/she release it, the position - of each - movie is saved in the sharedObject. Now I just can save the position of the last generated movie and every “beated movie” go exataly behind that when I open the file again. I know it can be too easy for you, but I am new in action script. If anyone could help me, I would be extremely grateful... Thanks in advance. The code:
lets_call_it_cookie = SharedObject.getLocal(&quot;feronato&quot;);
levels = new Array();
for (x=1; x&lt;=5; x++) {
	levels[x] = 0; //unbeating
	lev = _root.attachMovie(&quot;level&quot;, &quot;level_&quot;+x,_root.getNextHighestDepth(),{_x:80*i, _y:40, _alpha:30});
	lev.levelnumber = x;
	if (lets_call_it_cookie.data.completed_levels[x] == 1) { //beating 
		lev._x = lets_call_it_cookie.data.x; 
		lev._y = lets_call_it_cookie.data.y;
//		lev._alpha = 100;
		levels[x] = 1;
	}
	lev.onPress = function(){
		stopper = &quot;yes&quot;;
		this.startDrag();
	}
	lev.onRelease = function() {
		stopper = &quot;no&quot;;
		this.stopDrag();
		levels[this.levelnumber] = 1;
		lets_call_it_cookie.data.completed_levels = levels;
		lets_call_it_cookie.data.x = lev._x;
		lets_call_it_cookie.data.y = lev._y;
		lets_call_it_cookie.flush();
//		this._alpha = 100;
	}
}</description>
		<content:encoded><![CDATA[<p>First, I have found in web some codes that produce similar effects, but they are too complicated and I can’t understand them. The codes in your page are simple and work fine. So, thanks very much!<br />
But I am trying hard to make an application in which the user can drag the movies (created by attachMovie) and when he/she release it, the position &#8211; of each &#8211; movie is saved in the sharedObject. Now I just can save the position of the last generated movie and every “beated movie” go exataly behind that when I open the file again. I know it can be too easy for you, but I am new in action script. If anyone could help me, I would be extremely grateful&#8230; Thanks in advance. The code:<br />
lets_call_it_cookie = SharedObject.getLocal(&#8220;feronato&#8221;);<br />
levels = new Array();<br />
for (x=1; x&lt;=5; x++) {<br />
	levels[x] = 0; //unbeating<br />
	lev = _root.attachMovie(&quot;level&quot;, &quot;level_&quot;+x,_root.getNextHighestDepth(),{_x:80*i, _y:40, _alpha:30});<br />
	lev.levelnumber = x;<br />
	if (lets_call_it_cookie.data.completed_levels[x] == 1) { //beating<br />
		lev._x = lets_call_it_cookie.data.x;<br />
		lev._y = lets_call_it_cookie.data.y;<br />
//		lev._alpha = 100;<br />
		levels[x] = 1;<br />
	}<br />
	lev.onPress = function(){<br />
		stopper = &quot;yes&quot;;<br />
		this.startDrag();<br />
	}<br />
	lev.onRelease = function() {<br />
		stopper = &quot;no&quot;;<br />
		this.stopDrag();<br />
		levels[this.levelnumber] = 1;<br />
		lets_call_it_cookie.data.completed_levels = levels;<br />
		lets_call_it_cookie.data.x = lev._x;<br />
		lets_call_it_cookie.data.y = lev._y;<br />
		lets_call_it_cookie.flush();<br />
//		this._alpha = 100;<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Understanding AS3 shared objects : Emanuele Feronato</title>
		<link>http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-362499</link>
		<dc:creator>Understanding AS3 shared objects : Emanuele Feronato</dc:creator>
		<pubDate>Sun, 28 Dec 2008 17:11:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-362499</guid>
		<description>[...] This is the AS3 version of Managing savegames with Flash shared objects. [...]</description>
		<content:encoded><![CDATA[<p>[...] This is the AS3 version of Managing savegames with Flash shared objects. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel Parkey</title>
		<link>http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-358319</link>
		<dc:creator>Joel Parkey</dc:creator>
		<pubDate>Sun, 21 Dec 2008 16:54:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-358319</guid>
		<description>This post prooved very helpful. Thanks. Its allowed me to have a locally saved Highscore system instead of using someone elses highscore API. I decided to add the clear highscores option aswell should you need to empty your highscores and start again !

Thanks again!</description>
		<content:encoded><![CDATA[<p>This post prooved very helpful. Thanks. Its allowed me to have a locally saved Highscore system instead of using someone elses highscore API. I decided to add the clear highscores option aswell should you need to empty your highscores and start again !</p>
<p>Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-338830</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Wed, 19 Nov 2008 17:21:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-338830</guid>
		<description>This may be an old post but im trying to make something like this but a little less complicated
this is what i have so far

ballsave = SharedObject.getLocal(&quot;ballgame&quot;);
if (ballsave.data.lvl1 == undefined) {
    ballsave.data.counter = false;
}
lvl1=ballsave.data.lvl1;

When you beat lvl1 lvl1 = true
but for some reason the variable stays undefined, 
what am i doing wrong?</description>
		<content:encoded><![CDATA[<p>This may be an old post but im trying to make something like this but a little less complicated<br />
this is what i have so far</p>
<p>ballsave = SharedObject.getLocal(&#8220;ballgame&#8221;);<br />
if (ballsave.data.lvl1 == undefined) {<br />
    ballsave.data.counter = false;<br />
}<br />
lvl1=ballsave.data.lvl1;</p>
<p>When you beat lvl1 lvl1 = true<br />
but for some reason the variable stays undefined,<br />
what am i doing wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ADAM</title>
		<link>http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-293680</link>
		<dc:creator>ADAM</dc:creator>
		<pubDate>Mon, 06 Oct 2008 06:20:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-293680</guid>
		<description>DEAR Emanuele Feronato,
I need your help to tell me the way of saving results in Zuma game because the results are kept even if the game is moved to a different place.So,it is different from shared objects</description>
		<content:encoded><![CDATA[<p>DEAR Emanuele Feronato,<br />
I need your help to tell me the way of saving results in Zuma game because the results are kept even if the game is moved to a different place.So,it is different from shared objects</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: souled</title>
		<link>http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-163785</link>
		<dc:creator>souled</dc:creator>
		<pubDate>Sat, 17 May 2008 16:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-163785</guid>
		<description>This isn&#039;t AS3...
At least I don&#039;t think so.</description>
		<content:encoded><![CDATA[<p>This isn&#8217;t AS3&#8230;<br />
At least I don&#8217;t think so.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Creation of a Flash highscores API - Step 2 : Emanuele Feronato - italian geek and PROgrammer</title>
		<link>http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-162823</link>
		<dc:creator>Creation of a Flash highscores API - Step 2 : Emanuele Feronato - italian geek and PROgrammer</dc:creator>
		<pubDate>Thu, 15 May 2008 20:59:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-162823</guid>
		<description>[...] hard prototype once you read Create an Eskiv Flash game tutorial (in order to have a real game) and Managing savegames with Flash shared objects (to store data on your [...]</description>
		<content:encoded><![CDATA[<p>[...] hard prototype once you read Create an Eskiv Flash game tutorial (in order to have a real game) and Managing savegames with Flash shared objects (to store data on your [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grifo</title>
		<link>http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-161925</link>
		<dc:creator>Grifo</dc:creator>
		<pubDate>Tue, 13 May 2008 22:08:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-161925</guid>
		<description>I might be wrong, Souled, but maybe this is as3 and you&#039;re in as2... I&#039;m in a hurry now so I&#039;m no sure.</description>
		<content:encoded><![CDATA[<p>I might be wrong, Souled, but maybe this is as3 and you&#8217;re in as2&#8230; I&#8217;m in a hurry now so I&#8217;m no sure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: souled</title>
		<link>http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-161901</link>
		<dc:creator>souled</dc:creator>
		<pubDate>Tue, 13 May 2008 20:46:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-161901</guid>
		<description>Shouldn&#039;t you use clear() instead of purge() ?
purge() doesn&#039;t do anything.</description>
		<content:encoded><![CDATA[<p>Shouldn&#8217;t you use clear() instead of purge() ?<br />
purge() doesn&#8217;t do anything.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brart</title>
		<link>http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-98681</link>
		<dc:creator>brart</dc:creator>
		<pubDate>Sun, 23 Mar 2008 11:01:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2008/01/02/managing-savegames-with-flash-shared-objects/#comment-98681</guid>
		<description>sorry... it&#039;s not:    gamedata.data.completed_levels[x] 

but 
lets_call_it_cookie.data.completed_levels[x]

I used the gamedata variable instead of the lets_call_it_cookie

so the final code would be:

lets_call_it_cookie = SharedObject.getLocal(&quot;feronato&quot;);
levels = new Array();
for (x=1; x&lt;=5; x++) {
    levels[x] = 0;
    lev = _root.attachMovie(&quot;level&quot;, &quot;level_&quot;+x, _root.getNextHighestDepth(), {_x:80*x, _y:40, _alpha:30});
    lev.levelnumber = x;
    if (lets_call_it_cookie.data.completed_levels[x] == 1) {
        lev._alpha = 100;
        levels[x] = 1; 
    }
    lev.onRelease = function() {
        levels[this.levelnumber] = 1;
        lets_call_it_cookie.data.completed_levels = levels;
        lets_call_it_cookie.flush();
        this._alpha = 100;
    };
}

This is the fix for the save problem in the second example. I hope you can use it.

brart</description>
		<content:encoded><![CDATA[<p>sorry&#8230; it&#8217;s not:    gamedata.data.completed_levels[x] </p>
<p>but<br />
lets_call_it_cookie.data.completed_levels[x]</p>
<p>I used the gamedata variable instead of the lets_call_it_cookie</p>
<p>so the final code would be:</p>
<p>lets_call_it_cookie = SharedObject.getLocal(&#8220;feronato&#8221;);<br />
levels = new Array();<br />
for (x=1; x&lt;=5; x++) {<br />
    levels[x] = 0;<br />
    lev = _root.attachMovie(&#8220;level&#8221;, &#8220;level_&#8221;+x, _root.getNextHighestDepth(), {_x:80*x, _y:40, _alpha:30});<br />
    lev.levelnumber = x;<br />
    if (lets_call_it_cookie.data.completed_levels[x] == 1) {<br />
        lev._alpha = 100;<br />
        levels[x] = 1;<br />
    }<br />
    lev.onRelease = function() {<br />
        levels[this.levelnumber] = 1;<br />
        lets_call_it_cookie.data.completed_levels = levels;<br />
        lets_call_it_cookie.flush();<br />
        this._alpha = 100;<br />
    };<br />
}</p>
<p>This is the fix for the save problem in the second example. I hope you can use it.</p>
<p>brart</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 6/11 queries in 0.146 seconds using disk: basic

Served from: www.emanueleferonato.com @ 2012-02-11 12:43:40 -->
