PDA

View Full Version : Dynamic Tooltip with sides detection



Felixz
November 9th, 2007, 06:54 PM
This class creates an animated tooltip which automaticaly detects if it won't fit on display and automaticallyshow from other side...
It also can be showed after some time in ms, and has three experience levels... and it also has unique feature as loading SOUNDS with progress bar (showing both load and play progress).
U don't need to add it to display list, just pass the container in constructor.
To use it just invoke:

new Tooltip(DisplayObjectContainer,text:String=null,ti me:uint=0,sound:String=null);
U have also some interfaces:

public static function get bitmapFilterQuality():int {
public static function set bitmapFilterQuality(number:int):void {
public function get text():String {
public function set text(text:String):void {
public function set soundURL(sound:String):void {
public function get size():Number {
public function showDelayed(time=400):void {
public function show():void {
public function hide():void {
public function invalidate():void {
And static variables:

public static var experienceMode:String=SMOOTH;
public static var embedFonts:Boolean=false;
And constants:

public static const FAST:String="fast";
public static const BALANCED:String="balanced";
public static const SMOOTH:String="smooth";
To preview Tooltips visit http://felixz.dl.interia.pl/ and rollover texFields in Panel Sterowania window...
To see what i meant by "automaticaly detects if it won't fit on display..." just drag that window near upper right corner and see the difference.
Sorry but my english is bad..
I made an update resolving displaying tooltip when using with sound (I overlooked it) Also I merged all classes into one...

g.necionis
November 10th, 2007, 06:33 AM
Hello,
any exmaple???

Felixz
November 10th, 2007, 07:18 AM
I meant this link in my synature:
http://felixz.dl.interia.pl/

Felixz
November 10th, 2007, 10:51 AM
I uploaded a bugfix...
And if u have some requests, please do so.

g.necionis
November 10th, 2007, 05:46 PM
thanks! :)

g.necionis
November 10th, 2007, 06:03 PM
:)

Felixz
November 13th, 2007, 12:51 PM
Now all is in one class: Default font is SegoeUI. If you want to change drawing pattern (no filters, no alpha rtc.) change static variable Tooltip.experienceMode to one of static constants and call invalidate() on every tooltip (those on displayList). U can also set filter quality by czhanging Tooltip.bitmapFilterQuality (default 3 in Flash)

Felixz
November 17th, 2007, 11:17 AM
oops Attachment got wild. Now it should be OK.