day 2 – behind but looking good

so its the end of day 2. heres some code and what 1 of the worlds will look like (thanks to @justjarrodyo)

 i might get up  round 5 and continue, will work after school anyway and finish this thing of all i need to now is chuck in the levels (plus code them) add a diary , rewards , credit and help wow i am behind oh will ill still do it

 

btw here is the full code so far

import flash.events.MouseEvent;

//at start
stop();
var $hasitbeen:String;

//vars
if ($hasitbeen != “yup”) {
var $lastworld:Number = 0;
var $currentS:Number = 0;
var $totalS:Number = 0;
var $credits:Number = 0;
var $karmaLV:Number = 0;
var $karmaTP:Number = 0;
$hasitbeen = “yup”;
};
var $slavePrice:Number = Math.ceil(((Math.random() * 10) + 5));

//displayinboxes
txt_trade.text = String($slavePrice);
txt_release.text = String(“10”);
txt_survivors.text = String($currentS);
txt_credits.text = String($credits);
txt_karmaLv.text = String($karmaLV);
txt_karmaTp.text = String($karmaTP);
//cons
//evt listeners
btn_newWorld.addEventListener(MouseEvent.CLICK, newWorld);
btn_tradeS.addEventListener(MouseEvent.CLICK, tradeS);
btn_releaseS.addEventListener(MouseEvent.CLICK, releaseS);
btn_diary.addEventListener(MouseEvent.CLICK, diary);
btn_rewards.addEventListener(MouseEvent.CLICK, rewards);
btn_help.addEventListener(MouseEvent.CLICK, help);
btn_credits.addEventListener(MouseEvent.CLICK, credits);

//functions
function newWorld(evt:MouseEvent):void{

};
function tradeS(evt:MouseEvent):void{
if ($currentS > 0) {
$currentS = $currentS – 1;
$credits = $credits + $slavePrice;
$karmaLV = $karmaLV + 1;
$karmaTP = $karmaTP – 1;
trace($currentS);
trace($credits);

txt_trade.text = String($slavePrice);
txt_release.text = String(“10”);
txt_survivors.text = String($currentS);
txt_credits.text = String($credits);
txt_karmaLv.text = String($karmaLV);
txt_karmaTp.text = String($karmaTP);
}

};
function releaseS(evt:MouseEvent):void{
if ($currentS > 0) {
$currentS = $currentS -1;
$credits = $credits + 10;
$karmaLV = $karmaLV + 1;
$karmaTP = $karmaTP + 1;
trace($currentS);
trace($credits);

txt_trade.text = String($slavePrice);
txt_release.text = String(“10”);
txt_survivors.text = String($currentS);
txt_credits.text = String($credits);
txt_karmaLv.text = String($karmaLV);
txt_karmaTp.text = String($karmaTP);
}
};
function diary(evt:MouseEvent):void{

};
function rewards(evt:MouseEvent):void{

};
function help(evt:MouseEvent):void{

};
function credits(evt:MouseEvent):void{

};

btw this is my first as3 game 😛 thanks for reding