Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 25. Using the AVM2 Debugger > Debugging a Simple Example

25.6. Debugging a Simple Example

In this example, I tried to make a rocket ship point toward your mouse cursor. But I left in an error that you can use the debugger to help find. First, the code:

package {
  import flash.display.*;
  import flash.events.Event;
  import flash.geom.Point;
  public class RocketShipExample extends Sprite {
    protected var ship:MovieClip;
    public function RocketShipExample() {
      ship = getChildByName("rocketshipMovieClip") as MovieClip;
      addEventListener(Event.ENTER_FRAME, onEnterFrame);
    }
    protected function onEnterFrame(event:Event):void {


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint