Hide layer in AS3

Hello

I want to know how to hide a particular layer during a mouse click event.

Thank you

Ankur

-Is it possible to hide a layer for a particular action?

N ° you can put them all in a movieclip or you can give them all as instance names:

layer1_mc1, layer1_button1 etc... and iterate...

Tags: Adobe Animate

Similar Questions

  • Can we capture the event of show/hide layer in PS?

    Hi all..!!!

    I have a request to all the coders of Photoshop! We can capture the click event of show/hide layers in Photoshop... ? I need to know my code if the user clicked on the eye of show/hide layer... !!

    Pls answer soon... !!

    Thank you!

    http://forums.Adobe.com/thread/858391?TSTART=0

  • Hide layer in .ai 18.1.0 preview thumbnails?

    I can't hide the layer preview thumbnails in illustrator 18.1.0 more (in layerpanel options). Since it slows down things en masse, I'd be happy to have a workaround solution. Does anyone know?

    Kind regards

    Patrick

    Looks like a bug to me.

    Adobe - feature request/Bug Report Form

  • How to disable / hide tooltip in as3 vslider when being dynamicaly created

    Hi all

    IV been looking all over the internet and can do not seem to find a way to disable / hide the ToolTip vslider.

    I know in mxml, you can do so through toolTipHide = "false"; but I need to do the same in as3.

    I create this vslider control dynamicaly in as3 and this option is the only thing slow me down.

    Any help is gratefull

    TFC

    TFC,

    toolTipHide is an event, so I don't see how to set to true will work. You want to use showDataTip.

    Jason

  • example JavaScript to show/hide layer of BCG in Acrobat DC

    I saw this question a couple of times but not enough answers, so I'll ask a little more precisely.

    I have a listbox with three different option (option 1 is 'Blue', is a 'Green' option 2 and option 3 is "Yellow")

    There are 3 matching layers named BlueLayer, GreenLayer and YellowLayer.

    When 'Blue' is selected in the drop-down list, I would like BlueLayer to show (but not GreenLayer or YellowLayer).

    When 'Green' is selected in the drop-down list, I wish GreenLayer show (but not BlueLayer or YellowLayer).

    When 'Yellow' is selected in the drop-down list, I want to show YellowLayer (but not BlueLayer or GreenLayer).

    My theory is that if I select the box that says commit selected value immediately, I should be able to run a javascript script on the MouseUp command allowing the correct corresponding layer to show.

    Could someone show me an example of what this javascript would look like or suggest a better way to do it?

    I know that Radio buttons are another option, but in the end, I prefer a list because of the design of the form box.

    BTW, I'm new to using javascript in Adobe Acrobat so if I'm completely off base with my way of thinking, please point me in the right direction.  Thank you in advance!

    First, you must use the Validate or Format, not MouseUp events. I prefer to use the old.

    Here's how I'd do:

    var layers = this.getOCGs(0); // let's say the layers are only on the first page of the file.
    for (var i in layers) {
        if (layers[i].name=="BlueLayer")
            layers[i].state = (event.value=="Blue");
        else if (layers[i].name=="YellowLayer")
            layers[i].state = (event.value=="Yellow");
        else if (layers[i].name=="GreenLayer")
            layers[i].state = (event.value=="Green");
    }
    

    If the layers appear on multiple pages, and then you add another loop around the code, to go through all the pages, but the basic concept is the same.

  • Layer mask groups converted from work plans to the size of the artboard in older versions of Photoshop

    I wanted to start this post as an idea, but I couldn't choose communities (it wouldn't let me), so here it is posted...

    ----

    Just came across this with a customer...

    I use for a mobile design project work plans, and I just got a screenshot with some texts asking why among work plans were really great. Way bigger than a phone. (I'm under NDA and cannot post the screenshot, but imagine there are a lot of iPhone size work plans and two of them seem to be at a right angle)

    I opened the file and on my end, everything is the right size. Remembering the weeks ago to tell the customer that they need to update their version of Photoshop for all this work correctly, I have take a look at the screenshot and see that they are on CC2014 - none of the work plans.

    What I'm asking here, is that, since we have data, plans of work are objects of a defined size and 'alive', why not just use these data to hide layer groups at the opening of the PSD / PSB (PSB in my case) in older versions of Photoshop?

    It could save you a TON of hassle and confusion.

    Hi Zack,

    High level to your query response is: no, there is no conduct business case for a general solution to what you are suggesting. So I don't see what is happening.

    I say that as someone who likes to give back and forth and backward compatibility.

    There are two parts of the problem that you raise. They are related and somewhat intertwined.

    1. Having the version previous (2014) do something reasonable with the data from the version the most recent (2015). Either the old version should be taught on the most recent data so it can make a decision about what to do, or the newer version must put additional data in the file format for consumption by the older version.
    2. Back and forth between versions. As you say, a much more difficult problem. In fact, we do a good job of that today. But we must be sure that whatever we do for (1) not to damage and back the wrong way.

    Let's be very clear: 2014 will not be touched, except for critical bugs, absolutely. And even before 2015 is released, it would have not been corrected to make it behave better with work plans. There is no way that I could see what is happening. So all we have done for better backward compatibility had to be entirely done within 2015.

    For the round trip, the general problem is something like this: we want to 2014 to read an object that has properties of 2015, he does not understand. While we might learn ch to keep these properties as opaque property, must also have rules for when these properties are not valid and thrown on the floor. Probably, if the object is changed. But not always. And sometimes when another object parent is changed. And so on. Right now, we destroy them unknown content from their reading in the old version. Make us and record what we understand. As a user, you receive an alert telling you that we are do this. It's the safest thing to do.

    There are special cases where a developer can see an opportunity to preserve a level of backward compatibility and back and forth. We try to do if we believe that it is safe. But this scenario happens only occasionally.

    In the case of work plans, made us really think about this: If we added a mask to the group for backward compatibility, it should do something with this mask reading around 2015. And what would happen if the user edited this mask in 2014 and opened upward in 2015 - and who edited mask do not align with the structures of the artboard? Things started to get dark quickly. We started to see traps. The workflow together to sheath special round trip had to be tested and verified. The cost was rising and this expense must be filtered through a cost/value trade-off. And then what happens when we add a new property to the structure of work plan? At these efforts for nothing?

    So we compromised with what you have today. Work plans become groups in 2014. The Group and the layer structure remains intact. Doesn't secretly add us and remove masks for the round trip. You can safely change the groups to your heart's content. When return you this document in 2015, you redo the work plans of the groups. Was not clear and safe way to do more than that given the time that we had.

    Take a step back and think about your problem, it doesn't seem to be a value to a script that converts group work plans + layer masks for your workflow to have your documents that is consumed by the customers of 2014. This would be carried out in 2015 because she would need understand the work plans. And maybe vice versa from 2014 to 2015, assuming that the documents were not published in a hostile way. We're not likely to write such a script as a generic tool, but someone competent with script might be able to do this.

    More that I intend to write, but hopefully, it gives you additional insight in the compromises that we have faced.

  • Choice of adjustments CS5 is not automatic pop-up layer mask

    I'm new to Photoshop (CS5) and do not see the auto-hide layer appear when I choose Control Panel settings (I have to create one in a separate step). Is the automatic function something I need to turn on?

    Do you mean that a layer mask is not added during an adjustment layer in the settings panel?

    If so, check the mask adds by default in the settings panel flyout menu.

  • Adding a layer to a page created with a model

    Aaaaaaaaaaaaaaaaaaaargh!

    I created a page template. YER annoying banner in the shape of L and menus on the left. Adding a table in the lower right corner. It is editable.

    Created many pages. Wanted one of the pages to have a show/hide layer, so I tried to create a layer on the page. When I try to insert a layer, I get an error message "this change would require chaning locked by a translator or a model code. The changes will be rejected. »

    Huh? If the area that I am trying to add a layer is editable, then why can't the model?

    Any clarification gratefully received.

    Best regards, David, Ottawa

    A thousand blessings on your home. It woiks! (Guess who clicked between the p...)

    Many thanks, guys for your help.

    Best regards, David, Ottawa

  • Enable/disable single-click mask

    I am familiar with the OS x keyboard shortcut click + the possibility to show/hide layer mask.

    Trying to toggle mask script behavior. I found a forum script that toggles a mask layer in three clicks.

    1-click-1 (selects layer mask)

    Screen Shot 2016-01-23 at 10.37.22 AM.png

    2 - Click 2 (shows mask)

    Screen Shot 2016-01-23 at 10.37.40 AM.png

    3 - Click 3 (mask mask and makes the icon of the active layer)

    Screen Shot 2016-01-23 at 10.38.01 AM.png

    Now for the tricky part. Can a script toggle a layer mask without making the icon of the active layer after the toggle effect?

    In other words, the script selects the layer mask to mask toggles and maintains the icon of selected master.

    Link to the forum script: Re: toggle selection

    You want something like that?

    function isChannelMaskSelected() {}

    var ret = false;

    If (hasMask () == true) {}

    If (getChannelMaskSel () == true)

    {

    RET = true;

    }

    else {ret = false}

    }

    return ret;

    };

    function hasMask() {}

    var hasMask = false;

    Var ref = new ActionReference();

    var keyHasMask = app.stringIDToTypeID ("hasUserMask");

    var keyHasMask = app.charIDToTypeID ("rocket");

    ref.putEnumerated (app.charIDToTypeID ("Lyr"), app.charIDToTypeID ('Ordn'), app.charIDToTypeID ("Trgt'));

    var / / desc = executeActionGet (ref);

    If (desc.hasKey (keyHasMask)) {}

    hasMask = true;

    }

    Return hasMask;

    }

    function selectComponentChannel() {}

    try {}

    map var = {}

    Map [DocumentMode.GRAYSCALE] = charIDToTypeID ('Blck');

    Map [DocumentMode.RGB] = charIDToTypeID ("RGB");

    Map [DocumentMode.CMYK] = charIDToTypeID ('CMYK');

    Map [DocumentMode.Lab] = charIDToTypeID ("Lab");

    var / / desc = new ActionDescriptor();

    Var ref = new ActionReference();

    ref.putEnumerated (charIDToTypeID ('one'), charIDToTypeID ('one'), map [app.activeDocument.mode]);

    desc.putReference (charIDToTypeID ('null'), ref);

    executeAction (charIDToTypeID ('slct'), desc, DialogModes.NO);

    } catch (e) {}

    };

    function selectChannelMask (visible) {}

    try {}

    var / / desc = new ActionDescriptor();

    Var ref = new ActionReference();

    ref.putEnumerated (charIDToTypeID ('channel'), charIDToTypeID ('channel'), charIDToTypeID ("Msk"));

    desc.putReference (charIDToTypeID ("null"), ref);

    desc.putBoolean (charIDToTypeID ("MKV"), visible);

    executeAction (charIDToTypeID ("TPCV"), desc, DialogModes.NO);

    Returns true;

    } catch (e) {return false ;}

    };

    function getChannelMaskVis() {}

    isVisible = false var;

    Var ref = new ActionReference();

    var keyVisChannels = app.stringIDToTypeID ("visibleChannels");

    ref.putEnumerated (app.charIDToTypeID ("Lyr"), app.charIDToTypeID ('Ordn'), app.charIDToTypeID ("Trgt'));

    var / / desc = executeActionGet (ref);

    If (desc.hasKey (keyVisChannels)) {}

    list = desc.getList (keyVisChannels);

    Alert ("kas key");

    Alert (DESC. GetType (keyVisChannels));

    Alert (List.Count);

    If (List.Count > 1)

    {

    isVisible = false;

    }

    else {isVisible = true}

    }

    return isVisible.

    }

    function getChannelMaskSel() {}

    Var ref = new ActionReference();

    ref.putProperty (charIDToTypeID ('Rprp"), stringIDToTypeID ('numberOfChannels'));

    ref.putEnumerated (charIDToTypeID ('Dcmn"), charIDToTypeID ('Ordn'), charIDToTypeID ("Trgt'));

    var / / desc = executeActionGet (ref);

    var numberOfChannels = desc.getInteger (stringIDToTypeID ('numberOfChannels'));

    Var ref = new ActionReference();

    ref.putProperty (charIDToTypeID ('Rprp"), stringIDToTypeID ("targetChannels"));

    ref.putEnumerated (app.charIDToTypeID ("Lyr"), app.charIDToTypeID ('Ordn'), app.charIDToTypeID ("Trgt'));

    var / / desc = executeActionGet (ref);

    list var = desc.getList (stringIDToTypeID ('targetChannels'));

    firstIndex var = list.getReference (0) .getIndex ();

    return list.count == 1 & firstIndex == numberOfChannels + 1;

    }

    function toggleChannelMask0() {}

    var maskSelected = isChannelMaskSelected();

    if(maskSelected == true) {}

    If (getChannelMaskVis () == true)

    {

    selectComponentChannel();

    {else {selectChannelMask (true)};

    } else {}

    selectChannelMask (false);

    }

    };

    function toggleChannelMask() {}

    var maskSelected = isChannelMaskSelected();

    if(maskSelected == true) {}

    If (getChannelMaskVis () == true)

    {

    selectChannelMask (false);

    {else {selectChannelMask (true)};

    } else {}

    selectChannelMask (false);

    }

    };

    toggleChannelMask();

  • Tracker camera does not

    I made this a hundred times and now it does not work

    I have a clip of camera Tracker button is pushed.

    It analyses the clip and solves it.

    However does not create the small x on the screen for me to create a target and null device.

    There's nothing here?

    You need to have the camera Tracker selected in the effect controls panel, you have not turned on hide layer controls in the view menu, you must be in the Active camera view in the Composition Panel and if all this is correct, you may need to increase the size of the markers to see. A few shots to produce very small markers. If none of these suggestions, try a different shot of follow-up. If this doesn't help, try studying upward, followed by the camera by typing in the field find help in the upper right of the AE and check on the training material.

  • Have the long list of scrollbar on frame images

    Hello

    I have a list of 22 logos (pictures) I want to scroll from the bottom of the image upwards. Due to the size of the list, they are not all part of the framework at a time (where scrolling). It is a composition of 1920 x 1080 and I use CS6.

    My question is which approach would be best for this scroll effect.

    I tried two things so far: make a PSD with all the pictures online and I've also used an odd field and précomposé all files image size (it's 5000px in height) to make it all clean. Scrolling works (I use just for that position) for both approaches but it all seems a bit awkward for me so I wonder if there is a better way.

    I wonder this because I need to blur/lower the opacity of the logos when they arrive in the middle of the frame to read a line of text that should be on the top logos so to speak. But I had trouble finding an easy way to do this with the approaches that I used. Draws the background so I can not use just a solid for the blur/opacity effect - so I don't know how to make it work with the psd file (I also tried a mask but following just the images to the top of course). With the precomp I can time the effect if there is not a better way (which is what I'll do if I can't find a better solution).

    Help appreciated - thank you!

    I recommend placing all your images in a model that is the same size as your main computer.

    The parents all to a null object.

    Animate the null object. Adjust the position of the different logos depending on the needs.

    Now, in your main computer, add a new solid.

    Precompose it.

    In the new precomp apply a ramp degraded to the solid. Then apply Colorama or Tritone and set it so that the gradient goes from black up white in the middle and back to black at the bottom.

    Return to the main competition, hide layer gradient comp.

    Apply the compound blur effect to your logo design.

    Choose the ramp degraded as blur card.

    Adjust the blur settings. You should see now blur logos in the Middle, differently from the way that they blur on the edges.

    Use this layer gradient model as a luminance cache reverse for your logo layer and apply a level to fit the need to change the opacity as well.

  • Layered Butterfly

    I need to know how to take the image of a butterfly, cut each wing and body and place each section on its own layer, the final objective being to take it in adobe after effects and animate... but that's just the part photoshoped I need help...

    I'm a newbie to Photoshop but am learning and would be really grateful for any help, I have searched the Web for more than a week and does not know how to do this.

    Thank you

    I know how to get my image in photoshop, how to make playlists etc, how to unlock the background layer, I have even cut out a wing and put it on its own layer, but then when I did the same thing for the next wing he said the selection was empty...

    Please help... I'm sitting here, hoping someone would know where I am going wrong...

    Could you post a screenshot of your layers panel? This would help us understand how you got so far.

    Looks like you've actually got the hang of selection and create new layers from this selection, but it seems that you can miss a critical step...

    1. open your butterfly picture and select the first part of your Butterfly with the method of selection of your choice (I use the Quick Selection tool). You can also refine your selection by clicking on select > refine edge. Note that my original image is called Layer 0.

    2 after you make your selection, go into New > Layer Via Copy. You can now see that I have a new layer - Layer 1. If I hide layer 0 you can see that layer 1 is just my selection of wing on a transparent background.

    3. here's where you might have made a mistake - check that your original layer is active when you make your next choice. The active layer will be highlighted in blue in your layers panel.

    4 after selecting the next area you butterfly, (make sure that your original layer is active!) to New > Layer Via Copy. This will create a third layer - now, I have two separate layers for my two wings plus my original source image.

    5. repeat this procedure until you have selected all the parts of the butterfly. Don't forget, in a new layer of a selection, always make sure that your source layer is selected. When you are finished, you should have all segments of your butterfly on different layers with a transparent background.

    I hope this was clear and useful! If you need further help, feel free to ask.

    See you soon!

    Kendall

  • play the ACE main sounds

    don't know what I'm doing wrong here, maybe someone can point me in the right direction. I use the following code to play a sound

    var beepsound:beep = new Tweet

    beepsoundplay(); (instead I need)

    function beepsoundplay (): void {}

    beepsound. Play();

    }

    so I var and function in the hand in the form, now in a mc, I also have a layer of as3 with a specific code of mc. If I want to call the beep sound as the principal declared, I thought I could just use the beepsoundplay(); Requests access to the property not set. any ideas?

    If the sound signal is the class of an mp3 file in your library, use:

    var beepsound:beep = new beep()

    beepsoundplay();  in the same scope as the function below

    function beepsoundplay (): void {}

    beepsound. Play();

    }

  • hyperlink within a scrollpane?

    Hey guys.

    OK Ive been looking into this during two days and really need help! I need the key to post a link to an external site

    I have my scrollpane on the stage, I created the mc and exported and bound to the scrollpane, I created a button on layer 1 in the mc related to the scrollpane and I created a 2nd layer for as3. Here's the AS3 that I used. When I export the mc to display the ScrollPane everything works except the buttons himself. I can see everything, but the buttons will not be a link to the Web page.

    AS3

    import flash.net.URLRequest;

    Btn1.addEventListener (MouseEvent.CLICK, goDesignSite);

    function goDesignSite(Event:MouseEvent):void

    {

    var DesignURL:URLRequest = new URLRequest ("http://www.krdesign.ie/html");

    navigateToURL. (DesignSiteURL);

    }

    Any help would be greatly appreciated!

    Gary

    import flash.net.URLRequest;
    Btn1.addEventListener (MouseEvent.CLICK, goDesignSite);
    function goDesignSite(Event:MouseEvent):void
    {
    var DesignURL:URLRequest = new URLRequest ("http://www.krdesign.ie");
    navigateToURL (DesignURL);
    }

    I removed an a point between (DesignURL) and navigateToURL typo error

  • Need help to display text with the onClick event

    I have a thumbnail that when you click on, it displays a larger image.  I also want to display the title under the enlarged image when the user clicks on the thumbnail.  Help, please!

    but is there a way to simulate onClick with CSS?

    In fact, there is, but it works on devices with touchscreen like the iPhone, iPad and Droid.

    If your visitors use a mouse device operated, they will see the event in the overview.

    http://www.usabilitypost.com/2010/05/12/CSS-hover-controls-on-iPhone/

    If you must use onClick, watch the tutorial to Show/Hide layer below.

    http://www.cbtcafe.com/Dreamweaver/showhidelayers/index.html

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB
    http://ALT-Web.blogspot.com

Maybe you are looking for