How to add a button state is 'disabled '?

I have a Navigation Menu of the main FLASH Web Site that has (7) buttons (BUTTON real objects created in Flash - no MovieClips) that undertake different HTML pages. Everything works perfect (rollover States, links, etc.), but I can't understand how to write code AS3.0 to create a State "button disabled? I've seen a few code snippets that talk about this, if you use MovieClips, but how can I do a 'Button' disable after clicking on?

I guess I would need a variable that would capture and store the last button clicked?

Any help would be greatly appreciated that I keep coming to this same issue.

Here is my current code that makes the buttons work:

var mainButtons:Array = new Array(mainBtn0,mainBtn1,mainBtn2,mainBtn3,mainBtn4,mainBtn5,mainBtn6);

var mainButtonsURLs:Array = new Array ("http://www.thekentcompanies.com/Pages/index.html","http://www.thekentcompanies.com/Pages/WhatsNew.html","http://www.thekentcompanies.com/Pages/Facebook.html","http://www.thekentcompanies.com/Pages/Golf.html","http://www.thekentcompanies.com/Pages/Motorsports.html","https://thekentcompanies.tms.hrdepartment.com/cgi-bin/a/searchjobs_quick.cgi","http://www.thekentcompanies.com/Pages/Register.html" ");

function loadMainPageToFrame(event:MouseEvent):void {}

var count: Number = mainButtons.length;

var: index number;

for (var i: Number = 0; i < count; i ++) {}

{ if (event.target.name == {mainButtons [i] .name)}

var myURL:URLRequest = new URLRequest (mainButtonsURLs [i]);

navigateToURL (myURL, "_self");

}

}

}

for (var i: Number = 0; i < mainButtons.length; i ++) {}

mainButtons [i] .addEventListener (MouseEvent.CLICK, loadMainPageToFrame);

.mouseChildren mainButtons [i] = false;

}

This is a link to a source file, so at most, you will see a window asking what you want to do with it.  You may need to right click to get an option to save the target file.

Tags: Adobe Animate

