Selection.setFocus(btnWeather);
if (System.capabilities.hasSharedObjects)
{
trace("Has SOs");
SharedObject.addListener("soLastSelection",showLastSelection);
var soLastSelection:SharedObject = SharedObject.getLocal("soLastSelection");
}
else
{
trace("No SO");
Selection.setFocus(btnWeather);
}
function showLastSelection(argSo:SharedObject)
{
trace("argSo.data.selection: " + argSo.data.lastButton);
if (argSo.data.lastButton)
{
trace("YES SO");
Selection.setFocus(argSo.data.lastButton);
}
else
{
trace("NO SO");
Selection.setFocus(btnWeather);
}
}
btnWeather.onRelease = loadScreen;
btnVideo.onRelease = loadScreen;
btnGame.onRelease = loadScreen;
function loadScreen():Void
{
var clipName:String = this._name;
clipName = clipName.substring(3, clipName.length);
trace(clipName);
if (System.capabilities.hasSharedObjects)
{
soLastSelection.data.lastButton = this;
soLastSelection.flush();
}
this._parent._parent.attachMovie(clipName,clipName,0);
}