Events on layers

Hello!
I have a few "layers" (a stackPane with 2 panels of anchorage). the anchor on the front pane only contains rare items, so I can see the other side of the anchor.

How can I make a click on the second layer?

Thanks :)

Hello. There is a setMouseTransparent (boolean) on the node. Mouse events on the node with mouseTransparent set to true will be ignored and
captured by the top node below.

Tags: Java

Similar Questions

  • Structure of the timed real-time event loop does not work

    I'm a new user for LabVIEW. And I've encountered a problem that frastre really me! Hope someone can help out me. Thanks in advance!

    I just want to use the structure of the event under timed loop, which is important in my extrmely design.

    However, this works very well in my computer (without connecting to the FPGA).

    Once I connect it to the FPGA, then I can still run but there is no response!

    My file is attached. Please someone help me!

    Looking forward to your answers!

    The FPGA runs headless. Structures of the event won't work. What you need to do is to have an application on your host computer when the user presses a button, changes a value, etc.. This event should send a message via TCP/IP for code that runs in real-time environment. Then the real time environment should attribute to the desired value a control on the FPGA.

    As a general rule, programming real-time with FPGA has several layers.

    (1) host-> handles interactions with the user code and communicates the code in real-time via TCP, UDP, etc.. Displays the user sent by RT controller data.

    (2) code in real-time-> tracks headlessly. Manages host code messages, processes the data of FPGA, communicates with FPGA much as the host code communicates with the code in real-time

    (3) FPGA-> no acquistion and passes through PEP in the RT

    The first thing you need to do is to understand the architecture and how all these pieces of the puzzle work together before you throw things down on a diagram.

  • Locked layers

    Hello, is it possible to ensure that layers are always unlocked automatically at the opening with Photoshop CS5?

    Thank you for your help

    Hello, is it possible to make sure the layers are always unlocked automatically at the opening with Photoshop CS5?

    Thank you for your help

    We could link a Script (which opens all segments) for the Open event with file > Scripts > Script event handler, I guess.

  • How to select layers by ID

    My extension HTML Panel listening to JSONEvents, as this SELECTION:

    { "eventID": 1936483188, "eventData": {"layerID":[2,97],"makeVisible":false,"null":{"_name":"back1.jpg","_ref":"layer"},"selectionModifier":{"_enum":"selectionModifierType","_value":"addToSelectionContinuous"}}}
    

    In the event handler, the script is to store the selected layer s 'layerID"in a table.

    How can I select these layers later by the ID stored with a .jsx call?

    Should be simple, but I can't find a way.

    Is it possible to convert the ID of the Index layer?

    Thank you very much!

    selectLayerById(98); //select this layer only
    selectLayerById(80,true); //select this layer along with other selected layers
    
    function selectLayerById(id,add){
    var ref = new ActionReference();
    ref.putIdentifier(charIDToTypeID('Lyr '), id);
    var desc = new ActionDescriptor();
    desc.putReference(charIDToTypeID("null"), ref );
    if(add) desc.putEnumerated( stringIDToTypeID( "selectionModifier" ), stringIDToTypeID( "selectionModifierType" ), stringIDToTypeID( "addToSelection" ) );
    desc.putBoolean( charIDToTypeID( "MkVs" ), false );
    try{
    executeAction(charIDToTypeID("slct"), desc, DialogModes.NO );
    }catch(e){}
    };
    
  • Select only the layers highlighted?

    Is it possible to get to the level of the layers only highlight?

    For example, I want to get an object/array that contains only the layers highlighted in blue:

    Screenshot 2015-12-20 21.40.27.png

    I'd rather not select the work to achieve this.

    Thank you!

    M

    This gives a shot.

    It will leave you with a table containing the layers you had selected in the layers panel when the script is run.

    You can see the bottom I loop this table so you can see each name and origin of visibility

    function get_selected_layers(){
        var doc = app.activeDocument;
        var lays = doc.layers;
        var OriginalLayers = [];
        for(var i = 0; i < lays.length; i++){
            OriginalLayers.push(lays[i].visible);
            if(!lays[i].visible){
                lays[i].visible = true;
            }
        }
    
        make_action();
    
        var SelectedLayers = [];
        for(var i = 0; i < lays.length; i++){
            if(lays[i].visible){
                SelectedLayers.push(lays[i]);
            }
        }
    
        for(var i = 0; i < lays.length; i++){
                lays[i].visible = OriginalLayers[i];
        }
    
        return SelectedLayers;
    
        function make_action(){
            // Set you action name and the set name that it belongs to here
            var myAction = "Select_Layers";
            var mySet = "Scripted_Actions";
            //---------------------------------------------------------------------------------
            var currentInteractionLevel = app.userInteractionLevel;
            app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
            var actionStr = [
                '/version 3',
                '/name [ 16',
                '53637269707465645f416374696f6e73',
                ']',
                '/isOpen 0',
                '/actionCount 1',
                '/action-1 {',
                '/name [ 13',
                '53656c6563745f4c6179657273',
                ']',
                '/keyIndex 0',
                '/colorIndex 0',
                '/isOpen 0',
                '/eventCount 1',
                '/event-1 {',
                '/useRulersIn1stQuadrant 0',
                '/internalName (ai_plugin_Layer)',
                '/localizedName [ 5',
                '4c61796572',
                ']',
                '/isOpen 0',
                '/isOn 1',
                '/hasDialog 0',
                '/parameterCount 3',
                '/parameter-1 {',
                '/key 1836411236',
                '/showInPalette -1',
                '/type (integer)',
                '/value 7',
                '}',
                '/parameter-2 {',
                '/key 1937008996',
                '/showInPalette -1',
                '/type (integer)',
                '/value 23',
                '}',
                '/parameter-3 {',
                '/key 1851878757',
                '/showInPalette -1',
                '/type (ustring)',
                '/value [ 11',
                '48696465204f7468657273',
                ']',
                '}',
                '}',
                '}'
            ].join('\n');
            createAction(actionStr);
            app.doScript(myAction, mySet, false);
            actionStr = null;
            app.unloadAction(mySet,"");
            app.userInteractionLevel = currentInteractionLevel;
        }
    
        function createAction (str) {
            var f = new File('~/ScriptAction.aia');
            f.open('w');
            f.write(str);
            f.close();
            app.loadAction(f);
            f.remove();
        }
    }
    
    var myLayers = get_selected_layers();
    for(var i = 0; i < myLayers.length; i++){
        alert(myLayers[i].name + ", " + myLayers[i].visible);
    }
    
  • Why I didn't copy and paste layers or folders in Photoshop?

    I honestly have a hard time understanding why I can't layers Ctrl + C and Ctrl + V, or folders (with styles and properties) in Photoshop, although I can with other elements in Photoshop and with almost all elements of all software published by Adobe (including the insurmountable more complex layers of an After Effects composition). I have long used different methods to copy layers and folders autour (double drag, etc.), but they can all be very heavy at times depending on the project and this is the specific workflow. For example, I just finished editing on the thirty selected RAW photos of an event in PS and I need either already have my watermark on them that I have edited, each of them or that I do now as a big batch of ol '-note: because I put my mark in a location unique photo based on its content This is the direction and My Eye stocks or batch commands do not work for this). My only option really is to visit the source document containing my watermark layer more than thirty times to retrieve a single item of data which could and should only be required in my Clipboard and available with a simple keyboard shortcut (note also that my brand fusion styles will be also adjusted according to the photo, excludes a selection of brand that can be copy and paste but only as a raster with an alpha channel layer).

    Y at - it an explanation of why it's missing? Maybe there's a logical reason, I do not understand...?

    See you soon!

    Also use ctrl/cmd-J to duplicate (copy) a layer in the same document, which will retain all of its attributes. And as Trevor mentioned, you can just drag the layer in the layer panel to another document tab to replicate to another document - no menus, no workspace rearrangement.

  • Flow of work-layers and buttons

    I am very new to Acrobat, and asked me to modify existing PDF documents by adding a removable text window (a warning message)

    I found that I can easily achieve this feature by importing text as a layer and then adding a button with two Actions: set the visibility of the layer to 'hide' and hide a field to remove the button.

    This works very well for a single document, but now I'm trying to figure out how I can deploy it documents that I need to distribute.

    I started by creating a 'warning' PDF file which contains the elements and the features I need a page.  Now, I need to get into existing documents.

    I tried to 'import as layer', but this breaks the button by bringing it as a graph, with no action.

    'Organise Pages'-> 'Insert' looks promising - it brings the functional disclaimer in the document, but it's own page.  Try to pass the document reveals two problems.   With "change PDF" I can't drag the text to the right page and paste a copy seems to move a layer without a name (I can't toggle the visibility of the items glued using layers at all). "   More important still, however, 'Edit PDF' doesn't seem to be a good approach because he can't move the button.  The button object is in the shelter of the editing tool?

    I looked at the Action Wizard tool, I was wondering if I can somehow script added to the text box, but it's not like there is a way to create buttons.  I also tried to import the document available as a layer in my 'disclaimer' paper, but this kind of import seems to be limited to a single page.

    At this point, I'm bit stuck, and I wonder if someone more experienced could point me in the right direction?

    Instead of using layers, you can simply use a single button. The button can be configured to display the warning and when the user clicks the button, he would get hidden, eith er by action on the ground to hide or a mouse in JavaScript, as:

    Mouse upwards to button script

    Event.Target.Display = display.hidden;

    So start by create a PDF file that contains the disclaimer text and perhaps a smaller or words as button image: «Click here to continue»

    Add a button which is quite large for a PDF file and on the Options tab of the button Properties dialog box, select a type of layout of "Icon only" and select the page of the PDF as icon termination. Add the script or action to hide under the action of the mouse upwards. Once you have the button set up and working properly, you can simply copy & paste in any other PDF files you need to put in place. The process of adding the button warning to other PDF documents can be automated in Acrobat with Action, adding to a collection of documents is easy.

  • How to get the selected layers?

    Hi, how can I use the SDK for a list of the layers that are selected by the user when the plugin is activated?

    Let's talk terminology.

    an "activation" on a layer effect is not really the process of events.

    When an effect is used firstly to æ session, this is the function GlobalSetup()

    is called.

    This is the most 'activated' like thing in the effect by applying the process.

    This function is called only once per session (in general) and data

    allocated to it is shared between all instances.

    then, whenever a new instance is applied, the specific instance

    Function SeqeunceSetup() is called.

    It is the only clue you get tell you that a new instance is created.

    Unfortunately, in the course of this appeal you still cannot check the layer on which

    the effect will be applied, as at that time there AE still because preparations

    and has not done this topic yet. (try to get the effect layer will

    give an error)

    so when you say "on" I'm assuming you mean "applied".

    If an instance of the effect is already present in an economy effect, you get not one

    Call of SequenceSetup(), but a SequenceResetup() call instead. (or Unflatten())

    now, to detect if another instance is present on a layer, you must analyze

    This layer effects and check each because it is installed a key. (and match

    to you, of course)

    you will need to use:

    AEGP_GetLayerNumEffects

    AEGP_GetLayerEffectByIndex

    AEGP_GetInstalledKeyFromLayerEffect

    and now you hit the real problem.

    an effect cannot remove another effect of the same layer, sure it is. It will be

    very probably launch an error message as AE manages all the layer effects

    and suddenly; y an is missing.

    You can solve that by using a CEAP separated with a slow hook and make the

    deletion, or all just throwing your own message to the user by saying

    You cannot have two and set a flag on the second instance of turn it off

    process.

  • How can I create a layered lens effect?

    I want to create a layered lens effect. I am trying to create an effect like this.

    I can create a rectangle with a hole in it using mask form = Shape.subtract (backgroundRect, lensRect). The problem is that I want to want to be able to move the lensRect with the mouse. I don't know how to do this. I can use a clip to reveal the background under the lens. The problem with that approach is that is will not let me create a semi-transparent background. Do you know how to update the mask each time, the lenseRect is moved? I tried to use a changelistener on the lenseRect translateX property, but we cannot update the form inside the event. To use the reference of mask in the case where there be declared final.

    import javafx.application.Application;
    import javafx.beans.value.*;
    import javafx.event.EventHandler;
    import javafx.geometry.Bounds;
    import javafx.scene.*;
    import javafx.scene.image.*;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.*;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.*;
    import javafx.stage.Stage;
    
    public class WhereIsHe extends Application {
        private static final double VIEWFINDER_WIDTH  = 30;
        private static final double VIEWFINDER_HEIGHT = 80;
    
        public static final Color LENS_TINT = Color.YELLOW.deriveColor(0, 1, 1, 0.15);
        public static final Color MASK_TINT = Color.GRAY.deriveColor(  0, 1, 1, 0.97);
    
        @Override public void start(Stage stage) {
            Image image = new Image("http://collider.com/wp-content/uploads/wheres-waldo2.jpg");
    
            ImageView background = new ImageView(image);
            StackPane layout = applyViewfinder(
                    background, image.getWidth(), image.getHeight()
            );
    
            stage.setScene(new Scene(layout));
            stage.show();
        }
    
        private StackPane applyViewfinder(Node background, double width, double height) {
            Rectangle mask = new Rectangle(
                    width,
                    height
            );
    
            Rectangle viewfinder = new Rectangle(
                    VIEWFINDER_WIDTH,
                    VIEWFINDER_HEIGHT,
                    LENS_TINT
            );
            makeDraggable(viewfinder);
    
            Pane viewpane = new Pane();
            viewpane.getChildren().addAll(
                    new Group(),
                    viewfinder
            );
    
            viewfinder.boundsInParentProperty().addListener(new ChangeListener() {
                @Override
                public void changed(ObservableValue observableValue, Bounds bounds, Bounds bounds2) {
                    applyStencil(
                            cutStencil(mask, viewfinder),
                            viewpane
                    );
                }
            });
    
            viewfinder.relocate(
                    width  / 2 - VIEWFINDER_WIDTH  / 2,
                    height / 2 - VIEWFINDER_HEIGHT / 2
            );
    
            StackPane layout = new StackPane();
            layout.getChildren().setAll(
                    background,
                    viewpane
            );
            return layout;
        }
    
        private void applyStencil(Node stencil, Pane viewpane) {
            viewpane.getChildren().set(0, stencil);
        }
    
        private Node cutStencil(Rectangle mask, Rectangle viewfinder) {
            Shape stencil = Shape.subtract(mask, viewfinder);
            stencil.setFill(MASK_TINT);
    
            return stencil;
        }
    
        public static void makeDraggable(final Node node) {
            final Delta dragDelta = new Delta();
            node.setOnMousePressed(new EventHandler() {
                @Override
                public void handle(MouseEvent mouseEvent) {
                    // record a delta distance for the drag and drop operation.
                    dragDelta.x = mouseEvent.getX();
                    dragDelta.y = mouseEvent.getY();
                }
            });
            node.setOnMouseReleased(new EventHandler() {
                @Override
                public void handle(MouseEvent mouseEvent) {
                    node.setCursor(Cursor.MOVE);
                }
            });
            node.setOnMouseDragged(new EventHandler() {
                @Override
                public void handle(MouseEvent mouseEvent) {
                    node.relocate(
                            mouseEvent.getSceneX() - dragDelta.x,
                            mouseEvent.getSceneY() - dragDelta.y
                    );
                    node.setCursor(Cursor.NONE);
                }
            });
            node.setOnMouseEntered(new EventHandler() {
                @Override
                public void handle(MouseEvent mouseEvent) {
                    if (!mouseEvent.isPrimaryButtonDown()) {
                        node.setCursor(Cursor.MOVE);
                    }
                }
            });
            node.setOnMouseExited(new EventHandler() {
                @Override
                public void handle(MouseEvent mouseEvent) {
                    if (!mouseEvent.isPrimaryButtonDown()) {
                        node.setCursor(Cursor.DEFAULT);
                    }
                }
            });
        }
    
        private static class Delta {
            double x, y;
        }
    
        public static void main(String[] args) { launch(args); }
    }
    
  • Debug the event f:\mightysilt_win64\shared\adobe\mediacore\mediafoundation\api\inc\keyframe

    Hello everyone,

    I just stumbled upon this very annoying problem:

    Premiere Pro CS6 could not load more my project. It gives the following error message:

    Premiere Pro has encountered an error.

    f:\mightysilt_win64\shared\adobe\mediacore\mediafoundation\api\inc\keyframe

    ep.png

    My automatic backup files all refuse to open which gives another error
    .. \.. \src\TickTime.cpp-364

    When I press to continue saying that the project could be damaged or contain obsolete items.
    I don't know what that means...

    ep2.png

    I don't know what I only lasted until the problem started, except for adding some layers (lightstreaks) the file rendering and stop so that the thought "I'll do it later."

    What a mistake. The projectfile opened not more when I got home. All my backup automatically now gives similar errors.

    I got warpstabilizer on some clips, but would gladly give up if there is a way to open these files. I can't import to a new project. Essentially the files refuse to open all possible means.

    You can find my latest projectfile here: jajageweetmaarnooit.prproj - Google Drive

    I'm desperate, this movie must be delivered tomorrow and I have to start all over again.

    Hi Jonas, and all on this thread.

    Thank you

    Kevin

  • Is it too late to change the preview thumbnails, once the beforeSave event?

    My goal:

    I need to display nonprinting layers in the preview thumbnails of my .indd files. We produce print jobs that will post processing applied to them (thermography and cutouts glued on the printed cardstock). Our .indd files have layers containing images of these post production so that we can determine the alignment and spacing for the final product.

    Here are the graphics are placed in the nonprinting layers so that they do not print. However, InDesign generates the preview thumbnails that do not contain these nonprinting images. It is a problem for us because we can't tell the difference nuanced between soley by their similar indd files preview images.

    My goal is to register somehow these nonprinting layers in the image preview thumbnail.

    What I've done so far:

    I have a startup script which records for the beforeSave and afterSave events. Before that the same it marks all layers not printable are printable (printable property = true). AfterSave event then this cancels by defining these layers to unprintable. I followed what layer was initially not printable adding a moniker the layer name.

    What does not work:

    When I run a script which marks the layers as printable records, then cancels printable changes everything works perfectly. The thumbnail preview is exactly what I want.

    However, when I run as a startup for events script beforeSave/afterSave. this fails:

    • Success: The beforeSave correctly updates the print property, then changes the name of the layer. This is as expected and work well.
    • Success: the afterSave properly resets the property printable and changed the name of the layer. This is as expected and work well.
    • Failed: Thumbnail preview of the file reflects not the printable = real peroperty of affected layers.

    My Question:

    From what I saw above it seems that the preview image is determined before the beforeSave event fires.

    Question 1: Is it true?

    Question 2: How can I assign printable layers properties whenever there is a backup?

    Last resort I could intercept any sequence of keys CTRL + S or the file-> Save menu option and call my original script (as described above). I would avoid this because it is fragile and less elegant.

    Follow the question: can anyone show me what is real workflows for these events? For example what InDesign is then his backup work and at what points it fires events beforeSave and afterSave?

    Follow-up:

    I think I solved the problem. Wow, Adobe, you could do better than that.

    My solution is during the event "beforeSave", create a new textframe object. Fill it with text empty of meaning. Position somewhere predominently on the first page where it will be visible. Then remove the textframe.

    This is apparently enough to ID to render the thumbnail overview. So my entire solution:

    • In a beforeSave event

      • change my "unprintable" layers to print.
      • Then, create textframe, add text, place it in the middle of the page, and then remove it
    • AfterSave event
      • change diapers updated back to "unprintable".

    As stupid and hacky because it seems to me, it seems to work on ID CS6 for Windows.

  • Window type "palette" and onClose event.

    Hi friends

    I m having a problem with an onClose event in a panel type "palette." Let´s try to explain the problem.

    Suppose I have this unique construction:

    var myDialog = new window ("palette", "My dialog box", undefined, {closeButton:false});})

    var bt = myDialog.add ('button', undefined, 'Ok', {name: 'ok'});

    myDialog.onClose = function() {}

    for example: app.activeDocument.layers.add ();

    };

    myDialog.show ();

    If I change the window to type 'dialogue', everything seems preety good, but if I keep the dialogue as a "palette" box, and then the 'Ok' button does not close the dialog and, of course, the onClose does not.

    PS: I need the onClose because event I want closing code executed even if the user press "ESC" rather than use the OK"" button.

    No idea how to handle or an alternative to make the button and onClose works?

    Thank you very much

    Best regards

    Gustavo.

    It does not work because the pallets and Illustrator don't communicate with each other, to call illustrator in a palette, you MUST use BridgeTalk, search on this forum, there are many examples.

  • How to get the event target?

    I recorded the event mask depending on:

    App.notifiers.Add ("Hd",.. mpfprojectdir\dev10\src\csharp\projectbase.file path);

    Now, how can he obtain the object that triggered the event?  [app.active document.activeLayer] give me only the layer ".  Of course, this does not work in a scenario where the user hides a layer that is not selected.

    I'd appreciate any help!

    Action handler has no direct access to objects in the object model. It has its own class and object. Sometimes, there may be a more direct access by name. If the event descriptor was the index of the layer or the ID you can use instead of the name.

    Sorry, when I threw together for you I only tested hidding layers that do not have the activeLayer. I don't think that the alert is empty is because the top layer was hidden. I think it's because the activeLayer was hidden so the actionReference is different.

    Try this (which seems to work for me with both)

    try {
        if (arguments.length >= 2) {
        var desc = arguments[0];
        var event = arguments[1];
        // make sure it's the hide event
        if (event == charIDToTypeID('Hd  ')) {
            // get the list of what was hidden
            var list = desc.getList(charIDToTypeID('null'));
            // get the actionReferences from the list
            var ref = list.getReference(0);
            var psClass = ref.getDesiredClass();
            // make sure it was a layer that was hidded
            if(psClass == charIDToTypeID('Lyr ')){
                // check to see what is in the reference
                var dataEnum = ref.getForm();
                // should either be an enum if activeLayer
                if(dataEnum == ReferenceFormType.ENUMERATED) {
                        alert(app.activeDocument.activeLayer.name);
                }else{// or the layer name
                    alert(ref.getName());
                }
            }
        }
      }
    } catch (e) {
      alert( "Error: " + e + ":" + e.line );
    }
    
  • Positioning of layers in DW8

    Need HELP!

    I work in Dreamweaver 8 and trying to create a series of layers activated by the mouse over events. I would like the layers appear in a specific area of the page and they are default absolute 0.0. I tried to change the position for the parent and the appropriate coordinates of T and L. It will not work.

    ANY advice here would be more than welcome! I apologize for this issue, I've exhausted all my resources I had available already.

    TY.

    Thought of it on my own.  Thanks for the offer of help!

  • Help with buttons to access the loaded layers

    Hi all... Using Flash CS3 and AS3 to build a learning module that loads different layers of SWFs of the buttons on the main screen.  Got this work without problems.  What I want to do is to add buttons to provide learners of features, specifically a next button, the "back" button and a check box that will keep progress automatically.  I did some massive research and so far nothing seems to work.  Seems like I am going so far is the main layer, not the new layers as they are loaded.  Here is what I tried with the back button; the next button uses nextFrame and Handler2.  It does not work.  Not even sure how to start with the check box for advance auto.  Any help would be GREATLY appreciated.

    Mark

    back_btn.addEventListener (MouseEvent.MOUSE_DOWN, mouseDownHandler1);

    function mouseDownHandler1(event:MouseEvent):void

    {

    MovieClip (root) .prevFrame ();

    }

    If you try to get the swf loaded in advance and not the main timeline, you need to target the loader.content, not the root, as in:

    MovieClip (loader.content) .nextFrame ();

Maybe you are looking for