I want to hide all layers other than one layer when I play swf at first.

Hello. I am using Adobe Flash CS6 and AC2.
Right now I am trying to hide all layers other than one layer. There are 3 layers on my fla file like this.
Layer A
Layer B
Layer C
I want to keep hiding  Layers B and C unless  I click a button that makes layer B and C visible.
Layer A has a movie clip symbol, and it contains animation movie where a man  is running.
And Layer B and C has a movie clip where people  are chasing the person who is running on Layer A.
I mean, if I load swf file at first, there is only one person who is running, and when I click a button two people appears on a stage and they start to chase the person who is running on layer A.
What kind of script should I use to make this setting? Please give me your advice.
Thank you in advance.

Here is a simplified version of the code, including the two lines needed to make them invisible at the start....
b_mc._visible = false;
c_mc._visible = false;
b_btn.onRelease = function():Void{
          b_mc._visible = !b_mc._visible;
c_btn.onRelease = function():Void{
         c_mc._visible = !c_mc._visible;
What that version of the coding does is simply tell the object to acquire the opposite ( ! ) value of the current _visible property.
Notice also that I have removed the "_root " references inm the code.  You should not make a habit of using it unnecessarily.  If the code is in the main timeline already (the _root), there is no need to target it, and doing so can lead to problems if you ever need to load this file into another.  If that code is not in the _root timeline then it is okay to use _root, though using "_parent " references can be safer for the same reason.
The way you had the code written is not wrong, but it was excessive in that you do not have to test the condition twice like you did, if it is not true then it has to be false.... 
if(c_mc._visible){ 
      c_mc._visible = false;
} else {
      c_mc._visible = true;

Similar Messages

  • Is there a way to delete all duplicates, other than one by one?  some free program or does itunes have one to just identify and delete all duplicates in the library?

    How do I delete duplicates in my library as a group, rather than one by one?

    Apple's official advice on duplicates is here... HT2905: How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls such as lost ratings and playlist membership.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background, this post for detailed instructions, and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed.)
    The most recent version of the script can tidy dead links as long as there is at least one live duplicate to merge stats and playlist membership to and should cope sensibly when the same file has been added via multiple paths.
    tt2

  • Hide all layers

    Hello,
    I generated layers hide event using listner.
    But I need to hide all layers at once. Is it possible without looping ?
    void playEventHide()
         PIActionDescriptor desc = NULL;
         error = sPSActionDescriptor->Make(&desc);
        PIActionList   mylist = NULL;
        error = sPSActionList->Make(&mylist);
        PIActionReference ref = NULL;
        error = sPSActionReference->Make(&ref);
        error = sPSActionReference->PutName(ref, classLayer, "mytest2");
        error = sPSActionReference->PutName(ref, classLayer, "Layer 1 copy 3");
        error = sPSActionList->PutReference(mylist, ref);
        error = sPSActionDescriptor->PutList(desc, keyNull, mylist);
         error = sPSActionControl->Play(&result, eventHide, desc, plugInDialogSilent);

    I do not follow your description and the link does not seem to work.
    Could you explain a bit more detailed what the Action is supposed to achieve?
    Still if you just want to hide all layers something like this might suffice:
    // 2010, use at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
      hideLayers(app.activeDocument);
    ////// function to hide all pixel-layers //////
    function hideLayers (theParent) {
    if (!allLayers) {var allLayers = new Array}
    else {};
    for (var m = theParent.layers.length - 1; m >= 0;m--) {
    var theLayer = theParent.layers[m];
    // apply the function to layersets;
        if (theLayer.typename == "ArtLayer") {
            theLayer.visible = false;
            allLayers.push(theLayer)
        else {
          allLayers = allLayers.concat(hideLayers(theLayer))
      return allLayers

  • HT1277 I have OS X 10.9.2 and have downloaded maverick. If I am sending an email message to one person, options for addresses  from my address book show up. However if I want to send it to more than one person, the address options for the others do not sh

    I have OS X 10.9.2. and have downloaded Maverick. If I am sending an email message to one person, options for addresses from my Address Book appear. However if I want to send it to more than one person, the potential addresses for the other persons do not show. Can you please help?

    Install ClamXav and run a scan with that. It should pick up any trojans.   
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • HT5858 how can I delete photos on my iPhone other than one at a time?

    Can someone help me to delete photos from my iPhone other than one at a time.
    Thanks

    http://osxdaily.com/2012/08/02/delete-all-photos-from-iphone/

  • Cannot sign into creative cloud; cannot use creative cloud to access XI, want to use XI on more than one computer

    Cannot sign into creative cloud from 2nd computer, if try to use activation code error message is "oops, already in use"; cannot use creative cloud to access XI, want to use XI on more than one computer

    Link for Download & Install & Setup & Activation problems may help
    -Chat http://www.adobe.com/support/download-install/supportinfo/
    OR
    http://forums.adobe.com/community/download_install_setup

  • Can you add comments to the XML reports other than one Block Comment and one Test Comment?

    I know how to use Block Comments and Test Comments but if I need to add more comments to my XML report in a test other than one Test comment, is there a way to do this?  In other words, I would like to be able to add say 5 comment lines for a single test.  Also, can a Test Comment or Block comment be more than one line in length?  If so, how do you do that?

    What version of TS do you have?  If you have 4.1 or better (might be possible in 4.0 I can't remember) you can just use the additional results.  So in the step properties you will see Additional Results.  Then just add as many as you want. 
    Then you will see it show up in the report like you want.  I couldn't get multiple lines to work in one comment.  I tried \n but that didn't seem to be supported here.
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~
    Attachments:
    StepComments.JPG ‏38 KB

  • I want to delete all Podcastepisode-Downloads in one step!

    Hello, I have so much Podcasts in my Podcast-App.
    I want to delete all Podcastepisode-Downloads in one step!
    Long time ago this was possible in the Music-App.

    Change the default settings on the app to manually download.
    Then delete the App
    Then reinstall it and change the settings back to whatever you want....
    Think this should work, but I've got too many podcasts on my phone to try it on your behalf!

  • Is there a way to delete emails other than one at a time?

    Is there a way to delete emails other than one at a time?

    You can select multiple emails at a time for deletion, but there is no option to delete all email from an account's Inbox mailbox at once.
    If the account is an IMAP or Exchange account, delete all email from the account's Inbox mailbox with the email client on your computer used for accessing the account or via webmail access for the account using a browser on your computer. All server stored mailboxes with an IMAP or Exchange account are kept synchronized with the server with each email client used to access the account.

  • How to delete daily all idocs older than one year

    Hello
    I wander how to delete daily all idocs older than one year. I guess with an job(but how to create it)

    Hi
    Check this [Link|https://ecohub.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/17c435df-0901-0010-72a7-b9dcd271213d]
    Just give a search in SDN you could find lot of doucments releated to archiving of idocs
    Regards
    Uday

  • A library on my hard drive became corrupted, so I over-wrote it from an external hard drive.  When I access the library now on my hard drive, many of the images are vertical, and cannot be rotated other than one at a time.  Ideas to correct this?

    A library on my hard drive became corrupted, so I over-wrote it from an external hard drive.  When I now access the library on my hard drive, many of the images are vertical, and cannot be rotated other than one at a time.  Ideas to correct this?

    You had already done "Repair" and "Rebuild"?  These usually takes scores of minutes or hours.
    Does the Library on your external drive work from the external drive?  Navigate to it in Finder and double-click the name.
    If it does, delete the problem Library, empty the System Trash, reboot, Verify your system disk using Disk Utility (and might as well repair permissions while you're at it), reboot, test the external drive Library once more to confirm it works properly, then close it and copy the Library to your system drive.  When the copying is done, double-click the Library (now on the system drive) and see what you get.

  • How can I delete exact duplicates other than one at a time.

    How ca I delete exact duplicate songs other than one at a time.

    I've written a script called DeDuper which can help remove unwanted duplicates. See this  thread for background.
    tt2

  • I'm using Lightroom cc, I'm trying to create a develop preset. I'm making changes to one photo that I want to apply to many other photos, one of the changes is to blur the background using the adjustment brush. When I am blurring I am going over the photo

    I'm using Lightroom cc, I'm trying to create a develop preset. I'm making changes to one photo that I want to apply to many other photos, one of the changes is to blur the background using the adjustment brush. When I am blurring I am going over the photo several times, when I go to create the preset the adjustment brush is not an option to check. How do I add the adjustment brush to the develop presets. Thanks Ron.

    The adjustment brush cannot be added to a develop preset.
    If you can replace the adjustment brush with a gradient filter or radial filter, you can add those to a dev preset.
    If a gradient filter or radial filter is not an option for you, you can at least create an adjustment preset to remember your brush settings.

  • I using my ipad id I want to update as show other people Id..., When I using my ipad id want to update as show other people Id...

    I using my ipad id I want to update as show other people Id..., When I using my ipad id want to update as show other people Id...

    Do you recognise the id e.g. has anybody else used your iPad and downloaded and/or synced apps from their account onto it ? If so then those apps will be tied to that person's account, and only that account can download any updates to those apps.
    Otherwise you can log out of the currently logged in account on the iPad by tapping on the id in Settings > Store and you can then log in with a different account.

  • Is there a difference between the Apple TV MD199LL/A vs. the refurbished Apple TV FD199LL/A other than one is refurbished?

    Is there a difference between the Apple TV MD199LL/A vs. the refurbished Apple TV FD199LL/A other than one is refurbished?

    Refurbished I would suggest - refurbished products have slightly different product codes.
    AC

Maybe you are looking for

  • Is it possible to see who has saved progress on a web form, but not submitted?

    We are using FormsCentral for our application process, and we are allowing applicants to save forms. Is it possible to see who has started a web form, and saved it, but hasn't submitted yet? Maybe by cc'ing the email notificiation they get to an admi

  • String and stringtokenizer problem

    Hi, String s=new String(null); is it possible or not? StringTokenizer st=new StringTokenizer(null,","); is it possible or not?

  • Cant watch a Rented and downloaded a movie from Itunes on airplane

    I recented read that I could rent and download a movie to my IPAD for viewing later. I did this and planned to watch on my international flight. When I tried to watch the movie Itunes wanted to connect over the internet 1st, since I had no internet o

  • PLM Web UI problems loading everything

    Does anyone have tips on getting any piece of the PLM to work? We have installed and setup everything as the installation guide requests. We have not done anything in SPRO yet. We were under the impression it should work out of the box. For most of t

  • Is it possible to enter multiple records in Infotype.

    Hi,     I am having doubt regarding entering multiple values in infotypes for HR-ABAP. Is there any way to enter multiple records in a infotype, As compared to ABAP, By using table maintence generator we can enter mutiple records in the form of table