Need to disable the button until all the elements of the array was posted

Hello

I get a lot of help from this Forum, thought about getting more out of it. I am very new to AS3 and to do my best to get as much as I can that are still a few problems to come through.

I am trying to disable the button on a specific image until all the Clips of film in a table are bieng is displayed, otherwise it should show another clip from movie plurarite the message that all video Clips are not displayed.

Here's the scenario-

SUMMARY.

There are three buttons on the stage, the next image button, button to load the 1st Movie Clip (note1), button to load the second film Clip (note2)

I'm counting the Clips of film with the length of the array (I don't know if I'm doing things), but the idea is that once all the video clips are loaded, next picture button must be activated in the case otherwise he must remain inactive, rather would display another clip of film as notice that all Clips are not loaded)

Here is my Code.

import flash.events.MouseEvent;

btnnxt.mouseEnabled = false;

var note1:Mc_Notice1 = new Mc_Notice1;

var note2:Mc_Notice2 = new Mc_Notice2;

function next(Event:MouseEvent):void

{

if(Count.Length == 2)

{

btnnxt.mouseEnabled = true;

nextFrame();

trace ("mouse is on");

}

else {}

btnnxt.mouseEnabled = false;

}

}

notes of the var: Array = [note1, note 2, note3];

var numbers: Array = new Array();

btnnxt.addEventListener (MouseEvent.CLICK, next);

btnload1.addEventListener (MouseEvent.CLICK, hearings1);

btnload2.addEventListener (MouseEvent.CLICK, load2);

function load1(Event:MouseEvent):void

{

addChild (notes [0]);

Notes [0] .x = 100;

Notes [0] there = 100;

Count.push (1);

trace ('Count' + count.length);

}

function load2(Event:MouseEvent):void {}

addChild (notes [1]);

Notes [0] .x = 100;

Notes [0] there = 100;

Count.push (1);

trace (counting);

count0 = 1;

trace (count.length);

}

Please help in fixing this error that I do not receive the required results.

Help, please.

Best regards

Part of the problem is that you try to count by clicking a disabled button to activate this button.  As long as the button is disabled you can not use it for himself.  Instead of adding an event listener to btnnxt immediately, just assign it when it is ready to be used.  Whenever you load you need to check the value of the counter and if it is equal to 2, then you can assign the event listener for the btnnxt.

You do not have a (County) table for that since you're using only its length property... a simple integer value will suffice.

As I do not see you create a variable named note3, you probably get an error for this.

In your function load2 you always aim the remark 1 placement where it should be placed.

Tags: Adobe Animate

