I have two shapes in my canvas using CreateJS. In each shape I included a hit area with the own shape with a mouseover listener. Two shapes are one above the other. When I click into the shape, I received the two callbacks. It's possible to get only the callback to the visible shapes?
CreateJS hit only visible elements
386 Views Asked by RafelSanso At
1
There are 1 best solutions below
Related Questions in SHAPES
- How to create below design in css
- How to make a shape selectable within WinForm
- Triangles (CSS) that Grow with the Inside Text?
- Python Turtle custom shape from coordinates
- How to call setState using class instance
- Existing shapes not visible while creating new shape in Window Form application
- Custom Shape in flutter Like OvalShape
- I only know that when I add the numbers for a square or rectangle it shows that my shape is a parallellogram
- migrated from pyglet 1.5 to 2.0 and now can't use colors. I looked at the documentation and it says use a tuple but tuples give me this error?
- How To Find Open Spaces Given List Of Rectangles
- What is the simplest most effective way to write a code in C that creates a symmetric five-pointed star made out of asterisks?
- Drawing rectangle on angled line in Tkinter Python
- R: Using ggplot, how to make scatterplot with different shapes in 2 separate variables?
- View generating Shape based on enum
- Updating all images in a Word Doc (.doc) using C#
Related Questions in CREATEJS
- createJS does not reconize currentTarget
- How to get coverage from React Create App frontend and NodeJs backend by running java Selenium tests?
- Using multiple libraries with one canvas in Adobe Animate
- Need to change text to upper case in JavaScript - createJs
- EaselJS: update tweens as fast as possible while playing MovieClips at 30 FPS
- Creating a path for CreateJS MotionGuidePlugin
- Weird fill + stroke alpha in CreateJS
- Create a BitmapText in PixiJS starting from single .png images where each image corresponds to a char
- How can I force the next tick immediately in CreateJS 1.0.0+?
- How do I over-ride the alpha settings on the createJS Container children?
- keydown event not firing in google sites/wix when using easel.js
- Angular . Problem to create new component
- TweenJS motionguide draw a curved line
- Import external script with angular and storybook 7
- ENOENT (error -4058) during create-react-app
Related Questions in EASELJS
- Is PixiJs is good for creating Graph to plot large number of data points with zoom and scroll
- EaselJS: update tweens as fast as possible while playing MovieClips at 30 FPS
- EaselJS Box2d Sockets.io app: object moving unexpectedly
- Weird fill + stroke alpha in CreateJS
- How can I force the next tick immediately in CreateJS 1.0.0+?
- keydown event not firing in google sites/wix when using easel.js
- Create.js/Easel.js - createjs.Bitmap() - Getting SVG to load at original size?
- Keep angle between 1 and 180 degrees
- Drag object around a half circle on mouse over - Adobe Animate HTML5 Canvas
- Drag object around a circle on mouse over - Adobe Animate/Create.js/Easel.js
- Set button state - Create.js/Easel.js
- Is it possible to add a Gradient Filter to a Bitmap with EaselJS?
- How can I check if a symbol/MC is a child of another symbol/MC?
- Can I Save only a specific item of an HTML canvas?
- How to ignore right click on Easel JS
Related Questions in HIT
- Phaser Hit boxes are invisibly to the right, what gives?
- how do I make my javascript program to ask user to hit any key to exit?
- Get the index of the first element in an array that meets the specified condition
- Create a new value output if the values of another column do not match
- I am trying to create a hit using html file for amazon mturk
- not able to use hit detection while using pygame and tkinter together
- How to print the best matching hit in the BLAST search? / BioPython
- How to add a click event on amchart NavigationBar?
- How select hits composed entirely of Compton scattering events?
- 'Old fashioned' hit counter
- Regular expression to limit the character found to 2 or 3 not more
- How to understand when a activerecord query is executed?
- Different Counter Value for Each Page on Website
- scanf without newline (C programming)
- Hit detection between 2 moving objects in CreateJS
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Similar to the DOM, the way mouse interaction works is to bubble up the display list, which excludes elements that are not part of the hierarchy chain of the event target.
This means siblings, or elements of other display lists that are underneath will not receive event handlers (which is what you described), and you will not receive mouse events for elements that are not the target of the mouse event.
However, you can wire up your own interaction fairly easily using
getObjectsUnderPoint, which tells you what is under the mouse.Here is a quick sample: http://jsfiddle.net/y8jhb26x/
Note that you can add the mouse event to any container you want to constrain what objects will trigger this check (I just used stage), but when you call
getObjectsUnderPoint, it will return anything under the mouse. If you want to only check items in that container, you can use thecontainsmethod to filter out unwanted children:You can also use arguments on
getObjectsUnderPointto filter out items with mouse handlers, or respect themouseChildren/mouseEnabledproperty, which is how actual mouse interaction works.Hope that helps!