How to detect wheather the button is clicked or not and disable if you click

Guy

I have 4 button navigation and as the House, are we etc...  And I want to disable the House when there is click and cannot be clicked until the user click on the button another first. means if a visitor's home page then navigation host is disabled and all others are active, and when they click to aboutus button then the pages will to her we are page and the subject we touch is disabled and another get active. I want that this solution in AS3 with oop concept.

Thank you

Something like the following...

function buttonmode(link:MovieClip):void {}

link.buttonMode = true;

}

buttonMode (rec1_mc);

buttonMode (rec2_mc);

buttonMode (rec3_mc);

buttonMode (rec4_mc);

buttonMode (rec5_mc);

buttonMode (rec6_mc);

buttonMode (rec7_mc);

buttonMode (rec8_mc);

function enableButtons() {}

for (var i: uint = 1; i<9;>

["rec" + String (i) + "_mc"] .mouseEnabled = true;

}

}

function navigate1(e:MouseEvent):void {}

navigateToURL (new URLRequest ("http://www.ebpearls.com"), "_self");

enableButtons();

e.currentTarget.mouseEnabled = false;

may: MovieClip (e.currentTarget) .mouseEnabled = false;

}

function navigate2(e:MouseEvent):void {}

trace ("2 button is clicked");

enableButtons();

e.currentTarget.mouseEnabled = false;

may: MovieClip (e.currentTarget) .mouseEnabled = false;

}

function navigate3(e:MouseEvent):void {}

trace ("3 button is clicked");

enableButtons();

e.currentTarget.mouseEnabled = false;

may: MovieClip (e.currentTarget) .mouseEnabled = false;

}

function navigate4(e:MouseEvent):void {}

trace ("4 button is clicked");

etc...

}

function navigate5(e:MouseEvent):void {}

trace ("5 button is clicked");

}

function navigate6(e:MouseEvent):void {}

trace ("6 button is clicked");

}

function navigate7(e:MouseEvent):void {}

trace ("7 button is clicked");

}

function navigate8(e:MouseEvent):void {}

trace ("8 button is clicked");

}

rec1_mc.addEventListener (MouseEvent.Click, navigate1);

rec2_mc.addEventListener (MouseEvent.Click, Navigate2);

rec3_mc.addEventListener (MouseEvent.Click, navigate3);

rec4_mc.addEventListener (MouseEvent.Click, navigate4);

rec5_mc.addEventListener (MouseEvent.Click, navigate5);

rec6_mc.addEventListener (MouseEvent.Click, navigate6);

rec7_mc.addEventListener (MouseEvent.Click, navigate7);

rec8_mc.addEventListener (MouseEvent.Click, navigate8);

Tags: Adobe Animate

