Jump to content

Drag does not work when there is a Sprite underneath with onInputOver and onInputOut events


bali33
 Share

Recommended Posts

Hi guys,

 

I'm a Sprite that can be drag using the usual code : 

slot.inputEnabled = true;slot.input.enableDrag(false);

It's works very as expected as long as my sprite is not dropped above another Sprite which have onInputOver/onInputOut

content.events.onInputOver.add(this.onRevealElementOver,this);content.events.onInputOut.add(this.onRevealElementOut,this);

When my "slot" is dropped above my "content" Sprite I can't drag it - and the onInputOver callback function of the "content" Sprite is called.

 

As "slot" is above "content" I expected it to be draggable and prevent "content" onInputOver callback function to be called.

 

Is that normal ?

 

Thank you

Link to comment
Share on other sites

I just noticed that even if the "content" Sprite has no events (onInputOver/out) the problem persist. So it's not about events but there is something that prevent "slot" to be drag when above "content".

 

Any idea ?

 

Thank you

 

[EDIT] Ok - it seems that the issue appear when "concent.inputEnabled = true" 

Link to comment
Share on other sites

  • 4 weeks later...

A semi-related question: can I have the onInputOver event of a sprite fire while I'm dragging another sprite on top of it?

 

Edit: Only now I saw that upon initiating a drag, all other sprites have their input disabled (enableInput : false). I suppose this behaviour is intended, but is there an elegant way to override it?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...