anchor.diff:  int mouseY = 0;
   int MAX_BALLS = 5;
   int MAX_SQUARES = 5;
  +int MAX_BUGS = 5;
   Sprite makerBall;
   Sprite makerSquare;
  +Sprite makerBug;
   Sprite saveButton;
   Sprite loadButton;
   Sprite newButton;
   Sprite holder;
   List<Sprite> balls = new List<Sprite>();
   List<Sprite> squares = new List<Sprite>();
  +List<Shape> bugs = new List<Shape>();
   
   void main()
   {
  
positive.code: 			makeNewSquare();
  		});
  		
  		saveButton = new Sprite();
  		saveButton.addChild(new Bitmap(resourceManager.getBitmapData('saveButton')));
  		saveButton.x = makerBall.x - (saveButton.width + 20);
  
negative.code:     		_controller.add(new Event("onStopDrag"));
      	};
      	onMouseUp.listen(done);
      	
  	}
  }
  
  
  
  class TestBug extends Shape
  {
  //	steering = truncate (steering, max_force)
  //    steering = steering / mass
  //     
  //    velocity = truncate (velocity + steering , max_speed)
  //    position = position + velocity
  	
  	num steering;
  	Point velocity;
  	Point target;
  	num MAX_FORCE = 0.3;
  	num MAX_VELOCITY = 0.5;
  	num mass = 20;
  	
  	TestBug(Point start, Point target)
  	{
  		x = start.x;
  		y = start.y;
  		this.target = target;
  		graphics.rect(0, 0, 30, 10);
          graphics.fillColor(Color.Red);
      	graphics.strokeColor(Color.Black, 2);
      	alpha = 0.9;
      	velocity = new Point(MAX_VELOCITY, MAX_VELOCITY);
      	
      	Function normalize = (Point point)
  		{
      		double l = sqrt(point.x * point.x + point.y * point.y);
      		point.x /= l;
      		point.y /= l;
  		};
  		
  		Function scaleBy = (Point point, num value)
  		{
  			point.x *= value;
  			point.y *= value;
  		};
  		
  		Function truncate = (Point point, num max)
  		{
  			num i;
  			if(point.magnitude != 0)
  			{
  				i = max / point.magnitude;
  			}
  			else
  			{
  				i = 0;
  			}
  			
  			i = i < 1.0 ? 1.0 : i;
  			print("i: $i");
  			scaleBy(point, i);
  		};
              	
  		onEnterFrame.listen((_)
  		{
  			Point position = new Point(x, y);
  			if(position.magnitude.isNaN == true)
  			{
  				throw new Error();
  			}
  			Point desired = new Point(target.x - position.x, target.y - position.y);
  			if(desired.magnitude.isNaN == true)
  			{
  				throw new Error();
  			}
  			normalize(desired);
  			if(desired.magnitude.isNaN == true)
  			{
  				throw new Error();
  			}
  			scaleBy(desired, MAX_VELOCITY);
  			if(desired.x.isNaN == true)
  			{
  				throw new Error();
  			}
  			Point force = desired.subtract(velocity);
  			if(force.x.isNaN == true)
  			{
  				throw new Error();
  			}
  			truncate(force, MAX_FORCE);
  			if(force.x.isNaN == true)
  			{
  				throw new Error();
  			}
  			scaleBy(force, 1 / mass);
  			if(force.x.isNaN == true)
  			{
  				throw new Error();
  			}
  //			if(target.distanceTo(position.add(velocity)) < distance)
  //			{
  				
  				velocity = velocity.add(force);
  				truncate(velocity, MAX_VELOCITY);
  //	    		if(velocity.x > 0)
  //	    		{
  //	    			if(velocity.x > MAX_VELOCITY)
  //	    			{
  //	    				velocity.x = MAX_VELOCITY;
  //	    			}
  //	    		}
  //	    		else if(velocity.x < 0)
  //	    		{
  //	    			if(velocity.x < -(MAX_VELOCITY))
  //	    			{
  //	    				velocity.x = -(MAX_VELOCITY);
  //	    			}
  //	    		}
  //	    		
  //	    		if(velocity.y > 0)
  //	    		{
  //	    			if(velocity.y > MAX_VELOCITY)
  //	    			{
  //	    				velocity.y = MAX_VELOCITY;
  //	    			}
  //	    		}
  //	    		else if(velocity.y < 0)
  //	    		{
  //	    			if(velocity.y < -(MAX_VELOCITY))
  //	    			{
  //	    				velocity.y = -(MAX_VELOCITY);
  //	    			}
  //	    		}
  	    		
  	    		print("force: $force, velocity: $velocity");
  	    		position = position.add(velocity);
  //			}
  //			else
  //			{
  //				position.setTo(target.x, target.y);
  //			}
  			x = position.x;
             	y = position.y;
  		});
  		
  		stage.onMouseClick.listen((MouseEvent event)
  		{
  			target.setTo(event.stageX, event.stageY);
  		});
  	}
  }
  
  class MovingBug extends Shape
  {
  	num MAX_FORCE = 2.4;
  	num MAX_VELOCITY = 3;
  	Point position;
  	Point velocity;
  	Point target;
  	Point desired;
  	Point steering;
  	num mass;
  	
  	
  	MovingBug(Point start, Point target, num mass)
  	{
  		position = new Point(start.x, start.y);
  		velocity = new Point(-1, -2);
  		target = new Point(target.x, target.y);
  		desired = new Point(0, 0);
  		steering = new Point(0, 0);
  		this.mass = mass;
  		
  		truncate(velocity, MAX_VELOCITY);
  		
  		x = position.x;
  		y = position.y;
  		
  		graphics.rect(0, 0, 30, 10);
      	graphics.fillColor(Color.Red);
      	graphics.strokeColor(Color.Black, 2);
      	alpha = 0.9;
  	}
  	
  	Point seek(Point target)
  	{
  		desired = target.distanceTo(position);
  		Point force = desired.subtract(velocity);
  		return force;
  	}
  	
  	void truncate(Point point, num max)
  	{
  		num i = max / point.length;
  		i = i < 1.0 ? 1.0 : i;
  	}
  	
  	void update()
  	{
  		target = new Point(320, 240);
  		steering = seek(target);
  		truncate(steering, MAX_FORCE);
  		velocity = velocity.add(steering);
  		truncate(velocity, MAX_VELOCITY);
  		position = position.add(velocity);
  		x = position.x;
  		y = position.y;
  	}
  }
  
  
  
  
  
  
  
  
  
  
  