Similar Questions

  • How to detect if the NI GPIB drivers are not loaded

    Hello

    I use VS2008 c# to control an instrument based GPIB, using .NET

    The software should also work on a PC that does not have the GPIB drivers loaded in spectator mode.

    So, how can I detect this.

    I have NationalInstruments.NI4882 specified as a reference and I distribute this dll with my package.

    The software works fine on a PC that uses drivers loaded, but hangs on a PC without the NI GPIB software installed.

    Specification of a problem with NationalInstruments.common. I tried that copy on a target computer, but is always a mistake.

    All I have to do is detect if it is not there and then run in spectator mode.

    David

    Hi David,

    You should look for the existence of HKEY_LOCAL_MACHINE > SOFTWARE > National Instruments > NOR-488, 2.   If it is, this means that the drivers must be installed.

    Kind regards

    Thomas Clark

  • How can I get audio to not start when the button is clicked?

    I am new to adding audio to slides, buttons, click boxes.  Import the recorded voice on the overall slide of files sounds easy enough.  However, there are several buttons that display a legend I want audio to not start when the button is clicked.  I added audio just for this button, but it starts when the slide begins.

    How can I get audio to not start when the button is clicked?

    Hello

    Audio playback when the assigned object with the audio appears. That's why hear you when the button appears.

    Try to assign audio instead to the object that is displayed when you click the button. Perhaps the legend.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • Blue contours appeared and I can't control my iphone 5 s. I can't go to settings. I triple click on the button "home" and gives a message to go into settings and enter the password but I can't get to the settings. What does not work? Thank you

    Blue contours appeared and I can't control my iphone 5 s. I can't go to settings. I triple click on the button "home" and gives a message to go into settings and enter the password but I can't get to the settings. What does not work? Thank you

    The blue plan is switch control.

    s http://gettecla.com/blogs/News/15538916-what-is-switch-control-mode-in-apples-IO

    Triple click to get rid of him.

    "Siri to the rescue.  I said turn off the control switch. »

    Re: How to disable the switch control

    I don't get a request for an access code.  What is a school system?

    switch control

    Settings > general > accessibility > switching control

    R

  • In windows live quick view mail, how can I activate the button Delete

    Hello

    When I opened my windows live mail, I can see a quick view, which is great. There are more than 3,000 mail there that I don't need. When I click on the button Delete is in shadow. How can I activate the button Delete or is there a quick way to delete these messages at once. I'm working on Windows xp

    Hello

    The question you posted would be better suited to Windows Live Solution Center. I suggest you to send your application in the Windows Live Solution Center for better support.

    http://windowslivehelp.com/product.aspx?ProductID=15

  • Windows Vista - How can I move the buttons in the taskbar to the left side of the taskbar?

    Windows Vista - How can I move the buttons in the taskbar to the left side of the taskbar? Someone has used my computer and now they are on the right side you can see 2 programs at once. I want that they start on the left and run through the whole (not just two value windows) task bar so I can see all and switch between them by clicking on them.

    Right-click on the taskbar and unlock it. There will be low vertical bars between the sections of the taskbar. Place the cursor on one and drag it to the left. You have to play a little, but you will get it.
     
     
  • Configure button disabled on the playback device, manage audio devices. How can I reactivate the button Configure?

    Hi, following an automatic update of Windows Vista 64-bit I have no sound. Thank you for that.   I had a similar problem before, the sound quality has been reduced to a rate lower than 16 bit 44.1 k.  I've changed this before clicking on the button configure on the playback device, manage audio devices.  But now, this button is disabled and I can't check the set up or make changes.  I am logged in as an administrator user, how to re - activate the button set up?

    Thank you

    Darren

    Hello, I have stopped the Windows Audio Service and rebooted a couple of times.  Now I have his back.

    Thank you

  • How to turn off the tap to click the trackpad for Windows 8?

    I had windows 8 for some time and disabling tap-to-click is a priority for me, but I can't understand how do. This is not the same as windows 7 or vista. When I type, sometimes my hand hits the button on my laptop keyboard and it moves where I type and live. Need help please, I want to disable the stupid tap to click on feature because I use a USB mouse.

    Thank you, thank you, thank you! My laptop has just downloaded 8.1 without my permission and I got the touchpad by clicking. It drove me crazy. I've been everywhere where I didn't want to be. Right-click on the icon for the touchpad worked perfectly after nearly an hour doing it through the control panel!

  • How do I get the buttons working again?

    Running Captivate 6, I built a project with action buttons developed which opens a URL in a new window and continued on the next page. They all worked when I published in Flash 10. I published 11 Flash, they all stopped to open the new window. I went back to the publication of Flash 10 and they still do not work! How to bring back my buttons double action?

    Hello

    If you test by running a flash (SWF) file on a local drive (one drive letter C or D or I or another), you must add the location to the list of sites approved for the Flash Player.

    Click here to see a video of captivate that guides you through this process

    Once your content is served by a web server (where the address begins with http) is more a problem and adding location won't be necessary.

    See you soon... Rick

  • Detect if a button is clicked

    I'm trying to ensure that if you click on the 5 buttons on my frame homepage you will advance to another frame.  The problem I have is the buttons you click to take you away from the image of home page.  So let's say the home page is frame 1.  1-5 keys take you t images, 2-6, (as part of the main sequence).  I would like to be able to direct the user to page 7, once you click on the 5 buttons, but I'm out of problems with detection if the button has been clicked.  Here is my code with 'main' being the movieclip that everything else is inside.

    var clickCount:int = 0;

    var clipArray:Array = [main.btn1_mc, main.btn2_mc, main.btn3_mc, main.btn4_mc, main.btn5_mc];

    for (var i: int = 0; i < clipArray.length; i ++) {}

    clipArray [i] .buttonMode = true;

    clipArray [i] .addEventListener (MouseEvent.CLICK, clickHandler);

    clipArray [i] .isClicked = false;

    }

    function clickHandler(event:MouseEvent):void {}

    switch (event.currentTarget) {}

    case main.btn1_mc:

    trace ("btn1");

    break;

    case main.btn2_mc:

    trace ("btn2");

    break;

    case main.btn3_mc:

    trace ("btn3");

    break;

    case main.btn4_mc:

    trace ("btn4");

    break;

    case main.btn5_mc:

    trace ("btn5");

    break;

    }

    clickCount ++;

    trace (clickCount);

    if(Event.currentTarget.isClicked == false) {}

    event.currentTarget.isClicked = true;

    }

    if(clickCount == clipArray.Length) {}

    trace ("all the buttons were clicked");

    }

    }

    Stop();

    any help is appreciated as always.  Thank you

    Add the following line to the highest level of your fla:

    var clickOrigins:Array = [];

    function checkArray(_target:String,_arr:Array):Boolean {}

    {if (_arr. {(IndexOf (_target) ==-1)}

    _arr.push (_target);

    Returns true;

    }

    else {}

    trace ("you already clicked that");

    Returns false;

    }

    }

    and change to your clickHandler adding to

    event must have the same syntax as your ClickHandler argument, so if you wrote the clickHandler(evt:MouseEvent) function... event should be called evt

    If ((MovieClip (racine) .checkArray (MovieClip .clickOrigins (root), event. currentTarget.name)))

    {

    MovieClip (root) .clickcounter ++;

    }

    If (MovieClip (root) .getClicks ())

    {

    MovieClip (root).main.gotoAndStop (7);

    Empty table if you must use it again:

       // MovieClip (root). clickOrigins = [];

    }

    on the other

    {

    Put here the stuff you want to be run regularly

    }


  • Does anyone know how to turn off this setting when your phone is at a certain angle turns on without you pressing the button side feed or House? Please if you know tell me!

    Does anyone know how to turn off this setting when your phone is at a certain angle turns on without you pressing the button side feed or House? Please if you know tell me!

    Settings > display and brightness > raise to Wake

  • How can I move the button reload of the page in firefox OSX for next to the back button where it was before I updated.

    How can I move the button reload of the page in firefox OSX for next to the back button where it was before I updated.
    I know there is an addon for windows Classic theme, but I need a fix for osx... its very frustrating when you update and things like this change and can be customized to the way we are used to using the browser. his counter intuitive to have the page button refresh so far from the back and home buttons.

    never mind, I found the preferences in the addon manager... Thanks again!

  • How can I remove the button from menu? The custom option doesn't seem to work for this.

    How can I remove the button from menu? [This IChing looking for three line on the toolbar icon].

    The tool bar Customize option doesn't seem to work, and it seems a waste to have a button that duplicates the menus. I would trade on the NoScript icon.

    Hi, I can not recommend that you do, but if you are really determined, this article can help.

  • How do I ge the button 'Show remote content' in my incoming messages?

    How can I get the button 'Show remote content' in my incoming messages?

    Thank you.

    Tess

    Mailnews.message_display.disable_remote_image controls all remote content.
    I hope change permissions.default.image will make the button reappears.

    Note that the next version of Thunderbird should have a brand new remote content management system.

  • How to detect if the page is a reload or not?

    I have a form in the cfm page if the user submits the form, I don't want to go to another page. I want to reload the page and I'll capture all values and send the data in this way. However, I need to hide the form once the user submits the form. So, how I detect if the page is a reload (after is submitted) or it's the first time it is been charged?

    You can manage only two ways.  One, add a hidden field to the form that passes a value, then check if the value exists in the URL/FORM variables (if it exists, the page is reloaded by sending the form - if it does exist, it's the first load of the page).

    Perhaps a better approach would be to manage the form via an AJAX request is sent, and then hide the form if the AJAX request is successful.  This all is possible using JavaScript.  The advantage is that the user leaves the page never actually or it recharges.

Maybe you are looking for