Skip navigation
dimincheva88
Currently Being Moderated

Error - 1120

Dec 8, 2012 2:45 PM

hello i am making collecting  falling objects game in Flash CS5

I am creating my objects on screen using classes

i have this code :

 

import flash.events.Event;

 

 

var bowl:Bowl ;

var createDropsID:uint;

var gameSpeed:uint;

 

 

 

 

 

 

// mouse - Bowl

function uintGame():void

{

bowl=new Bowl();

bowl.x=200;

bowl.y=350;

addChild(bowl);

stage.addEventListener(MouseEvent.MOUSE_MOVE, moveBowl);

Mouse.hide();

gameSpeed=500;

createDropsID=setInterval(createDrops, gameSpeed);

}

 

 

 

 

function moveBowl(e:MouseEvent):void

{

bowl.x=this.mouseX; // following the mouse

e.updateAfterEvent(); // smooth movement

trace("done")

}

 

 

//drops

 

 

function createDrops():void

{

          var drop:ClassDrop = new ClassDrop();

          drop.y = -500;

          drop.x = Math.random()*stage.stageWidth;

          drop.addEventListener(event.ENTER_FRAME,dropDrops);

          trace (drop);

 

}

 

 

function dropDrops(e:Event):void

{

          var mc:ClassDrop = ClassDrop(e.target);

          mc.y+=10;

}

//end mouse - Bowl

 

 

uintGame();

 

 

and when i run my code i receive error

Scene 1, Layer 'Actions', Frame 10, Line 371120: Access of undefined property event.

  any ideas ? thank you

 
Replies
  • kglad
    72,357 posts
    Jul 21, 2002
    Currently Being Moderated
    Dec 8, 2012 2:48 PM   in reply to dimincheva88

    drop.addEventListener(event.ENTER_FRAME,dropDrops);

     

    should be:

     

    drop.addEventListener(Event.ENTER_FRAME,dropDrops);

     

    p.s. please mark helpful/correct responses.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points