Changeset 14992 for lang/actionscript

Show
Ignore:
Timestamp:
07/01/08 16:49:28 (5 months ago)
Author:
suztomo
Message:

lang/actionscript/FPazzle : Implemented Niginigi Cursor.

Location:
lang/actionscript/FPazzle/trunk/src
Files:
3 added
3 modified

Legend:

Unmodified
Added
Removed
  • lang/actionscript/FPazzle/trunk/src/FPazzle.mxml

    r14980 r14992  
    2121        <mx:Label id="footer" selectable="true" paddingTop="0"/> 
    2222 
     23 
    2324        <mx:Script> 
    2425                <![CDATA[ 
     
    4748 
    4849                public static var container:UIComponent; 
     50 
    4951 
    5052                private var board:FBoard; 
  • lang/actionscript/FPazzle/trunk/src/net/suztomo/FPazzle/FPiece.as

    r14965 r14992  
    3232                public var init_group:FPieceGroup; 
    3333                 
     34                [Embed(source="img/pa.png")] private var CursorPa :Class; 
     35                [Embed(source="img/gu.png")] private var CursorGu :Class; 
     36 
    3437 
    3538                public function FPiece(_pieceImage:BitmapData, _p_width:Number, _p_height:Number, _x_index:uint = 0, _y_index:uint = 0) 
     
    5861                        idNumber = new TextField(); 
    5962                        idNumber.text = id.toString(); 
    60                         //showId(); 
     63 
     64                        addEventListener(MouseEvent.MOUSE_OVER, onOver); 
     65                        addEventListener(MouseEvent.MOUSE_OUT, onOut); 
    6166 
    6267                        rotateController = new RotateController(this, p_width, p_height); 
     
    8691                } 
    8792                 
     93                private function onOver(event:Event):void 
     94                { 
     95                        CursorManager.setCursor(CursorPa); 
     96                } 
     97                 
     98                private function onOut(e:Event):void 
     99                { 
     100                        CursorManager.removeAllCursors(); 
     101                } 
     102                 
    88103                private function onClick(event:Event):void 
    89104                { 
     
    109124                        removeEventListener(MouseEvent.MOUSE_DOWN, onClick); 
    110125                        removeEventListener(MouseEvent.MOUSE_UP, onRelese); 
     126                        removeEventListener(MouseEvent.MOUSE_OVER, onOver); 
     127                        removeEventListener(MouseEvent.MOUSE_OUT, onOut); 
    111128                        addEventListener(Event.ENTER_FRAME, becomeGradualTransparent); 
    112129                } 
  • lang/actionscript/FPazzle/trunk/src/net/suztomo/FPazzle/FPieceGroup.as

    r14949 r14992  
    66        import flash.system.*; 
    77         
     8        import mx.managers.CursorManager; 
    89        import mx.controls.*; 
    910        import mx.core.*; 
     
    2425                public var id:uint; 
    2526                public static var id_count:uint = 1; 
    26                                                  
     27 
     28                [Embed(source="img/pa.png")] private var CursorPa :Class; 
     29                [Embed(source="img/gu.png")] private var CursorGu :Class; 
     30 
    2731                public function FPieceGroup(p:FPiece) 
    2832                { 
     
    172176                        if (hasEventListener(Event.ENTER_FRAME)) 
    173177                                removeEventListener(Event.ENTER_FRAME, noticeHandle); 
     178                        CursorManager.setCursor(CursorPa); 
    174179                        e.stopPropagation(); 
    175180                } 
     
    181186                                (pieces[i] as FPiece).onGroupUnselected(); 
    182187                        } 
     188                        CursorManager.removeAllCursors(); 
    183189                        e.stopPropagation(); 
    184190                } 
     
    188194                        startDrag(); 
    189195                        board.setChildIndex(this, board.numChildren-1); 
     196                        CursorManager.removeCursor(CursorManager.currentCursorID); 
     197                        CursorManager.setCursor(CursorGu); 
    190198                        e.stopPropagation(); 
    191199                } 
     
    194202                { 
    195203                        stopDrag(); 
     204                        CursorManager.removeCursor(CursorManager.currentCursorID); 
     205                        CursorManager.setCursor(CursorPa); 
    196206                        e.stopPropagation(); 
    197207                         
     
    284294                        handle.removeEventListener(MouseEvent.MOUSE_UP, stopDragGroup); 
    285295                        handle.alpha = 0; 
     296                        CursorManager.removeAllCursors(); 
    286297                } 
    287298