just me (go back »)

April 4 2008, 12:13 PM

titleScreen.onRelease = function()
{
 this._visible = false;
 startgame();
}

startgame = function()
{
 for (var i = 0;i<9;i++)
 {
  var nm = "m" + i;
  
  _root[nm].onPress = function()
  {
   if (this._currentframe == 10)
   {
    this.play();
    whacks++;
    scoreDisplay.whack_txt.text = whacks;
    doWhackAt(_xmouse,_ymouse);
   }
  }
  
  _root[nm].onEnterFrame = function()
  {
   if(this._currentframe == 1)
   {
    if ((Math.random()* 100) <1)
    {
     this.play();
    }
   }
   else if (this._currentframe == 10)
   {
    if((Math.random() * 100) < 10)
    {
     this.play();
    }
   }
  }
 }
 
 whacks = 0;
 scoreDisplay.whack_txt.text =whacks;
 endTime=getTimer()+30000;
 
 _root.onEnterFrame = function()
 {
  var etime=endTime-getTimer();
  
  if(etime<=0)
  {
   scoreDisplay.time_txt.text="Times Up";
   
   for(var i = 0;i<0;i++)
   {
    varnm = "m" + i;
    delte_root[nm].onPress
    delete_root[nm].onEnterFrame;
    _root[nm].stop();
    delete_root.onEnterFrame;
   }
  }
  else
  {
   scoreDisplay.time_txt.text=Math.ceil(etime/1000)+"sec";
  }
 }
}

went=0;
doWhackAt=function(x,y)
{
 varnm="wc"+went;
 _root.attachMovie("wackSign",nm,wcnt+99);
 _root[nm]._x=x;
 _root[nm]._y=y;
 _root[nm]._xscale=_root[nm]._yscale=60;
 
 _root[nm].onEnterFrame=function()
 {
  this._alpha-=10;
  if(this.alpha<=10)
  {
   deletethis.onEnterFrame;
   this.removeMovieClip();
  }
 }
 
 went++;
 went%=5;
}

Comments

Displaying 0 - 0 of 0 comments

No comments yet. Be the first one to comment!

Add Comment

You must be logged in to comment

Profile

LethalxTreat
  • Male
  • 14 years old

Statistics

Comments 0
Page views 636

Credits

Layout by: envisionartist