Make something happen after 4 MCs Play

Hi,
I need to have 4 buttons that play 4 different MCs. I want a 5th MC to play after all 4 MCs have been played. Any ideas on how to do this in AS2?
Thanks.
Dan

var n:Number = 0;
var btnNum:Number = 4;
// assign each button a property (eg, ivar) that's = 1 for your first button, 2 for your 2nd etc.
// each buttons mouse handler should call the function below and pass that property value
function buttonF(i:Number):Void{
    n = Math.max(n,n ^ (1 << i));
    if(n==Math.pow(2,btnNum+1)-2){
   // do whatever.  all buttons responded.

Similar Messages

  • How do I make something happen only once on a true condition in a loop

    So I have a way of doing this, but it uses a dreaded local variable, and seems to me that it might be unreliable.
    What I want to happen is to have something happen only once on a condition that will remain true. What I need is to set something after a given amount of time, but I only want to set it once after that time has been reached. Problem is, if I use a range, it could be true more than once, if I use a greater than, it'll be true every time after the set time, and if I use an equal, there's no way to know that the particular millisecond value will even appear in the loop.
    Maybe I'm wrong in even using those comparison functions... Any ideas would be greatly appreciated. See the attached vi for a better look at what I'm trying to do... (v7.0)
    Thanks,
    Geoff
    Attachments:
    Question.vi ‏16 KB

    The "Idle" state that the help file refers to is the "non-running"
    state. The Top Level VI must end execution before any "First Time" VIs will
    return TRUE after being called initially.
    Therefore, if your application calls a subVI at the beginning of the
    Test portion, on the next iteration of the loop it will return FALSE
    from that subVI, since your main VI never stopped running, and received
    a TRUE from the "First Time" on the initial test loop.
    If you have code that you want to execute only on the first run of your
    entire program, "First Time" should work fine. If you have code that
    you only want to execute on the first iteration of just the Test loop,
    the "First Time" VI is not ideal.
    I think that shift registers are going to provide the best solution,
    however you mentioned that for your particular application that is not
    ideal. Could you describe a little bit more why shift registers are
    problematic?
    Thanks Geoff, let us know.
    DWeiland
    Applications Engineer
    National Instruments
    www.ni.com/support
    Dan Weiland

  • Making A Button to make something happen....?!

    Okay... Basically, what I'm trying to do is make it so that
    when the user clicks a little arrow, some more text is revealed....
    For example... the user might see..
    "Bid starts at 15:00 GMT >"
    Then the user can click the ">" and the following is
    shown..
    "Bid starts at 15:00 GMT (16:00 CET) <"
    As the moment I've got a white area that moves across to the
    right and uncovers the last bit of text - I'm pretty new to
    Flash... so any help is much appreciated!!
    Thanks!

    is your "white area" a movie clip?
    It's a button
    I would make it a Movie Clip, and on frame 1 put a stop();
    action, then on lets say frame 10, make it large as to reveal the
    text and put stop(); and showwwhiteleft._visible = true; , then on
    frame 20 make the white small again and add gotoAndStop(1);. Give
    it an instance name, lets say reveal_mc... have reveal_mc mask your
    text content.
    showwhiteright._visible = true;
    showwhiteright.onRelease = function(){
    reveal_mc.play();
    this._visible = false;
    then your other arrow to make it go away, name it
    showwhiteleft
    showwhiteleft.onRelease = function()
    this._visible = false;
    reveal_mc.play();
    This might seem confusing, so give me a minute, and I'll whip
    up an example FLA

  • How to make something happen when an object touches another

    In my game I'm making (actionscript 3.0), I need the game to gotoAndStop once a circle goes "out of bounds". Is there a syntax or something about on impact or something? Please help I'm a begginer.

    that's working, but the problem is I only want it to be triggered when it hits the outline, not the fill. The circle is within a maze. How do I make it so that if part of the circle goes outside the inside area it triggers a gotoAndStop command?

  • How do I call create a public function to make something happen in another .swf

    Hi guys,
    I am trying to create a public function, i have a decument class with all of my variables in it, I have worked out how to bring in external .swf files, now  I need a way to have an even trigger something on a separate .swf
    So at the moment I have a flunction that works on the parent
    stage.addEventListener(MouseEvent.MOUSE_MOVE, mousePosition);
    function mousePosition(event:MouseEvent) {
    if(mouseX>=125)
    navigator.visible=false;
    trace(mouseX);
    So now how do I make this function public?
    When I try to put it into my document class I get errors because the navigator MC is only on the main timeline. (not in the other swf's that I am opening)
    I am trying to work out how to call the function using a string in my doc class
    public var nav1:String="navigator";
    Then the function
    public function resetnav() 
                         String(nav1+".visible=false;");
    Which seemed like a good idea, but it doesn't work..
    Can you guys help me out here?
    Cheers
    sub

    Hey sorry I spoke too soon, I thought my code was working but my mouse tracking code is actually working off the main timeline.  I sill wan to be able to use your examples though, what is the go with psuedo code? SWF1ToSWF2Connection what is the correct dot syntax for this?
    Cheers
    sub

  • Dear APPLE. Something happened after the last update of OS 10.4.11. & MAIL.

    We (with a private domain & using gmail, yahoo..) can’t send post with [email protected] from MAIL anymore.
    While I can still do that from OS 10.3.x & MAIL v.1.x.x,
    MAIL 2.1.3 on Tiger has been nothing but trouble since about 9 of Marts for many of users.
    Please correct that as soon as possible.
    Thank you very much.

    BDAqua wrote:
    We're just other Users here, they do have a product Feedback page.
    I use these two, I only keep Mail around to try to help with all it's problems...
    Eudora, (can Import your Mail from Mail)...
    http://www.eudora.com/download/
    Thunderbird...
    http://www.mozilla.com/thunderbird/
    Hello. It’s very nice of you helping people. Well. Eudora was my first mail client, about 1994-5, then in many years Outlook Express. After getting an iDisk account few years ago, I have used MAIL successfully & without any problem since then. It is clearly something wrong with latest OS update. Didn’t know MAIL have a product Feedback page? Where can I find it??

  • Something happened after install security update 2008-006(PPC)

    Hi there,
    I have just installed the security update 2008-006(ppc) for my old powerbook, G4 1.5Mhz. Now every time when i go to network in the system preferences, i immediately got this message "Your network setting have been changed by another application" No matter how many "OK" i clicked, this message will kept appeared. I tried to restart my powerbook, but the powerbook responded that the system preferences have cancelled the restart. Can only force quit the system preferences. I can still connect to the network, just that if i go to any new places with new network setting, i will not be able to change the network setup in my powerbook.
    Before i install the upgrade patch, this never happened, so i am assuming it was because of the patch. Can anyone help me? thanks.

    This seems to work also...
    http://discussions.apple.com/thread.jspa?messageID=8164180&#8164180

  • My Ipod touch plays music but every time I open an app that I have downloaded it closes immediately.  This started happening after updating to the latest version of Ipod software.

    My Ipod touch plays music but every time I open an app that I have downloaded it closes immediately.  This started happening after updating to the latest version of Ipod software.

    Here's a couple things to try:
    1. Reset the iPod by holding the sleep/wake button and home button at the same time for 10-15 seconds until the Apple logo appears on the screen.
    2. Uninstall and reinstall one of your purchased apps. Sometimes this can rectify the issue.
    3. Connect the iPod to iTunes and restore it. New system software usually resolves the issue. Make sure you sync before restoring because a restore removes the data from your iPod.
    Hope one of these works for you!

  • When I call someone using FaceTime from my mac, they can see me but no hear me. Is there something I need to do to make this happen? I also have an iPad 2 and FaceTime works great on it if I call somebody. Why no sound from my mac FaceTime using a mac pro

    When I call someone using FaceTime from my mac, they can see me but not hear me. Is there something I need to do to make this happen? I also have an iPad 2 and FaceTime works great on it if I call somebody. Why no sound from my mac FaceTime using a mac pro and isight camera, mike combo.
    If I use google it works. If I use Ichat, it works. If I use skype it works.

    This sounds like something similar to https://discussions.apple.com/thread/3388112?start=105&tstart=0.
    Try turning down the speak volume (System Preferences->Sound->Output->Output Volume)  or the microphone gain (System Preferences->Sound->Input->Input Volume). Do this on both sides of the call.

  • I have an ipod nano 7th generation and can not get it recognised by my Windows 8.1 laptop (it appears briefly on My computer, then disappears). This happened after I updated iTunes to the latest version. Does that have something to do with it?

    I have an ipod nano 7th generation and can not get it recognised by my Windows 8.1 laptop (it appears briefly on My computer, then disappears). This happened after I updated iTunes to the latest version. Does that have something to do with it?

    Hello there, kiwilucea.
    The following Knowledge Base article offers up some in-depth steps for troubleshooting your issue:
    iPod not recognized in My Computer and in iTunes for Windows
    http://support.apple.com/kb/ts1369
    Keep in mind if you get to Step 12 Reinstall iTunes, those steps need to be followed exactly as outlined for the reinstall to be effective.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • I usually have my music on shuffle but since playing just one album it now will not shuffle all. Shuffle and shuffle all do exactly the same with no differences.  Seems to have happened after upgrade

    I usually play my music on Shuffle all, but having played just one of my albums it will not now shuffle all.  Shuffle and shuffle all do exactly the same thing - no change.  Seems to have happened after upgrade.  Please advise

    There's a good guide here on how to roll back to 10.7 https://discussions.apple.com/thread/4559563?tstart=0

  • Just got my new iPad Air and noticed that the screen calibration is off. For example if I select the circle to place something there I have to select outside of the circle to make it happen. I did not have this issue on my previous iPad.

    Just got my new iPad Air and noticed that the screen calibration is off. For example if I select the circle to place something there I have to select outside of the circle to make it happen. I did not have this issue on my previous iPad.

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased.
    If no fix, Take it to an Apple Store for evaluation.
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
     Cheers, Tom

  • TS1630 I can't get my music to play all of sudden. It happened after I paired the audio with my Maxima. I turned off bluetooth and it still would not play

    I can't get my music to play all of sudden. It happened after I paired the audio with my Maxima. I turned off bluetooth and it still would not play

    I tried the hard start and still the same! If I go under artist
    I can get it to start playing one song. Then if I try shuffle
    Nothing !! Then I can't get it to play anymore.
    Very annoying

  • Just bought a new hp laptop. Downloaded iTunes. Won't let me play any selections. Says "computer not authorized". What do I do to make it happen?

    Just bought a new hp laptop.  Downloaded iTunes. Won't let me play any of my selections. Reads "computer not authorized".  What do I do to make this happen?

    On your Computer... Open iTunes...
    and from the Menu Bar select Store...
    From the Store menu, choose Authorize This Computer.
    When prompted, enter your Apple ID and password, then click Authorize.
    See Here >  http://support.apple.com/kb/HT1420

  • HT4623 After being on holidays and plugging my iPhone into my computer something happened to my iPhone in seconds and I have no longer got my holiday photos on my iPhone. Where would they have gone and why?

    After plugging my iPhone into my computer something happened to my phone that took seconds and now I cannot find my photos of my holiday. Where could they be and what was this that happened to my phone. I was not asked to do anything and nothing was said after it happened, it looked like an upgrade or a download not sure something ran across the the screen and that was that. I had approx 600 photos please help me.

    1) ensure iTunes is authorized for your iTunes store account(s)
    2) connect your device and right-click or control-click it in the iTunes Source list, then choose transfer purchases from the shortcut menu that appears.
    3) sync the device
    iTunes will wipe the iPhone but, since you transferred your purchases in the previous step, your content will be in your library and you can re-populate the iPhone with it.
    above works for purchases from the iTunes store. for everything else, check out this post by Zevoneer.

Maybe you are looking for

  • Strange problem while clearing a customer

    Hi everybody I am encountering this strange problem while trying to clear some open items for certain customers. Though these customers have open items on them (checked in BSID and FBL5N), the system is giving a warning message saying that there are

  • Need script to read a list and compare it to the contents of a folder...

    I need a script that will read all of the file names within a tab delimited list and then compare them to the files within a directory (named IMAGES) and delete the files of this IMAGES folder that are not included in the list. Thanks in advance.

  • Select one record attempt

    I have a form in CF 8 that lists several records depending on the query results. Each time I hit the select button it goes to the action page (second.cfm) and all the records show even though I just selected for one record. Here is my form: <FORM ACT

  • Text reverts to Monaco

    Whenever I use Appleworks I select Verdana (or whatever) in preferences and choose it as default size 12, but next time I open AW or open a new page, it always is back on Monaco size 10! Please can someone help? Thanks.

  • 0CalQuarter after upgrade issue

    Hi buddy, Thanks for this valuable  Note 1019513 - Conversion exit for 0CALQUARTER is missing . i solved my problem on 0calquarter. but i got one more issue on this. In 3.1c after inputting 1/2007 and check it would didplay as Q1 2007 on selection sc