source: code/Website/open-flash-chart/elements/menu/CameraIcon.as@ 7849

Last change on this file since 7849 was 7849, checked in by dennisw, 15 years ago
File size: 984 bytes
Line 
1package elements.menu {
2
3 import flash.display.Sprite;
4 import flash.events.MouseEvent;
5 import flash.external.ExternalInterface;
6
7 import flash.text.TextField;
8 import flash.text.TextFieldType;
9 import flash.text.TextFormat;
10
11 public class CameraIcon extends menuItem {
12
13 public function CameraIcon(chartId:String, props:Properties) {
14 super(chartId, props);
15 }
16
17 protected override function add_elements(): Number {
18
19 this.draw_camera();
20 var width:Number = this.add_text(this.props.get('text'), 35);
21
22 return width+30; // 30 is the icon width
23 }
24
25 private function draw_camera():void {
26
27 var s:Sprite = new Sprite();
28
29 s.graphics.beginFill(0x505050);
30 s.graphics.drawRoundRect(2, 4, 26, 14, 2, 2);
31 s.graphics.drawRect(20, 1, 5, 3);
32 s.graphics.endFill();
33
34 s.graphics.beginFill(0x202020);
35 s.graphics.drawCircle(9, 11, 4.5);
36 s.graphics.endFill();
37
38 this.addChild(s);
39
40 }
41 }
42}
Note: See TracBrowser for help on using the repository browser.