Code: package org.kos{ import flash.display.MovieClip; import flash.events.Event; import flash.net.SharedObject; import flash.display.MovieClip; import flash.events.ProgressEvent; import flash.media.Sound; import org.kingofsmash.globalVars; import org.kingofsmash.itemGet;
public class Main extends MovieClip {
public static var saveData = globalVars.vars.saveData;
public function Main() { // CONSTRUCTOR CODE //======================================
addEventListener(Event.ENTER_FRAME, checkData);
trace("Just testing, bruddah.");
function checkData(evt:Event):void {
if (! saveData.data.hasOwnProperty("profile")) { saveData.clear(); saveData.data.profile = {percentClear:0,awards:0,gameTime:0,powercount:0,settings:{qual:"MED",BGM:75,SFX:100,controllers:{player1:{LEFT:37,UP:38,RIGHT:39,DOWN:40,punch:65,kick:73,grab:68,sheild:90,taunt:88,special:67,Start:32},player2:{},player3:{},player4:{}}}}; var powercount:Number = saveData.data.profile.powercount; ++powercount; saveData.data.profile.powercount = powercount; saveData.flush(); } else { ++powercount; saveData.flush(); } function itemGet(typeIcon:Number, typeOf:String, typeInfo:String):void { //Types (In order): //1.warning //2.award //3.character //4.stage //5.setting alert.x = 0; alert.y = 0; alert.play(); alert.Title.text = typeOf; alert.information.text = typeInfo; alert.ico.gotoAndStop(typeIcon); } }
}
}
} |