Disable Button
Hello,
I just need help in disabling a button after it performs a check function.
ex. The button is being used to check a fill in the blank test. Once the button is hit and the answer is right, I want the button to become static.
Thank-you!
FlashKit > Flash Help > Flash General Help
Posted on: 10-05-2006, 01:22 PM
View Complete Forum Thread with Replies
Sponsored Links:
Movie Clip Within Button - How Do You Disable Down State Of Button?
Hi - I have created a menu down the side of my flash site which is in the form of a button so that when the user rolls over the button, it brings up the menu. Within, this button is just text - the names for each page the user can select to go to (text is within movie clips so I can add actionscript to them).
However, I want to add on (press) {gotoAndPlay("home",1); } etc for each movie clip within this button but when i test the site, this code does not work as the buttons down state has priority over the movie clips within it.
Is there some actionscript code which could disable the down state of a button? (as i only need the button as a rollover anyway and i need the movie clips within the button to have priority in terms of actionscript for linkage etc)
Thanks
View Replies !
View Related
[AS1 BUTTON] Disable Part Of Button Code
Hi Shockers,
I read on a few articles on here about disabling a button but with my case I have a small problem of still needing the rollOver function to work. So my question is : Is it possible to disable the just the on Release and not the rollOver or the rollOut?.
Thinking about it I dont think you can but you never know what you guys come out with...
And I also have the problem of getting the button to be enabled after another button is clicked.
ActionScript Code:
on (release) {
//Take the bar up first
_root.barTo(1);
//Takes it to the right page
_parent.guestInfo.gotoAndStop("guestlist");
//Take away the sign name
_root.choiceBack();
//Put the 3D logo in to middle to show loading
_root.loaderLoad();
//load Movie Behavior
_root.guestInfo.post.loadMovie("guestlist.swf");
}
on (rollOver) {
_parent.slider.slider2.name.text = "GUESTLIST";
_parent.jumpTo(8);
}
on (rollOut) {
_parent.jumpTo(2);
}
View Replies !
View Related
How To Disable The Button
When the mouse cursor goes over a button, it changes to a hand sign, is it possible to script it in such a way that the arrow remains, rather than it changes to a hand sign?
if not, any other suggestions?
View Replies !
View Related
Button Disable ?
Hi,
When we want to disable a button after release or any of the wanted actions, we do :
on (release) {
button("button1") enable=false ;
}
Something wrong ... it seems ...
Thanks
View Replies !
View Related
Disable A Button?
Ok don't understand this one.
Flash MX
I have a series of buttons that on roolover start a movie clip.
Some of this will start a sub menu on click.
The sub menu has a button called close window that will close the window of the sub menu.
I want to disable all buttons while the submenu is open and re enable them when window is closed.
Is there anyway to disable momentarly a button?
I ve been trying to render the movie clips invisible but that is not working.....
Thanks!
View Replies !
View Related
Disable Button
How would I go about disabling a button after it is pressed, but having it become active once the user clicks another button?
i.e. I click button 1. While I am browsing the contents of '1' I want to disable the '1' button. Then I click button 2 and when I am in '2', button 1 is active again where I cannot press button 2.
hope that makes enough sense, thanks!
Phil
View Replies !
View Related
Disable Button
I have such button: text (on mouse over this text changes color and
cursor -> button cursor).
How with Action Script I can disable this button, f.e. replace on graphic
or with another method?
View Replies !
View Related
Disable Button?
hey,
i was wondering how to use the command button.enable. i cant quite figure it out. do you put the instance name of the button where "button" is in that like, say my instance name is "homepage", would it look like this?
Code:
homepage.enable(false);
or how does it work?? i cant figure it out. please help.
jake
View Replies !
View Related
Disable Button ?
Does anyone know a lign of code to disable Buttons?
I have a MC loading on top of the main movie, but the buttons on the main movie are still functionable! Even when my MC covers the buttons, the viewer can still click the buttons!
Thanks
Chris
View Replies !
View Related
Disable Button
another question here since FK search seems to be down...
How do I disable a button if an external SWF is loaded on top of it?
Here's the scenario: I've got a button sitting on a layer on my main time line. When clicked, this button loads an external SWF onto another layer above the button. When loaded, the external SWF sits on top of the button, hiding it.
This external SWF has a form that needs to be filled out. When a user enters information in the first field and tabs to the second field, an outline of the button sitting on the layer underneath the loaded SWF appears. What makes it wierd, is that the outline that shows is a yellow border 3 or 4 pixels thick...something that isn't used in the button.
I don;t know if disabling the button would solve this problem or if there's a better way...other than moving the button or external SWF position.
Any ideas?
Thanks
View Replies !
View Related
Disable A Button?
I'm sure it's been asked before but I've done a search and not found the answer. Here goes
I have several buttons on my site that when pressed, load an external SWF into an empty movie clip. I need to disable the current button so it doesn't keep loading the swf. and only the other buttons will be active. so the first time I press contact, it works but If I press it again, it doesn't. They obviously need to be made active again once one of the other buttons are pressed.
I have this actionscript on my home button for example:
on (release) {
loadMovie("spreehome.swf", "empty");
}
I would need to actually see whatever actionscript you supply and how it works with the above code or I would only be writing back to ask. (I'm only just starting out with actionscript and find it a difficult concept at the moment)
Your help would be very much appreciated.
Thank you.
View Replies !
View Related
Disable A Button...
Using script what is the best way to disable a button?
I have a button and based on whether a file exist or not I'd like to dim it and disable it.
Any ideas?
Many thnanks in advance.
View Replies !
View Related
How To Disable This Red Button?
Can anyone tell me why when the Flash movie loads, the red box appears?? I've tried to disable this button by using the _root enable=true/false, but this doesn't work. I would just like it so that none of the boxes load unless you click on the button for them to load! Can anyone help me? I'm posting my .fla. Thanks!
View Replies !
View Related
Disable Every Button?
I have an option in my flash movie that opens a settings panel. The panel opens on the highest layer, and then one layer behind that I dynamically create an 800x600 black rectangle that I fade in to effectively fade out the rest of the movie while this panel is open. When the panel is open all the buttons behind it are still clickable. There are a lot of them, so I'd rather not have to disable each one individually if possible. Any suggestions on how to make them unclickable when the settings window is open.
Thanks!
View Replies !
View Related
Disable Button
hello people, i wonder if this mess of buttons i have can be helped.
I have this movie with 80 levels most of them are buttons. In many cases one button falls over another, and this is where the mess starts. Is there a way i can disable the button action bellow the one i have on top??
thanks in advance ^_^
View Replies !
View Related
Disable Button.
I have my buttons all load up on a single movie clip. And i was wondering how do i disable a button after its clicked? and then when another button is clicked it re enabled.
Thanks.
View Replies !
View Related
How Do I Disable An MC Button
I have two movieClip buttons with the following codes
and I want to disable it when it's clicked, how ?
Thanks in advance ...
btn1.addEventListener(MouseEvent.ROLL_OVER, over);
btn1.addEventListener(MouseEvent.ROLL_OUT, out);
btn2.addEventListener(MouseEvent.ROLL_OVER, over);
btn2.addEventListener(MouseEvent.ROLL_OUT, out);
function over(e:MouseEvent):void {
e.currentTarget.gotoAndPlay("over");
}
function out(e:MouseEvent):void {
e.currentTarget.gotoAndPlay("out");
}
View Replies !
View Related
Disable Right Button
Is there any way I could disable the right button menu, I managed to delete all menus except the 'About Flash' and the Settings one. Someone knows how I could be able to use it instead? Like I wanna right click on a button and I get a crosshair or whatever.
Thanks in advance
Regards,
Carl
View Replies !
View Related
Disable A Button
To anyone that can help. Been out of the tool for a while and I do not remember. I have 8 buttons and I want them only to function one time each but still be displayed. What is the action script I need? And do I add it to the end of the button action or the last frame of the movie that the button activates?
thanks,
martyk59
View Replies !
View Related
Disable Button
When a button is clicked and load a new layer using moviecliploader to appear at the front of the content. Is there any easy way that I can disable all the buttons at the bottom layer?
View Replies !
View Related
Disable Button
as my previous post Loading external movie on top of all layers
i am facing a problem now that all the buttons are still working when the external movie loads on top.
I want all the menu buttons to be disabled when the external movie loads and there is a CLOSE Button in the external movie. i tried to search for how to disable the buttons. i found some, but couldnt understand what to do.
So any help will be appreciated here plz.
Thnx in advance.
Regards
View Replies !
View Related
Disable Button
I need some help, I have a button that loads a movie, and after it loads that movie I want it to be disabled so I used this scrpit
on (release) {
button.enabled = false;
}
and does work
however after the movie clip is through playing and a button is pressed that unloads it I want the button to be enabled agian.
this is where I get confused.
any help would be great.
View Replies !
View Related
How To Disable A Button
I have some buttons that play an external swf inside an empty movie clip on the main timeline. I was wondering what Actionscript I need to disable the button when it is pressed. I want the button to still have roll over functionality and everything, but I just want the swf to load once when the button is pressed. Below is the script I am using right now. Thanks!
on (release) {
//load Movie Behavior
if(this.content == Number(this.content)){
loadMovieNum("about.swf",this.content);
} else {
this.content.loadMovie("about.swf");
}
//End Behavior
}
View Replies !
View Related
Disable Button
Is there a way to disable a button at the end of a clip, but when you play the clip again, it will return to working? I dont know if you understand this or not, if you don't ask for a more in depth question.
View Replies !
View Related
Button Disable..
I have a little question,
I have 7 buttons, when I click on each one of them, it's loading a swf file into a mc (each one of them have different swf file)
my question is: when I click for example on button 1, his swf file is showing on the mc. can I disable button 1 when his swf file is showing? (and it will return afer I click on other button)
it's possible?
thanks
View Replies !
View Related
Disable Tab Button
i want to make a game where you have two pictures and one has one detail that is different, to identify it, you click on it, i have already overcome the cursor changing (by hiding the mouse and using the hand as the cursor it doesnt change). but you can easily just push tab and a nice little box comes around it. i ddont want it. anyway of not doing this?
View Replies !
View Related
Disable Button
I want to know how to disable button, or movie clip.
I mean, I don't want to see that hand when you roll over the mouse.
You know what I mean?
I need to do this because I want to load another flash movie onto the main movie. Then, I don't want to click on the buttons on the bottom layer.
thank you in advance
View Replies !
View Related
Button Disable?
when I load a movie over the top of another movie the button underneath is still active
does anyone know if I can disable this button so it doesnt interfere with the movie on top?
cheers
View Replies !
View Related
How To Disable A Button
I have some buttons that play an external swf inside an empty movie clip on the main timeline. I was wondering what Actionscript I need to disable the button when it is pressed. I want the button to still have roll over functionality and everything, but I just want the swf to load once when the button is pressed. Below is the script I am using right now. Thanks!
on (release) {
//load Movie Behavior
if(this.content == Number(this.content)){
loadMovieNum("about.swf",this.content);
} else {
this.content.loadMovie("about.swf");
}
//End Behavior
}
View Replies !
View Related
Disable Button At First
I have this script that disables the button that was clicked last. How do I disable the home button at first?
This is the script:
ActionScript Code:
var buttons = new Array();
buttons = [this.home_mc, this.gallery_mc, this.products_mc,
this.proofs_mc, this.pricing_mc, this.info_mc];
var disabled;
function attachActions(btn:MovieClip, id:Number) {
btn.onRelease = function() {
this.enabled = false;
disabled.enabled = true;
disabled = this;
}
}
for(var i = 0; i < buttons.length; i++) {
attachActions(buttons[i], i);
}
Any help would be great!
Thanks!
Austin
View Replies !
View Related
Disable Button
Hi all
I working on dynamic button list and below is the script that attach a button from library and create a list of five simple buttons using array
ActionScript Code:
mainSections = new Array(
"button1","button2", "", "", "");
function createBut(mainSections, x, y, direction){
for (i=0; i<mainSections.length; i++) {
attachMovie("mainButton", "main"+i, i+100);
myButton = this["main"+i];
myButton.button.value = mainSections[i];
myButton._y = myButton._height*i;
}}
createBut(mainSections);
everything works well
now i want to disable last three buttons that are blank.
I tried
something like
main3.enabled = false
main4.enabled = false
main5.enabled = false
but doesn't work
please give some suggestions
View Replies !
View Related
Disable A Button
Hello people, heres the dilly.
on my main stage i have 3 MC's, that also contain buttons, now the user clicks on a MC that contains the button the MC plays and loads content dynamicly, my question is that while that content is loaded into the movie clip, i want the button disabled so that if you click on it again it doesnt load the content again. I hope this is clear enough
Thanks in advance.
-\Matt
View Replies !
View Related
Button Disable?
Hi, everyone. I'm working on a portfolio site and am having a little bit of a problem with my menu. Basically how it works is that when the user clicks on a button, the button also triggers the movement (via the tween class and easing) of two other movieclips. These movieclips are long bars that "open up" to reveal content on the site.
Code:
Code:
// Importing classes from fl package must be done explicitly
stop();
import fl.transitions.Tween;
import fl.transitions.easing.*;
// Designate the home position of the sliding panel. This is the location on the stage when the panel is closed.
var ptPanelHome:Point = new Point(2, 254);
// Initially set the y position of the bottom bar to reflect that the panel is closed.
mcBottomBar.y = 254;
// Put the panel in its starting (closed) position.
mcBottomBar.x = ptPanelHome.x;
mcBottomBar.y = ptPanelHome.y;
/* This is an array of the five buttons that are within the movieclip mcBottomBar*/
var btnArray:Array = new Array(mcBottomBar.webSlideBar, mcBottomBar.threeSlideBar, mcBottomBar.photoSlideBar, mcBottomBar.aboutSlideBar, mcBottomBar.resumeSlideBar);
/* There are two variables declared for tweens on the top and bottom bars that will be animated. When the panels are closed
(or in the starting y position), a new tween is constructed and moves the panel from their starting points.
mcBottomBar moves to a point 270 px down the stage, while mcTopBar moves to a point 140 px up the stage.
If the panel is not in starting y position the actions are reversed.
*/
function onMouseClick (event:MouseEvent):void {
var twSlideBottom:Tween;
var twSlideTop:Tween;
if (mcBottomBar.y == 254) {
twSlideBottom = new Tween(mcBottomBar, "y", Back.easeOut, ptPanelHome.y, ptPanelHome.y + 270, 20);
twSlideTop = new Tween(mcTopBar, "y", Back.easeOut, ptPanelHome.y, ptPanelHome.y - 140, 20);
if (event.target == mcBottomBar.webSlideBar){gotoAndStop(2);}
if (event.target == mcBottomBar.threeSlideBar){gotoAndStop(3);}
if (event.target == mcBottomBar.photoSlideBar){gotoAndStop(4);}
if (event.target == mcBottomBar.aboutSlideBar){gotoAndStop(5);}
if (event.target == mcBottomBar.resumeSlideBar){gotoAndStop(6);}
}
else {
twSlideBottom = new Tween(mcBottomBar, "y", Back.easeOut, mcBottomBar.y, mcBottomBar.y - 270, 20);
twSlideTop = new Tween(mcTopBar, "y", Back.easeOut, mcTopBar.y, mcTopBar.y + 120, 20);
gotoAndStop(1);
}
}
function onMouseOver (event:MouseEvent):void {
/*Put in some rollover states for the buttons)*/
}
/* This for-loop adds event listeners to every instance in the array. One event listener is for when the mouse is clicked on a button
The other event listener is for when the mouse is hovered over a button*/
for (var i: int = 0; i< btnArray.length; i++){
btnArray[i].addEventListener(MouseEvent.CLICK, onMouseClick);
btnArray[i].addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
}
The problem that I'm having is that if the user were to click a button before the animation tween on mcBottomBar or mcTopBar is done, the y coordinates get thrown off. Then the if statement Code:
if (mcBottomBar.y == 254) can no longer work because the movieclip never gets back to that position.
My question is, should I somehow disable the button until the tween animation is done? If so, how would I do this? Otherwise, is there a better way to be setting my code up (i.e. perhaps not checking for equality with the y cordinate)?
View Replies !
View Related
|