7 Replies Latest reply on Jul 11, 2009 11:22 AM by Ned Murphy

    Trying to do this brick braker tutorial.


      Hi I'm new to Flash and am trying to do this brick braker tutorial on www.tutorialhero.com/click-55897-how_to_creat_a_platform_game_in_as2.php but I can't even get the first line of code to work.


      This is the code soposed to be paddle movement using the mouse and then the paddles suposed to stop at the edge of the screen:


      onEnterFrame = function() {

           mcPaddle._x = _xmouse - mcPaddle._width*.5;

      If(_mouse < mcPaddle._width / 2) {

           mcPaddle._x = 0;


      if(_xmouse > Stage.width - mcPaddle._width / 2) {

           mcPaddle._x = Stage.width - mcPaddle._width;




      I get an error for the first line saying that Statement must appear within on/onClipEvent handler.


      I don't know what this means can anyone help?