Skip navigation
Currently Being Moderated

Stop the buttons becoming click-able but still hover

Feb 28, 2012 1:09 AM

Hi guys,

 

I have a flow chart, the Flash works perfectly, no problems, however i am using the multiple screens on Powerpoint slides in a program called Articulate (a simple program to house things like this as a whole media object on a website etc).

The only issue with this is that i need to add links on top of each button on the page, which link to other slides in the presentation. So not hyperlinks in the Flash code, slide-hyperlinks in Powerpoint.

 

The Flash code should be enough to make the shapes have hover states, but not be a 'button', if that makes any sense? The hyperlink shapes i add on afterwards in Powerpoint should be the clickable areas with the cursor turning to a hand, but the Flash code by itself should just have a hover state with the cursor staying as an arrow.

 

Does that make sense?

 

Here's the code -

 

var tl:MovieClip=this;

 

for(var i = 1; i < 30; i++){

tl["mc"+i].ivar=i;

 

tl["mc"+i].onRollOver=function(){

tl["but"+this.ivar].gotoAndStop(2);

}

tl["mc"+i].onRollOut=function(){

tl["but"+this.ivar].gotoAndStop(1);

}

 

}

 

 

Thanks!

Ollie

 
Replies
  • Currently Being Moderated
    Feb 28, 2012 2:02 PM   in reply to andersonOllie

    See if the mouse it hitting the button, then change the state of the movieclip if it is hitting or not.

     

    onMouseMove = function () {

              if (buttonMovieClipName.hitTest(_xmouse, _ymouse, true)) {

                        trace("hitting");

      // add code here

              } else {

           trace("not hitting");

           // add code here

      }

    };

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 28, 2012 5:13 PM   in reply to andersonOllie

    If you d not assign onRelease functionality to the movieclips they will not react tio being clicked.  To keep them from displaying the hand cursor you can set the useHandCursor property to false

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 29, 2012 4:17 AM   in reply to andersonOllie

    It would be something along the lines of changing this portion of the code you showed to add that line...

     

    for(var i = 1; i < 30; i++){

    tl["mc"+i].useHandCursor = false;

    tl["mc"+i].ivar=i;

     

    tl["mc"+i].onRollOver=function(){

    tl["but"+this.ivar].gotoAndStop(2);

    }

    tl["mc"+i].onRollOut=function(){

    tl["but"+this.ivar].gotoAndStop(1);

    }

     

    }

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 2, 2012 5:09 AM   in reply to andersonOllie

    I thought you said the other buttons are not part of the Flash file.  If that's the case, then there isn't much you can do in the Flash file to fix the other file.  The only thing I can see that might be the problem is that the Flash buttons might block the other buttons, thus rendering them unusable.  If that's the case, then you might need to rethink your approach.

     
    |
    Mark as:
  • kglad
    72,371 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 6, 2012 7:08 AM   in reply to andersonOllie

    (ned's stumped because you're posting confusing info.  what does this hover-stuff have to do with your links in articulate?)

     
    |
    Mark as:
  • kglad
    72,371 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 6, 2012 11:48 AM   in reply to andersonOllie

    I'd like to see if there was a way of removing any 'button' (clickable) functionality from my movieclips. So they are not usable at all, but still are effected when hovered.

    yes, delete your buttons' onRelease and/or onPress handlers.  for example,

     

    delete yourbutton.onRelease;

     
    |
    Mark as:
  • kglad
    72,371 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 7, 2012 6:25 AM   in reply to andersonOllie

    if:

     

    var tl:MovieClip=this;

     

    for(var i = 1; i < 30; i++){

    tl["mc"+i].ivar=i;

     

    tl["mc"+i].onRollOver=function(){

    tl["but"+this.ivar].gotoAndStop(2);

    }

    tl["mc"+i].onRollOut=function(){

    tl["but"+this.ivar].gotoAndStop(1);

    }

     

    }

     

    were the only code you were using the above movieclips would not respond to a mouse click, on the rollover and rollout.  do your movieclips respond to a click?  if yes, there's code elsewhere causing that. 

     

    use movie explorer to find that code.

     
    |
    Mark as:
  • kglad
    72,371 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 9, 2012 6:05 AM   in reply to andersonOllie

    ned already showed you how to stop the hand from turning to a cursor on rollover in message 6 and you acknowledged that he solved that problem.

     
    |
    Mark as:
  • kglad
    72,371 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 12, 2012 7:12 AM   in reply to andersonOllie

    if you're asking whether the buttons are still undergoing a rollover and rollout, the answer is yes.  if you want to remove their rollover and rollout, use:

     

    for(var i = 1; i < 30; i++){

    delete tl["mc"+i].onRollOver;

    delete tl["mc"+i].onRollOut;

    }

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points