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

Simple function for tooltip creation in Actionscript 3

Guest
Jun 01, 2011 Jun 01, 2011

Hi,

I'm new to Actionscript 3 and I am currently creating an application in which I need to use tooltips.  I thought it would be straightforward because in VBA and other object-oriented languages, you  have a tooltip property of a button and all you need is enter the text there (or else program it, which is very straightforward).  However, I cannot manage to create tooltips in Flash using AS3, I have tried 6 different (quite complex) methods from code which I found online but could get none of them to work.  Can someone please give me a simple function which takes as parameters the tooltip text and the original button and then the function just creates the tooltip automatically once it's called? Any help would be greatly appreciated. Thanks.

TOPICS
ActionScript
5.3K
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

correct answers 1 Correct answer

Community Expert , Jun 04, 2011 Jun 04, 2011

if both the add and remove functions are on the same timeline you won't see that error message.  but i see a typo:


// create one buttonObj for all your buttons

var buttonObj:Object={};

//////////////////////////////////////change nothing above ////////////////////////////////////

//the next 3 lines need to be done for all your buttons

buttonObj[yourbutton] = ["hello",2,2];

yourbutton.addEventListener(MouseEvent.MOUSE_OVER,addToolTipF) ;

yourbutton.addEventListener(MouseEvent.MOUSE_OUT, removeToolTipF);

...
Translate
Community Expert ,
Jun 20, 2011 Jun 20, 2011
LATEST

that's exactly the issue i mentioned before about mousing out too quickly.


so, start a new thread.

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