Well it’s been a while, but I have been busy… My first post back is a custom tool tip component that is easy to use and customize. Grab the .swc below, add it to your library and follow the tips below to use it. This is free for anyone to use and just let me know if you have any questions.

To use this custom tooltip you will need to first add the swc to your library.
- RIght click on your Project folder in Flex Builder.
- Choose Properties, then Flex Build Path.
- Then Click on the Library path tab.
- Choose “Add SWC…” from the right hand side and browse to where you saved the swc.
- Note that you cannot move the swc once you start working with it, or you will have to relink it up so Flex Builder will find it.
- Now you are ready to access the simple component.
Below is a sample script block that you can copy and paste to use. Follow the comments for instructions.
<!--[CDATA[ //Import the Custom Event Class and the InfoBubble main class import com.connatserdev.events.ConnatserDevEventsimport com.connatserdev.utils.InfoBubble //Create a new instance of the InfoBubble public var newBubble:InfoBubble //Create a method to instantiate the InfoBubble - note that I am using creationComplete in the main application to call this. public function addBubble():void{ //Create a new InfoBubble and add the following required parameters //X, Y, Width, Heith, Background color, Text color, Arrow position 1, Arrow position 2, life of the bubble, string to show //Arrow position one and two options: "top", "bottom", "left", "right" //Combinations cannot be the same, for example use "top", "right" OR "right", "top" newBubble = new InfoBubble(20,20,200,40,0x000000,0xFFFFFF,"top", "left", 5, "This is a test") //Add the new bubble to the application. you can also add it to a specific container...just be sure to use "rawChildren" Application.application.rawChildren.addChild(newBubble) //Adds the eventlistener to remove the bubble once the life has expired. newBubble.addEventListener(ConnatserDevEvents.REMOVEBUBBLE, removeBubble) //Method to remove bubble once life has expired. function removeBubble(e:ConnatserDevEvents):void{ Application.application.rawChildren.removeChild(newBubble) } } ]]-->



Mon, Jun 15, 2009
0 Comments