A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: custom cursor not disappearing in safari

  1. #1
    Member
    Join Date
    Nov 2008
    Posts
    82

    custom cursor not disappearing in safari

    Hi,
    I made a custom cursor for a photo gallery. It works. But when I go off of the gallery, my custom cursor disappears (good), but the "normal" cursor is gone too. So if I go off of the gallery, I don't see a cursor.
    Any ideas?
    Thanks!

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Please post the code that turns your cursor on and off.
    Please use [php] or [code] tags, and mark your threads resolved 8)

  3. #3
    Member
    Join Date
    Nov 2008
    Posts
    82
    Here's a test file - thanks for checking it out!
    Attached Files Attached Files

  4. #4
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Try something like this:

    PHP Code:
    var _cursor:MovieClip = new NextPrevImg();
    _cursor.prev.visible _cursor.next.visible false;
    _cursor.mouseEnabled false;
    _cursor.mouseChildren false;
    addChild(_cursor);

    var 
    overMC:Boolean false;

    mc.addEventListener(MouseEvent.ROLL_OVERimageOver);
    mc.addEventListener(MouseEvent.ROLL_OUTimageOut);
    stage.addEventListener(Event.MOUSE_LEAVEimageOut);
    mc.mouseChildren false;

    function 
    imageOver(e:MouseEvent):void{
        if(
    overMC) return;
        
    overMC true;    
        
    Mouse.hide();    
        
    addEventListener(Event.ENTER_FRAMEupdateCursor);
    }

    function 
    imageOut(e:Event null):void{
        if(!
    overMC) return;
        
    overMC false;
        
    Mouse.show();
        
    _cursor.prev.visible false;
        
    _cursor.next.visible false;    
        
    removeEventListener(Event.ENTER_FRAMEupdateCursor);
    }

    function 
    updateCursor(e:Event null):void{
        
    _cursor.mouseX;
        
    _cursor.mouseY;
        
    _cursor.prev.visible Boolean(mc.mouseX mc.width 2);
        
    _cursor.next.visible = !_cursor.prev.visible;
    }

    function 
    updateSize(e:Event null):void{
        
    mc.= (stage.stageWidth mc.width) / 2;
        
    mc.= (stage.stageHeight mc.height) / 2;
    }

    stage.scaleMode StageScaleMode.NO_SCALE;
    stage.align StageAlign.TOP_LEFT;
    stage.addEventListener(Event.RESIZEupdateSize);
    updateSize(); 
    Please use [php] or [code] tags, and mark your threads resolved 8)

  5. #5
    Member
    Join Date
    Nov 2008
    Posts
    82
    Thanks - I'll check this out!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center