Similar Questions

  • Disable a button until all the buttons clicked

    Hello

    I have a menu of 7 buttons on a slide that launch the .xml files from 'Success show script' and show the checkmark. I've got this works well, but I want the button 7, certificate, remain disabled until all 6 user buttons were clicked in order any.

    I wrote various advanced conditional actions, and I can't do things.

    I created 6 variables called topic1, topic2, topic3, etc., defaults to 0.

    The cert of the Action set to move to the slide but I was testing just the IF statement, it does not jump to slide either haha.

    What I'm doing wrong!

    Thanks for advance-METZ

    cap1.pngcap2.pngcap3.png

    Yes, I explained that the first decision should look like in my previous answer.

    First decision "always."

    IF 1 is equal to 1

    Assign Topic1 with 1

    Show... or open a URL of what you wanted to do with the standard action

    Second decision ' CheckComplete

    IF Topic1 is equal to 1 AND

    Topic2 is equal to 1 AND

    ...

    7 turn on the you will need to disable start with, since you say that you do not leave the slide, this can be done with the action on enter

  • Disabled NAV buttons until all clicked - Cap5

    How to accomplish this navigation to heading5? "While clicking on each seven images revealed definition text in the center of the screen. Navigation buttons are disabled until all the images are clicked. »

    Ok.  You me ashamed inside...

    I mocked an example using three images with descriptive text captions.  (Three should be enough to show how it's done.)

    http://www.Infosemantics.com.au/assets/testpit/Adobe/ToggleTextCaptionsWithClicks/ToggleTe xtCaptionsWithClicks.htm

    You can download the CPTX file for this example here:

    http://www.Infosemantics.com.au/assets/testpit/Adobe/ToggleTextCaptionsWithClicks/ToggleTe xtCaptionsWithClicks.cptx

  • I need to disable the 'Help' option in the main menu.

    I am running Public Fox 1.09 as an addition in our school district, because it allows me to keep the students from our proxy. They discovered that all that they have to go to 'Help' and 'restart with disabled modules. They can then select "Not of Proxy" and get anywhere that they want. I need to disable the 'Help' option in the main menu.

    Hello NeonLeon, if it would be possible in principle to hide some menu entries, the next thing that your students will discover is that you can also get in safe mode by pressing the SHIFT key while launching firefox, so it's no solution...

    You can use a mozilla.cfg file in the firefox program folder (where the students hopefully will have no write access) to lock some preferences as the configuration of your proxy, for more information, see: http://kb.mozillazine.org/Locking_preferences

  • Need to disable the service manager for down load adobe

    Need to disable the Service Manager for down load adobe

    Original title: program compatibility Application Applications App Apps GaGames Legacy Crash crashes hang hangs
    Moved from feedback
    Internet Explorer version unspecified - unspecified BONES

    Hello

    What Adobe program you are trying to download?

    Flash Player
    http://helpx.Adobe.com/Flash-Player/KB/installation-problems-Flash-Player-Windows.html

    Adobe Reader
    http://helpx.Adobe.com/Acrobat/KB/quick-fix-install-download-reader.html

    Don

  • How to disable the automatic updates?  I tried asking chat support and I was told that it was impossible.  I need to disable the updates because my school disables updates on the first day of class, and if my updates at home I will not be able to work bet

    I tried asking chat support and I was told that it was impossible.  I need to disable the updates because my school disables updates on the first day of class, and if my updates at home I will be not able to do work between school and home

    You can install older versions if you use an older version.  but the newer versions (for example, cc 2015) can always post files to open in cc.

    If you want to save a file for cs6 install cs6 at home.

  • Hide the button until all Conditions are met?

    Please help!  I am creating a forklift safety training module. There are 12 buttons on the first slide (see screenshot 1); However, only 11 are visible at the beginning of the slide.  The 12th button is a "continue" button that appears only after all the content slides (slides 2-12) were considered by the learner.  I used a conditional action to hide the button (something I learned from @Lilybiri) until all the conditions are met.


    The problem:

    The "Continue" button does not always appear once the content slides have been read.  I found I can do appear to ebb in each slide content, show the slides a few seconds more before returning to the main slide- which seems certain conditions which tells Captivate to display the button "continue".  Of course, I don't want the learners to face to the challenge of trying to understand why they cannot continue. I just want to visit the pages relating to each key to all conditions met.


    Screenshot 1: the initial screen (actions related to the change of color of button below)

    forklift_screenshot1.jpg


    Screenshot 2: chronology of the page main interaction

    forklift_screenshot2.png


    Screenshot 3: conditional Action to display the button CONTINUE (created as a decision 2nd out of action of 'Transport').

    My expectation was that OnEnter, slide would be recognized as read and count for the condition that all 11 pages of content would be considered before that appear the continue"" button.  I set the time to s 3.0 (see screenshot above) on all content slides.  No transition, no effect.

    forklift_screenshot3.png


    Screenshot 4: each slide content is returned to the slide main interactivity by an OnSuccess: jump to the command of the slide.  Nothing special here.  I tried to reduce all the content slides to 1.5 s nothing works.

    forklift_screenshot4.png


    Screenshot 5: an example of the page interaction BEFORE all the content slides were read and before 'CONTINUE' button appears (ignore the footer buttons; it was just me to experiment with styles of button).

    forklift_screenshot5.png


    That's a lot, I know.  I wanted to cover the entire base.  I would appreciate your thoughts and your expertise.  Thank you in advance!


    Michael

    How about what is probably very close to what you have already made... (After double checking all of your shares advanced for bugs)

    Each main menu button sets the variable 'consulted' 1, hides the active button, show visited button, then jump to the content. Alternatively, you can put the action on the close button for each slide as you did.

    Then in your main menu, you will have the conditional action on enter that verifies that each variable 'seen' is 1. If it is true, then it will show your button continue.

    I use this method with almost all of the modules that are non-linear. I use it to display a button quiz start, tab summary etc...

    To check your programming that I'm down in a text caption that has all the variables, you will have to look and make sure that they change to 1 as it should. As soon as something does not change probably you have found your problem. Also make sure that none of your actions changed to continue if you have accidentally deleted an object or something similar.

    Also BTW: If you want to increment a variable, you use the action "expression" rather than "assignment." If you keep just assign 1 to a variable, all that you will ever get is 1. example: If the variable = 7 and you assign 1 then now variable = 1.  If you use the variable expression variable = + 1 then you will be able to increment. Also be careful if a user visits an article more than once because it increments the new variable unless you have a control to see if the content has been seen before, and then past increment. Otherwise they could visit the same section 11 times and then have the button continue become visible.

  • Need to disable the Options > CHM Internet Options

    I see how to disable the Options button, but I don't want to do that. I just need to turn off the Internet Options menu item. Can someone tell me how to do this?

    This is required by many of our customers. Thank you.

    Hello

    All I can say is that if it is an absolute requirement, CHM is not your thing. This option is simply a part of the CHM Viewer application that Microsoft is in control of. No way to change this to my knowledge,

    See you soon... Rick

  • What should I do if I need to disable the block add but I need it desperately for Youtube?

    I got a warning on my Tumblr, saying I have to disable an extension for all of the Add-ons on Xensemble to work properly. The problem is that I really want to disable the block add that it is so helpful and I really need. Is there another way to get xensemble to work, but with block adds still in use?

    You can create a filter to not enable Adblock Plus on tumblr, which should avoid this.

    You also need to update Firefox 37.0.1, the version you are using is very ancient.

  • You will need to disable the first 10 items?

    I have a new laptop and downloaded my first items 10 and Photoshop. However, I got a message when I opened the first telling me that I needed to disable it on another computer. But I can't figure out how to turn off!

    In addition, I don't know if it's connected with my need to turn off or if it's just the computer, but I can't use one of the links in the menu to create on the old laptop, and I can't connect to my Adobe ID on either.

    Can someone help me?

    PS: If it's important, all of my new laptop runs on Windows 8 and the old man is 7.

    TsukiNaito1

    Adobe permits you to use your first items purchased 10 on only 2 of your computers serial number. If you want to put this on a 3rd computer serial number you will need to 'Disable' installation on PC 1 or 2 to get this serial number of first Elements 10 purchased on computer 3.

    The message you get on computer 3, you are saying that your first 10 items is on more than 2 of your computers already (computer 1 and 2) and you want to install it on another (the 3rd computer).

    So, where you have first Elements 10 installed?

    Go to one of these first Elements 10 computer configurations. Open first items 10 to its workspace. Go to help Menu/disable and click on disable for this. Close to there. At this point, you can

    a. leave the program installed but disabled on computer 1 or 2 as the case

    or

    b. Uninstall computer 1 or 2 as the case mya.

    Please see the newsletter and let us know if the above is clear and works for you.

    Thank you.

    RTA

  • I need to disable the slide show feature in Windows Live Mail 2011

    I asked the question back here December 7:

    I have a list of disks that I send that contains some pictures. Is there a way to disable the slide show feature is not there when I send this list. Also - for some reason, it is much more difficult to add to my list because I went from Windows Outlook to Windows Live Mail 2011. No idea why it is difficult to make additions to my list?  Thanks - Bob
     
    It was the response I received from Michael Santovec:
     
    (1) turn off picture messaging
    WLM 2011: ALT + F, Options, mail, compose - uncheck: message to convert to e-mail photo when you add photos

    While composing
    WLM 2011: Insert (ALT + I), simple Photo or attach file

    There is a solution to avoid the send from Windows Explorer forcing picture messaging in WLM 2011 despite the program settings.

    When you select to send, accompanied of a record no graphic images.  This could be just a file dummy.txt which is located in the same folder.

    You will always have the ability to resize the images, but they find themselves attached instead of a mail of the photo.  You can then right click on the file dummy.txt and remove it from the message before sending it.

    An another workaround if you are connected with a Live ID account in WLM is right click on the album in the message composition window, then left click on the tab tools of Photo Album that highlights in the Ribbon, and then the trombone to convert attachments.

    Now, I'm not much more than a 'computer' man so maybe I did something wrong but the instructions above do not work. And now things have become even worse:

    -now, I try to download my list several times before it actually works. Most of the time part of the page or the whole page becomes completely black.

    -the few times that I can send my page and send him off to someone it takes about 5 to 6 minutes to go from my Outbox sent items.

    I really need to turn off the slide show feature in my windows Live Mail 2011, otherwise I'll have fet another e-mail provider that is not something I want to do. I really don't like the new look of WLM 2011, but this problem with the slideshow feature drives me crazy. Any help here will be greatly appreciated - Bob

    P.S. I thought to return to Outlook from Windows, but since I am on Windows 7 is apparently not an option.

    Hi BobArthur,

    When you use Windows live mail and the question you have posted is related to Windows Live, so it would be better suited in the Windows Live community. Please visit the link below to find a community that will provide the best support.

    Windows Live Mail Forum

    http://www.windowslivehelp.com/forums.aspx?ProductID=15

  • Need to disable the webcam on dv8t = 1000 to install USB CCD

    I have problems attaching my CCD of telescope USB on my dv8t-1000 (Win7) with webcam.  How can I disable the webcam as well as program theCCD (AMCap) won't activate my webcam?

    Open Device Manager, expand "Imaging devices", right click on the webcam and select Disable.

    To open Device Manager, go to the control panel (see icon) > Device Manager

  • Need to disable the serial number CS3 - no access to the old installation

    I have a license for CS3 I need to re - install, but I can not turn off an old instillation. The new installation said "too many activations" when I use this serial number. Any ideas?

    Contact Adobe technical support via chat and ask them to reset your activations.

    Chat support - the link below click the still need help? the option in the blue box below and choose the option to chat...
    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat
    http://helpx.Adobe.com/x-productkb/global/Service1.html ( http://adobe.ly/1aYjbSC )

  • I need to disable a button after it has been clicked and gave birth to a model

    I have little experience writing java script, but I'm sure I need to use java script to disable a page button Add after it has been clicked and spawned assigned model. The java script that I use to build the model is as follows.

    var expTplt = getTemplate ("tpltReport");

    expTplt.spawn(2,true,false);

    This script works very well, and I have created several identical models with different names so that a specific model is launched when you click on the page button to add on a specific page in the pdf file. This is to prevent the information entered on one page are repeated on all subsequent pages that are added to the pdf. I have rename the fields on each model to achieve this.

    Given that each model has its own page button to add, with the exception of the final model, if a user clicks several times since the same page it will generate multiple identical pages and the information repeat error will occur.

    No simple solution?

    Add the following at the end of your script until the button is the one that runs the script. A read-only setting button makes this option disabled. The event was the trigger, the target is the object that raised the event... in your case, the button, regardless of the number of times he gets renamed due to the Rogue process.

    Event.Target.ReadOnly = true;

    J-

  • You will need to disable the blocking of "this connection is untrusted.

    I don't know what happened, but lately, Firefox has become unusable. I can't even Google maps to work, and it's simply because of the following warning:

    =

    This connection is Untrusted

    You asked Firefox to connect safely to maps.google.com, but we cannot confirm that your connection is secure.

    Normally, when you try to connect safely, sites will present a reliable identification to prove that you're in the right place. However, the identity of this site cannot be verified.
    What should I do?

    If you normally connect to this site without problems, this error can mean that someone is trying to impersonate the identity of the site, and you should not continue.

    If you understand what is happening, you can tell Firefox to start to trust this site identification. Even if you trust the site, this error may mean that someone is tampering with your connection.

    Add no exceptions unless you know there is a good reason why this site uses no identification of confidence.

    =

    Not reliable? REALLY? Maps.Google.com is not approved! Oh, and support.mozilla.org is ALSO not reliable? I use Chrome for this post because in the case of support.mozilla.org, there is no option that allows me to the site.

    Virtually all the sites that I have this problem and Firefox is now all but unusable for me. And I'm on a company computer, is not as if I had a lot of options here. And this isn't our business network, because only a few of us have this problem.

    How can I work again and disable this 'feature' of Firefox?

    Thank you

    Unfortunately, fiddler2 certificates issuer may be a sign of unwanted software on your pc that is to intercept the secure network traffic. go to the system control panel and uninstall programs such as BrowserSafeguard, BrowserSafe, backup or other software that seems suspicious and did not get intentionally installed by you.

    Reference: https://support.mozilla.org/en-US/questions/982532#answer-520145

    afterwards, run a full scan of your system with security tools like the free version of malwarebytes & adwcleaner.

    Fix Firefox problems caused by malicious software

Maybe you are looking for