• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Custom cursor using startDrag

New Here ,
May 24, 2012 May 24, 2012

Copy link to clipboard

Copied

Hello everyone,

I have a movieclip following my mouse to act as a custom cursor.

I am using startDrag on the movie clip and mouse.hide()

What I am trying to resolve is the following:

I have several hidden simple button objects in the background of my flash movie. ( I am using these to detect when the user has the mouse in certain areas of the flash movie)

When i go to move over these simple buttons, my custom cursor movieclip stops following the mouse cursor.  Normally my cursor would also then change to the Hand cursor, but i disabled that.

Can anyone think of any method or hack that would make this work for me?  I would like my custom cursor following the mouse pointer at all times even when hovering over a simple button.

thanks in advance.

TOPICS
ActionScript

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , May 25, 2012 May 25, 2012

ID2335HoverBlock1.addEventListener(MouseEvent.MOUSE_OVER, ID2335HOVER);

function ID2335HOVER(event:MouseEvent):void

{

     //more code here

    // recall the startDrag

    myCustomCursor.startDrag();

}

Votes

Translate

Translate
Enthusiast ,
May 24, 2012 May 24, 2012

Copy link to clipboard

Copied

Change the simple button objects to movieClips

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 24, 2012 May 24, 2012

Copy link to clipboard

Copied

Ok so id like to do that but I dont seem to get the event listener called while using a movie clip. Im using the following code:

ID2335HoverBlock1.addEventListener(MouseEvent.MOUSE_OVER, ID2335HOVER);

function ID2335HOVER(event:MouseEvent):void

{

     //more code here

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 24, 2012 May 24, 2012

Copy link to clipboard

Copied

The addEventListener works fine with MovieClips 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 24, 2012 May 24, 2012

Copy link to clipboard

Copied

You are right I got it working now, But now its acting the same as a simple button would have.  My custom cursor stops following my mouse while over these movieclips that have the listener attached... hmmm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 24, 2012 May 24, 2012

Copy link to clipboard

Copied

The cursor changes to hand cursor yet?

When you say "single button Several hidden objects", the number is?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 25, 2012 May 25, 2012

Copy link to clipboard

Copied

It is not changing to the hand cursor, my custom cursor stops following my mouse pointer. Ill try a few more things

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 25, 2012 May 25, 2012

Copy link to clipboard

Copied

ID2335HoverBlock1.addEventListener(MouseEvent.MOUSE_OVER, ID2335HOVER);

function ID2335HOVER(event:MouseEvent):void

{

     //more code here

    // recall the startDrag

    myCustomCursor.startDrag();

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 25, 2012 May 25, 2012

Copy link to clipboard

Copied

LATEST

That seems to work for me, thank you so much

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines