Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Dynamic toolTip while drag&drop object

Engaged ,
Jul 28, 2014 Jul 28, 2014

Hello,

I got this problem:

1. objectA in containerA and objectB in containerB

2. objectB has mouseOver listener, which shows toolTip with calculated number of objects in containerB

3. I move objectA to containerB with drag&drop. Now I have two situations depending on when I release objectA from drag:

3a. While having objectA under mouse cursor (it's still during drag operation) I move mouse over objectB and after a while I see toolTip showing "1 object".

I drop objectA and I programatically change the "ToolTipManager.currentToolTip.text" property to show "2 objects". And it works fine.

3b. While having objectA under mouse cursor (it's still during drag operation) I move mouse over objectB and drop objectA at once. The toolTip doesn't have time to show anything. But after a while (I still have mouse over objectB) I see toolTip showing "1 object". I have to move the mouse out and over again to see "2 objects".

Situation in 3b occurs because when I move objectA over objectB it catches mouseOver event and prepares text with "1 object". But this time during drop operation I cannot change the "ToolTipManager.currentToolTip.text" property because when I drop the item there is no toolTip to edit, "ToolTipManager.currentToolTip = null".

And since the mouse is still over the objectB it's still going to show "1 object" which was prepared earlier.

I've tried to use bindable variable as toolTip text in step 2. but it doesn't work. 

So I have no more ideas how to force the text change in situation 3b. Any help would be appreaciated

TOPICS
ActionScript
424
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 28, 2014 Jul 28, 2014

update your text immediately when an object is dropped

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 28, 2014 Jul 28, 2014

Thanks kglad,

I can't update text because there is no toolTip to update at the time of dropping the object.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 29, 2014 Jul 29, 2014
LATEST

then use a variable to store the what you want to display.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines