ActionScript 2.0 :: Dim Menu Item - First Button Gets Enabled While The Third Button Is Disabled?
Aug 3, 2008
This is something that is probably really basic but for the love of gawd I can't remember how to do it.
Example: 3 menu buttons, you press the first button and it executes a function and disables itself leaving the second and third button enabled. You then press the third button and the first button gets enabled while the third button is disabled. Same thing goes for the second button.
View 8 Replies
Similar Posts:
Aug 2, 2008
I'm making a VERY basic Jeopardy game, and I need buttons to be disabled after being clicked on once.
Oh, and I'm working in CS3, but I'm using AS 1&2 because that's what I learned... I have no idea how to use AS 3...
example: frame 1 has btn11 in it. btn11 when clicked takes the person to frame 2. when done with frame 2, they click on return.
the return button (btnReturn1) has the following AS
on (release) {
gotoAndStop ("Round1",1)
btn11.enabled=false;
}
the problem is that it works at first - the button disables when I get back to frame 1, but the next time I click a different button then return to frame 1, the first button I disabled isn't disabled anymore.
my actionscript so that my disabled buttons stay that way no matter how many times I come and go from the frame? or if you have a better way to do it, that'd be great. basically, it's like the jeopardy screen, and after "songs" for 200 is clicked, I don't want it to be clickable again at all.
View 1 Replies
Dec 20, 2005
I have 6 button call m1-m6...ok my problem is how to disabled button when one of the button being press...and also stt.text will display crrently selected button...coz currently when I press the button it never stated and also 'stt.text ' also show nothing.
[Code]...
View 10 Replies
Mar 21, 2011
In my flex application I have several pop ups, when a pop up is opened the application is disabled and enabled back when the pop up is closed.Is there way to get application's enabled / disabled event and perform some activity like hiding a display object.I know, I can get open and close event of the pop up but I don't want to write it for all the pop ups and pay for maintainability.
PS: I am using PopUpManager to create pop ups.
View 1 Replies
Nov 16, 2004
I have this movieclip with buttons residing in the main timeline. This movieclip is set with an _alpha = 0. How do I disabled this movieclip/buttons in the main timeline as well? The movieclip will be visible only if another button(not within this movieclip) is pressed. I tried using the following but it doesn't work. movieclipInstanceName.enabled = false; How do I go about doing it?
View 7 Replies
Nov 16, 2004
I have this movieclip with buttons residing in the main timeline. This movieclip is set with an _alpha = 0. How do I disabled this movieclip/buttons in the main timeline as well? The movieclip will be visible only if another button(not within this movieclip) is pressed. I tried using the following but it doesn't work. movieclipInstanceName.enabled = false; How do I go about doing it?
View 7 Replies
Jun 20, 2010
Basically, I have a button and on click it displays a menu. I want to click that menu a second time and the menu closes. Currently, every time you click the button, the menu reopens. I pasted the Flex livedoc example below. If you click the button, the menu keeps reopening.Now, I rigged it up by setting a var to open and closed, so when clicking the button it does a check. However, if you click away from the screen, the HIDE event gets dispatched, and the menu closes. This messed up the open close var being set.
How could I make this Flex example below show the menu on button click, and then on a second button click, it closes the menu? Take into affect that if you click away from the menu, it closes it.Also, I played around with the MOUSE_DOWN_OUTSIDE event for the button and set the preventDefault, and the FlexMouseEvent event.cancelable is set to false.Changing to a PopUpMenuButton is not an option. I have to much skinning involved.Here is the Flex example:
<mx:Script>
<![CDATA[
// Import the Menu control.
import mx.controls.Menu;
[code]....
View 1 Replies
May 19, 2010
I have a menu with many sub menus. I need to change the color of the selected button and then move on to the sub menu. My menu is horizontal and now it's not obvious the path that you follow.
View 2 Replies
Jan 11, 2009
I have a movie that has a play button. I need this button disabled on only one single frame ("end"). and enabled on all others. I have this code on the first frame
this.onEnterFrame = function() {
if (_root.currentframe="end"){_root.scrubber.playbutt on.enabled=false;}else{_root.scrubber.playbutton.e nabled=true;}
}!
View 12 Replies
Mar 12, 2011
I have a set of buttons with the following script... so when clicked they go to relevant frame. My question is how to I temporarily disable a button so it appears highlighted but you cannot click it when you are in that spot. E.g. when scenario 1 button takes you to scenario 1, I only want the others buttons to be clickable...
A_scenario1_btn.addEventListener(MouseEvent.CLICK,part1scenario1);
function part1scenario1(event:MouseEvent):void {
gotoAndPlay("label4"); }
A_scenario2_btn.addEventListener(MouseEvent.CLICK,part1scenario2);
function part1scenario2(event:MouseEvent):void {
[Code] ......
View 5 Replies
Oct 18, 2009
I have the following situation
MainMove.swf is doing a loadmovie of SecondMovie.swf
The Button that loads SecondMovie.swf also disables other buttons in MainMovie.swf
on (release) [code].........
How do I Re enabled the Buttons in MainMovie.swf from a Button within SecondMovie.swf?
View 2 Replies
Apr 16, 2010
i have a 3 buttons in library i need: if i click to 1button i see 1mc but can not click to 2button and 3button, just after i close 1mc i can click to 2button and 3button, and sure for 1button again why its not working in my example?
[Code]...
View 6 Replies
Apr 7, 2011
Got a button (imported png defined as a button in the library).The button is dragged onto the stage, given an instance name "btn".Clicking the button fires an eventListener which is doing all the right things, except...
btn.enabled = false;
...only changes the cursor from a pointing finger to an arrow. What?! It is still clickable.My intention is to disable the button so it cannot be clicked. But it can still be clicked. Not good.How do I disable a button and prevent it from being clicked?
View 1 Replies
Jun 15, 2010
I want to make a button disabled if a datagrid is empty and it should be enabled when there is atleast 1 entry. The entries in the grid are made at runtime. I tried this this is the button:
<mx:Button id="update" label="Update Contact" enabled="{isButtonEnabled()}"/>
And the function is defined as where dg_contact is the datagrid:
public function isButtonEnabled():Boolean {
if(dg_contact.selectedIndex==-1) {
return false;
} else {
return true;
}}
View 1 Replies
Mar 1, 2010
I'm trying to set the rtBtn to 100% alpha after the tableButton has been pressed by the user. Currently rtBtn is living on the stage and set to 25% alpha. I've gotten all the other parts of this code to work, except the color transform. I imagine I'm declaring it improperly.... any suggestions? Originally I was trying to apply a tint, but that seemed to be only AS 3.0?..[code]
View 2 Replies
Apr 13, 2010
I have a CSS file containing the following definition :
[Code]....
Now, I want to use the disabled-skin defined in the CSS, as the upSkin of b1. So something like b1.setStyle("upSkin","Tab.disabled-skin"); But I am struggling with the exact syntax of the second argument for setStyle. What should I use for the second argument for setStyle method?
View 1 Replies
Apr 4, 2007
This is the code i got and you can see the attached output, but i still got a problem, like after the user has selected one of the radioButtons and clicked submit button i want all the components even the submit button to be disabled so that he won't click around until he gets the rite answer. How can i add this fucntionality to ma code below:
[Code]...
View 6 Replies
Apr 8, 2011
I have a Flex Spark Button that I've changed the background to a dark color using
s|Button {
color: #66ffff;
chromeColor: #333333;
[code]....
View 2 Replies
Nov 14, 2011
I attempted to build a Flex 4 skin for a Spark button, typical practice. I adjusted the colors and other styles to my liking, including using dot selectors to specify alternate colors and such during different states. However, these are all ignored when the button is disabled. Regardless of what I do, in the disabled state, my button always has the wrong color and is alpha'd to 0.5 (even if I specifically state that alpha.disabled="1"). All the other skin states work as expected. This is my custom skin. If it were working correctly, it would appear to have no shadow or highlight, and would be a gradient grey color. Instead, it appears as a 50% alpha version of the up state (shiny green).
<?xml version="1.0" encoding="utf-8"?>
<s:SparkButtonSkin xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fb="[URL]"
minWidth="21" minHeight="21" alpha.disabled="1">
[Code] .....
This is the code used to create and then disable the button:
_action1Button = new Action1Button();
view.actionGroup.addElement(_action1Button);
_action1Button.enabled = false;
The error was that _action1Button is not the actual button, rather, it's the container of the button. Doh! Switching it to _action1Button.actionButton.enabled = false; fixed the issue.
View 1 Replies
Jul 12, 2007
I'm using a Regular.easeIn for a menu, no prob on this, but I can not access to my category will it's still open =>.I meen the category( product_mc) inside the menu (mc_menu1) is not enabled...
import mx.transitions.Tween;
import mx.transitions.easing.*;
function ouvert(monMenu,haut):Void{[code]....
View 2 Replies
Feb 28, 2004
I tried the following code and it works great.
on (release) {
loadMovieNum("main.swf", 1);
main.enabled = false;
}
How would I go about resetting the the button's status after another movie is loaded? Do I have to manually code for each movie loaded or is there an easier way using loops perhaps?
View 14 Replies
Jul 3, 2010
I want to generate a button sequence on ButtonBar with some disabled buttons:[code]
View 1 Replies
Jan 29, 2007
I am using a ENTER_FRAME to destroy the rollover state of my button. I cannot use a MOUSE_OUT, because I have buttons on top. Is there a better way to do this?
Code:
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.*
import Tween
[Code] .....
View 3 Replies
Jun 15, 2010
I am trying to once example in Flash Builder 4. But I got one error. When I go to In Design mode, select the Label control that reads Company Vehicle Request Form. After that when I go In Properties view, then I want to click the Convert to CSS button. But that time Convert to Css button is disabled.
View 2 Replies
Mar 11, 2011
I'm trying to get the menu width of a menu item in flex 4. I can get it but I have to show the menu first, then hide the menu, do a calculation, and show it again. Is there an easier way to get the item menu width without this hassle?
View 1 Replies
Jan 12, 2011
i was making asimple menu .
ActionScript Code:
var currentLink:MovieClip = a_mc;
//buttons mode[code]...........
when i click on the button the alpha of this button will be 0.5 , when i click on another button the alpha of the previous button is still 0.5 , and so if i clicked on all buttons the alpha of all buttons will be 0.5,,,i didn't want that , i want when i click on the button , alpha return to 1 for the previous button .
View 5 Replies
Jan 1, 2007
i new to actionscript and am not sure where to begin so i will explin what i would like to do. i have a myspace site that i have created a div overlay with...<a [URL] now what i would like to do is use actionscript so when you click on the menu button a image wil pop up in the ipod screen and when u click the play button something else will pop up
View 6 Replies
Apr 9, 2008
I'm trying to add a back button once I click a main menu button then remove the back button once it is pressed. I get the title error.
[Code]...
View 6 Replies
May 30, 2009
I'm trying to make a flash animation but I'm getting these two errors: 1119: Access of possibly undefined property enabled through a reference with static type Class. (line 4) 1061: Call to a possibly undefined method addEventListener through a reference with static type Class. (line 5) This is the code I'm using:
Code: Select allimport flash.display.*;
import flash.events.*;
stop();
buti.enabled;
buti.addEventListener(MouseEvent.CLICK,pla);
function pla(e:MouseEvent):void {
gotoAndPlay(2);
}
My animation is a initial photo that turns around and becomes a black backgroud (were I'll add some text), now what I want is that the photo won't animate until I do a click in it. I used a Layer with a transparent image and converted it to a button and the export name is buti. The other to layers were converted to movie clips named preto and foto.
View 10 Replies
Feb 27, 2011
i want to add new Menu in flash IDE and i want to add inside the adobe flash menu. How i can add new menu in menubar and new menu item inside the help menu. is it possible to do this things if yes then which language i have to use for this. what is way to start development and what is the .MXP file and how to create this .MXP file.
View 1 Replies