1//////////////////////////////////////////////////////////////////////////////// 2// 3// ADOBE SYSTEMS INCORPORATED 4// Copyright 2005-2006 Adobe Systems Incorporated 5// All Rights Reserved. 6// 7// NOTICE: Adobe permits you to use, modify, and distribute this file 8// in accordance with the terms of the license agreement accompanying it. 9// 10//////////////////////////////////////////////////////////////////////////////// 11 12package haloclassic 13{ 14 15import flash.display.DisplayObject; 16import flash.display.Graphics; 17import flash.display.InteractiveObject; 18import flash.display.Shape; 19import flash.display.Sprite; 20import flash.events.Event; 21import mx.core.FlexShape; 22import mx.styles.StyleManager; 23 24/** 25 * Documentation is not currently available. 26 * @review 27 */ 28public class BusyCursor extends Sprite 29{ 30 include "../mx/core/Version.as"; 31 32 //-------------------------------------------------------------------------- 33 // 34 // Constructor 35 // 36 //-------------------------------------------------------------------------- 37 38 /** 39 * Constructor. 40 */ 41 public function BusyCursor() 42 { 43 super(); 44 45 cursorClass = 46 StyleManager.getStyleDeclaration("CursorManager").getStyle("busyCursorBackground"); 47 48 cursorHolder = new cursorClass(); 49 addChild(cursorHolder); 50 InteractiveObject(cursorHolder).mouseEnabled = false; 51 52 var xOff:Number = -0.5; 53 var yOff:Number = -0.5; 54 55 var g:Graphics; 56 57 minuteHand = new FlexShape(); 58 minuteHand.name = "minuteHand"; 59 g = minuteHand.graphics; 60 g.beginFill(0x000000); 61 g.moveTo(xOff, yOff); 62 g.lineTo(1 + xOff, 0 + yOff); 63 g.lineTo(1 + xOff, 5 + yOff); 64 g.lineTo(0 + xOff, 5 + yOff); 65 g.lineTo(0 + xOff, 0 + yOff); 66 g.endFill(); 67 addChild(minuteHand); 68 69 hourHand = new FlexShape(); 70 hourHand.name = "hourHand"; 71 g = hourHand.graphics; 72 g.beginFill(0x000000); 73 g.moveTo(xOff, yOff); 74 g.lineTo(4 + xOff, 0 + yOff); 75 g.lineTo(4 + xOff, 1 + yOff); 76 g.lineTo(0 + xOff, 1 + yOff); 77 g.lineTo(0 + xOff, 0 + yOff); 78 g.endFill(); 79 addChild(hourHand); 80 81 addEventListener(Event.ENTER_FRAME, enterFrameHandler); 82 } 83 84 //-------------------------------------------------------------------------- 85 // 86 // Variables 87 // 88 //-------------------------------------------------------------------------- 89 90 /** 91 * @private 92 */ 93 private var cursorClass:Class; 94 95 /** 96 * @private 97 */ 98 private var cursorHolder:DisplayObject; 99 100 /** 101 * @private 102 */ 103 private var minuteHand:Shape; 104 105 /** 106 * @private 107 */ 108 private var hourHand:Shape; 109 110 //-------------------------------------------------------------------------- 111 // 112 // Event handlers 113 // 114 //-------------------------------------------------------------------------- 115 116 /** 117 * @private 118 */ 119 private function enterFrameHandler(event:Event):void 120 { 121 minuteHand.rotation += 12; 122 hourHand.rotation += 1; 123 } 124} 125 126} 127