This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>HTML 5: Drawing shapes</title> | |
<script type="text/javascript"> | |
function degToRad(deg){ | |
var rad = (deg * Math.PI)/180; | |
return rad; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import flash.display.Sprite; | |
import flash.display.Graphics; | |
import flash.events.Event; | |
import flash.display.Stage; | |
public class Shapes extends Sprite { | |
private var myShapes:Array = new Array(); | |
private var myCircle:Sprite = new Sprite(); | |
private var myCircle2:Sprite = new Sprite(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
//import necessary classes | |
import flash.display.Sprite; | |
import flash.display.Graphics; | |
public class Circle extends Sprite { | |
private var canvas:Sprite = new Sprite(); | |
private var gr:Graphics = canvas.graphics; |