Be the first to write a review
Creating a Tool tip Movie Clip
Tool tips are a useful feature of most software applications. They display messages to users for navigation purposes or to indicate functionality. Whenever you use Flash, you’ll see a tool tip when you point at an icon in the Toolbox.
In this tutorial, I’m going to show you how to make a tool tip movie clip that you can reuse in your Flash applications. You’ll be able to change the text and the tool tip background colour. The tool tip will appear when you move your mouse over an instance on the Stage. It will follow the position of the mouse and will disappear when you remove the mouse. You’ll be able to have different tool tips for each instance and the tool tips will automatically resize themselves depending on the text that you assign.
I’ve used ActionScript 1.0 for the code in this tutorial so you’ll need at least Flash MX to complete it. I’ve assumed that you’ve got some experience at working with ActionScript and that you know how to add code in the Actions panel. I’ll cover how you might achieve the same functionality with AS 2.0 classes in a later article.
You can download the resource files from the blue Properties box that contains the article PDF. There's a heading titled Code Download and you can click the Details link next to it to get the zip file.
Note: If you have difficulties downloading the source files or PDF, you might have a problem with your cookies. Delete the cookies from your machine and try again. In Internet Explorer, you can do this by choosing Tools > Internet Options… and clicking the Delete Cookies… button on the General tab.
We’ll need to create a symbol in the Library and write some ActionScript to generate the tool tip. We’ll get started by creating the Library symbol. It will be a movie clip that includes a text field for the tool tip text.
Sas Jacobs
Hello. I'm the Principal of Anything Is Possible, an Australian web development business specialising in web applications development and training. I'm interested in using Flash with dynamic content and I've presented at a number of International conferences on topics relating to applications development, XML and scripting components. I have recently released my second print book Beginning XML with DOM and Ajax to match the first one - Foundation XML for Flash. I have a business web site
and a personal web site.