[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

i CAN click invisible button.



i have button object instance in my movie. sometimes other movie object covers this button, but i can still click on it. also while moving cursor over it, cursor changes to handpoint type. is there any way of avoiding this?

thanks in advance.

0
kzdown
Asked:
kzdown
1 Solution
 
stef4sCommented:
put the button in a movie on frame 1. on frame 2 have the button graphic displayed aswell. so to disable the "button" tell the movie to go to frame 2
0
 
kzdownAuthor Commented:
i can not do that as it is animation that moves (hides) menu tab (with buttons) in the back of other object (movie clip)
0
 
stef4sCommented:
do you see though that you can make functions in the movie like this

function enabled(state){
if (state){
gotoAndPlay(1)//the button is active
}else{
gotoAndPlay(2)//the button is inactive
}
}


calling from the timeline above it is then quite easy.

buttonInstance.enabled(true);

0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
ZefferCommented:
Part 2 of your question..

From Flash ActionScript Help..

To create a custom cursor:

1  Create a movie clip to use as a custom cursor.
2  Select the movie clip instance on the Stage.
3  Choose Window > Actions to open the Object Actions panel.
4  In the Toolbox list, select Objects, then select Mouse, and drag hide to the Script window.
 The code should look like this:
 onClipEvent(load){
     Mouse.hide();
}
 
5  In the Toolbox list, select Actions; then drag startDrag to the Script window.
6  Select the Lock Mouse to Center box.
 The code should look like this:
 onClipEvent(load){
     Mouse.hide()
     startDrag("this", true);
}
 
7  Choose Control > Test Movie to use the custom cursor.
 


Buttons will still function when you use a custom cursor. It's a good idea to put the custom cursor on the top layer of the Timeline so that it moves in front of buttons and other objects as you move the mouse in the movie.

For more information about the methods of the Mouse object, see their entries in the ActionScript dictionary: Overview.



0
 
JaymolCommented:
Or alternatively set the "_visible" property of a movie clip (with the button in it) to false.

John.
0
 
Computer101Commented:
kzdown,
Moderators have gone through alot of touble to clean questions you have not closed.  Do not make this the same.


Computer101
E-E Moderator
0
 
Computer101Commented:
Again
Computer101
0
 
Computer101Commented:
again
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now