Similar Questions

  • How to add additional buttons, the fields in the query Panel

    I have a layout where I need to search for employees working under a Manager

    I have a search criteria where I can choose coach in a menu drop-down so that the data of employees under him appears


    Now I need to add a field more in search as assign to the manager who is a drop down

    And I need add two buttons Reassign, Deassign the search criteria


    So that when I select my manager current employees under him if poster and when I select the value of the entitlement and Manager dropdown in search criteria and click on the button to re-allocate employees are they assigned to this new manager... If I click on delete the key assignment those employees will get current Manager deassigned

    And also once the results displayed in table I have to have a checkbox for each record where I can select the checkbox and reassign or deassing only employees


    How to add additional buttons, fields for the Commission to request... I slipped and dropped my display criteria in the query with table Panel

    Hello

    a query Panel is for query and do not update documents. You can add buttons to the toolbar facet

    See: http://download.oracle.com/docs/cd/E21764_01/apirefs.1111/e12419/tagdoc/af_query.html

    but not the query itself on the ground

    Frank

  • Button skin: how to add the button properties (more, low, high)

    Hi all

    I made a custom button 'skin' because I want my buttons to be images with NO box or border around it and it works well, but I don't know how to add the functionality of the button. ex. In "over" State buttons tend to turn on, and 'down' State they tend to become darker. Anyone know how to apply it to an image? Here is my code. Thank you guys!

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:fx s:SparkSkin ' http://ns.Adobe.com/MXML/2009 "
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx" width = "64" height = "64" >

    < fx:Metadata >
    [HostComponent ("spark.components.Button")]
    < / fx:Metadata >

    < s: states >
    < name s: State = "over" / >
    < name s: State = "low" / >
    < name s: State = "mounted" / >
    < name s: State = "disabled" / >
    < / s: states >

    (< mx:Image source="@Embed(source='assets/images/lightbulb.png')" / > "
    < / s:SparkSkin >

    You can try something like this:

    
    http://ns.adobe.com/mxml/2009"
                 xmlns:s="library://ns.adobe.com/flex/spark"
                 xmlns:mx="library://ns.adobe.com/flex/mx"
                 width="64" height="64">
    
        
            [HostComponent("spark.components.Button")]
         
    
        
            
            
            
            
            
    
        
    
    
    

    Peter

  • Currently can not find out how to add radio buttons to this javascript to make it work on them also.

    I am trying to add radio buttons to the if statement so that they are highlighted when not clicked aswell

    Thank you very much

    var emptyFields = [];

    var completedFields = [];

    for (var i = 0; i < this.numFields; i ++) {}

    var f = this.getField (this.getNthFieldName (i));

    v var = this.getField (this.getNthFieldName (i));

    If (f.type! = "button" & & f.required ") {}

    f.strokeColor = color.black;

    f.fillColor = color.white;

    If ((f.type=="text" & & f.value== "") |) (f.type == "checkbox" & & f.value == "Off"). (v.Value=="")) {

    emptyFields.push (f.name);

    f.strokeColor = color.red;

    f.fillColor = color.white;

    }

    }

    }

    If (emptyFields.length > 0) {}

    App.Alert ("error! You must fill in all the mandatory fields (highlighted in red)");

    }

    Try the following. I removed some superfluous things and formatted for readability.

    var emptyFields = [];

    for (var i = 0; i)< numfields;="" i++)="">

    var f = getField (getNthFieldName (i));

    If (f.type! = "button" & f.required) {}

    f.strokeColor = color.black;

    If)

    (f.type == 'text' & f.valueAsString == "")

    || (f.type == "checkbox" & f.valueAsString == 'Off')

    || (f.type == "radiobutton" & f.valueAsString == 'Off')

    || (f.type == "combobox" && f.valueAsString == "")) {

    emptyFields.push (f.name);

    f.strokeColor = color.red;

    }

    }

    }

    If (emptyFields.length > 0) {}

    App.Alert ("error! You must fill in all the mandatory fields (highlighted in red)");

    }

  • How to add a button that is * in * the region of the graph.

    Hello

    I am on 4.2.4 and just try to add a button. I tried a region and a button among the elements of the region. It is on a line by itself above (button region) or up or down, but still it's own line.

    I'm trying to make it look better by placing it just below the legend or the right of the legend. Basically a lot tighter than it is currently.

    In an effort to try to see where the model would put the buttons and optionally customize, I went looking for the model. I don't see the pattern of region of graph... Why does. But this is only a secondary issue.

    My main thing is how can I get this button tighter looking like it belongs to the region?

    Thank you

    Tim

    I have NOT think that you can build in the graph area "since AnyChart built this region and the APEX is simply create a region so that it appears in..."

    Thank you

    Tony Miller
    Software LuvMuffin
    Ruckersville, WILL

  • How to add a button

    Hello

    Using of muse for the first time, I can't see any option or help video on how to add a simple button? I don't want just one button I can continue with a hyperlink, for example jumping to another facebook/twitter page

    Thank you

    Chris Anderson

    Watch here the video that explains how to create links and buttons on your website to Adobe Muse - http://tv.adobe.com/watch/creative-suite-podcast-designers/how-to-create-links-and-buttons - in-your-adobe-muse-website /.

    Or you can just use a rectangle to create a button, the style you want and link.

    Thank you

    Vinayak

  • How to add a BUTTON in the form of a report in report Page last column

    Hi friends,

    I created a form with Page report. Now, I want to ADD a button in the last column named Add in the last column of the Report.that would be a new column added to the report.

    How can I add a button to the form with Page report in the report and tell me how PK as ORDER_ID of a particular LINE with this button to add a reference ELEMENT.
    When I click on the button Add ELEMENT, then command to go to the next Page with ORDER_ID.


    How can I do that.


    Thank you

    Hello

    Modify your report and click the report attributes. On the right under 'Tasks' is "Add the link in the column" - click that. This creates a new column. Scroll down to the links section of this new column and add in the following:

    Link text: Add article
    Target: Page in the present application
    Page: (enter the number of the form page)
    Clear the Cache: (enter the number of the form page)
    Point 1 (name): (enter or select the name of the element of the form for the primary key page - for example, P2_ORDER_ID)
    Point 1 (value): (enter or select #ORDER_ID #-which should be the ORDER_ID column on the table for the report)

    Click on apply changes to save and run the report

    This creates a normal hyperlink in the column - each line will have a different value of ORDER_ID, so every link will be slightly different. If you want to make the link look like a button, you can do it with style if necessary

    Andy

  • How to add a button at bottom of image in Fireworks

    Hello!
    Recently, I created a clickable button with a substitution effect. I did iin FW CS5 as symbol and exported. So, I now have the .html file and 2 (my button States 2) image files. The button itself works fine on an online site. Now, I want to learn a technique to be able to put this button with the effect and the link in it on an image (it's like a button's background).

    Thanks in advance!

    Add the background image to your Fireworks document and export again.

  • How to add radio buttons to the form

    Hello

    I want to add option buttons to the form.

    I wrote the following code:

    Rbg RadioButtonGroup = new RadioButtonGroup();

    RadioButtonField r1 = new RadioButtonField ("first option button");

    RadioButtonField r2 = new RadioButtonField ("second radio button");

    RadioButtonField r3 = new RadioButtonField ("third option button");

    RBG. Add (R1);

    RBG. Add (R2);

    RBG. Add (R3);

    mainScreen. Add (RBG);

    When I run this, I get uncaughException.

    I am doing wrong?

    can someone help me please.

    Thank you

    Maury.

    On the screen, we can add that the fields. RadiButton group will hold all Radiobutton Fields.

     RadioButtonGroup rbg = new RadioButtonGroup();
            RadioButtonField r1 = new RadioButtonField("first radio button");
    
            RadioButtonField r2 = new RadioButtonField("second radio button");
    
            RadioButtonField r3 = new RadioButtonField("third radio button");
            rbg.add(r1);
            rbg.add(r2);
            rbg.add(r3);
            add(r1);
            add(r2);
            add(r3);
    
  • How to ADD Global buttons (home and Logout) to custom OAF page

    Hello

    I created the personal responsibility. Custom and Custome menu menu home page and attached 4 menu html in the menu of the home page.

    Now my requirement is in the pages of the home and logout links do not come I want to add the.

    Please suggest me to achieve this.

    Thank you and best regards,

    Sangu

    Oracle has created the standard menu for similar global buttons (home, Logout, preferences etc.) titled

    ICX_STANDARD_GLOBAL_MENU to add these buttons simply add to your menu that contains your page this menu.

  • How to add the button print on Webhelp in Robohelp 10?

    Can someone please provide instructions to add the button print on Webhelp. I am currently using Robohelp 10. I've seen some suggestions using javascript in the skin, but there isn't a step by step procedure.

    I've been seraching for it for several days. It would be a great help for me. Thank you!

    See point 3 to http://www.grainge.org/pages/snippets/snippets.htm#webhelp

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • How to add a button with Javascript library

    Hello

    I am using Captivate 5.5 to create a template.

    In the files that will be created by using this template, we will add a button that executes a Javascript script. Now my question is, given that this button will be used across multiple slides in the file, I can add this button (with the Javascript code) to the library? We currently create manually everytime.

    We do not have a programmer on our team, so that we cannot create the widget. Is there another way?

    Thanks for your help.

    Anthony

    Why do you need to remove the slide?

    I have a white blank slide at the beginning of all my modules of Captivate. There are some issues that appear to be avoided if the first slide has nothing about it.  You don't have to do this very long slide.  Usually mine are just a second, in the long term.

  • Proposals feature: possibility to add the button to enable/disable JavaScript and Flash easily? The lack of horizontal navigation.

    It is very useful and safe to disable JavaScript and Flash is not needed. But sometimes they must be used.

    It's too frustrating toggle JS menu, and No-Script add-on is not very practical. It would be better if it had the button toggle to enable or disable JavaScript. Also necessary for Flash. You could implement this simple feature for the next update.

    Also: Ealier, it was possible to navigate horizontally rss-buttons and tabs of arrows. Later, this feature has been removed. Could get it back you.

    This module includes a button to toggle JavaScript market / stop.

    https://addons.Mozilla.org/en-us/Firefox/addon/QuickJava/

  • How to add a button Submit in a model without type to freshen up

    Hi Experts,

    I'm trying to understand how we can run a simple JSP that takes user input and presents the results under WebCenter Sites. I wrote a simple Web service client application that shows the rate of currency conversion at the entrance and to the currency. It works as a normal application. I tried to accomplish the same sites WebCenter. I made the following...

    (1) I've copied the jar < InstallDir > /App_Server\apache-tomcat-6.0.32\webapps\cs\WEB-INF\lib directory.

    (2) created a template (TestNormal02.jsp) type without using eclipse.

    3) has replaced the eclipse code created in the JSP with the tested JDev JSP code.

    (4) change the action of the form in two attempts

    < do action = "TestNormal02.jsp" method = "POST" > "

    " < form action =" http://localhost: 8080/cs/Satellite? pagename = avisports/TestNormal02 "method ="POST"> "

    (5) synchronized with Sites

    6) go to the page with http://localhost: 8080/cs/Satellite? pagename = avisports/TestNormal02

    (7) page renders with text input boxes and submit button.

    (8) when I get home the of and of the money and kick-off, it takes me to the login admin sites page.

    (9) I checked the log file and it shows me an error message...

    Can you please help me solve this problem? I really appreciate your help.

    Thank you and best regards,

    Srini Mel

    [2013-06-24 14:42:31, 113 UTC] [INFO] [http-8080-31] [logging.cs.cache.page] force short term time on pagename = avisports/TestNormal02 & rendermode = Live & site = avisports & ft_ss = true. The page has a length zero.

    [2013-06-24 14:42:31,114 UTC] [ERROR] [http-8080-31] [logging.cs.cache.page] Unable to add page pagename=avisports/TestNormal02&rendermode=live&site=avisports&ft_ss=true to cache
    [2013-06-24 14:42:39,294 UTC] [ERROR] [http-8080-31] [logging.cs.auth.request] Bad Request: Invalid Request
    [2013-06-24 14:43:14,857 UTC] [INFO ] [http-8080-37] [logging.cs.cache.page] Forcing short expire time on pagename=avisports/TestNormal02&rendermode=live&site=avisports&ft_ss=true. The page had zero length.
    [2013-06-24 14:43:14,858 UTC] [ERROR] [http-8080-37] [logging.cs.cache.page] Unable to add page pagename=avisports/TestNormal02&rendermode=live&site=avisports&ft_ss=true to cache
    [2013-06-24 14:43:21,885 UTC] [ERROR] [http-8080-37] [logging.cs.auth.request] Bad Request: Invalid Request
    [2013-06-24 14:43:41,759 UTC] [INFO ] [http-8080-42] [logging.cs.cache.page] Forcing short expire time on pagename=avisports/TestNormal02&rendermode=live&site=avisports&ft_ss=true. The page had zero length.
    [2013-06-24 14:43:41,760 UTC] [ERROR] [http-8080-42] [logging.cs.cache.page] Unable to add page pagename=avisports/TestNormal02&rendermode=live&site=avisports&ft_ss=true to cache
    [2013-06-24 14:43:47,478 UTC] [ERROR] [http-8080-32] [logging.cs.auth.request] Bad Request: Invalid Request

    I am able to find an answer after a few hours of fighting. Here's the working version of the .

       
                   
                        
                        
                        
       

    I had to use a different JSP to display the results. Second JSP reads as parameters to the query as follows...

    You can see the parameters in the URL as pagename = avisports % 2FTestNormal02 & toCountryId = USD & fromCountryId = EUR & Submit = Submit and we can access it as follows:

    toCountryId =
    fromCountryId =

    I hope this helps others...

    Srini

  • APEX - how to add a button to a page to run an oracle procedure

    I built a page of database with a display in a table on a database. The query table uses the user id to filter records. everything works very well.
    How can I add an independent button to the page that runs an oracle procedure when clicked.

    Create a button on your page to send the page. Now create a page process as follows:

    BEGIN
       your_proc_name;
    END;
    

    Make this process depends on what button and select above created button.

    Published by: Zahid Khan on May 26, 2011 15:32

Maybe you are looking for

  • iTunes game

    I had a problem several weeks that my iPhone 4S lost connection when I was near the border of the United States. When I rebooted, it all my iTune game tunes have disappeared. Titles appeared, but were grayed out and my playlists, which are many, were

  • EliteBook 8470w: 8470w WIN 10 elitebook

    Hi, I think in upgarding and wanted to check the compatibility of the elitebook 8470w with win10? Problems with the hardware compatibility? In particular, intend to set up a HP 120W docking station, so I wanted to make sure that it will work with Win

  • sbRIO synchronism IO and screws

    Hello I am a program on a coding sbRIO. It is a program I wrote for a cRIO and now I put it on a sbRIO. The 'problem' is that there is no support scanning for the sbRIO engine, so I use FPGA to access the IO. So I was access the e/s using the open FP

  • Cannot open any exe files or lnk files. No picture on the desktop icon. Can't open downloaded files to fix the problem

    downloaded the movie file viewer and now cannot do anything but go online. can not download. can't do a system restore. Cannot open any programs. Help

  • Gadget Windows Calendar

    On my sidebar, the calendar displays in white. Deleted and added multiple times.  The clock is ok, as it's time.