Mouse - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example draws a circle using the mathematical constant pi, the tangent of an
angle, and the Drawing API.
drawCircle(this, 100, 100, 50);
//
function drawCircle(mc:MovieClip, x:Number, y:Number, r:Number):Void {
mc.lineStyle(2, 0xFF0000, 100);
mc.moveTo(x+r, y);
mc.curveTo(r+x, Math.tan(Math.PI/8)*r+y, Math.sin(Math.PI/4)*r+x,
Math.sin(Math.PI/4)*r+y);
mc.curveTo(Math.tan(Math.PI/8)*r+x, r+y, x, r+y);
mc.curveTo(-Math.tan(Math.PI/8)*r+x, r+y, -Math.sin(Math.PI/4)*r+x,
Math.sin(Math.PI/4)*r+y);
mc.curveTo(-r+x, Math.tan(Math.PI/8)*r+y, -r+x, y);
mc.curveTo(-r+x, -Math.tan(Math.PI/8)*r+y, -Math.sin(Math.PI/4)*r+x, -
Math.sin(Math.PI/4)*r+y);
mc.curveTo(-Math.tan(Math.PI/8)*r+x, -r+y, x, -r+y);
mc.curveTo(Math.tan(Math.PI/8)*r+x, -r+y, Math.sin(Math.PI/4)*r+x, -
Math.sin(Math.PI/4)*r+y);
mc.curveTo(r+x, -Math.tan(Math.PI/8)*r+y, r+x, y);
}
See also
acos (Math.acos method)
atan2 (Math.atan2 method)

Mouse

Object
|
+-Mouse
public class Mouse
extends
Object
The
class is a top-level class whose properties and methods you can access without
Mouse
using a constructor. You can use the methods of the
and to handle mouse events.
Note: The members of this class are supported in Flash Lite only if
System.capabilities.hasMouse
Availability: ActionScript 1.0; Flash Lite 2.0
430
ActionScript classes
,
asin (Math.asin method)
,
cos (Math.cos method)
is
or
true
System.capabilities.hasStylus
,
atan (Math.atan method)
,
sin (Math.sin method)
class to add and remove listeners
Mouse
,
is
.
true

Advertisement

Table of Contents
loading

Table of Contents