didnt mean to undermine you there ilyaslamasse but alethos nailed the reasoning. Its also maintains functionality in an onClipEvent(mouseMove) handler (which relates to alethos EDIT addition)
but back to the to the hover captioning(ie tool tip ). This is a method for making this work a little easier for you
concept:
add a constant functionality to all buttons, namely caption display.
Now what this does is adds something which will effect ALL buttons. May not be your cup of tea, but if you have a lot of caprions and a lot of buttons with captions, it could make things easier for you, especially when you dont have to add a specific display caption function call to each button you want to use it. with, not to mention it can be easily changed from one event to another without having to re-position all the ‘show caption’ calls in the new events.
anywho, its achieved by using addProperty to intercept an object (in our case Button) event call and secretly include in it an action to be present in all object calls of the event.
code like so
getROver = function(){
_root.caption.gotoAndStop(this._name);
return this.$onRollOver;
}
setROver = function(func){
this.$onRollOver = func;
}
getROut = function(){
_root.caption.gotoAndStop(1);
return this.$onRollOut;
}
setROut = function(func){
this.$onRollOut = func;
}
Button.prototype.addProperty("onRollOver", getROver, setROver);
Button.prototype.addProperty("onRollOut", getROut, setROut);
so what this does is intercepts every onRollOver and onRollOut call any button makes, keeps its actual set function in a function named $onRollOver or $onRollOut respectively and inserts the _root.caption script before returning (and in essence calling) the actual saved/set onRollOver/out scripts. What the caption scipt is doing is simply (on roll over) telling the caption clip in root to goto and stop at a frame with the label of the same name of the button name. If the button doesnt have a name, no frame is derived and it stays put. and (on roll out) telling the clip to return to frame 1 where its blank and has no tool tip.
So with this code installed, all you would have to do is make a caption clip and label frames which coorelate to their respective button instances (frame one clear (or default) of course). For the buttons that dont use it, you dont have to worry about since they do nothing anyway.
But like I said before, you can easily convert these tips to be on a press and release basis by just changing the addProperty lines to use them instead of onRollOver and onRollOut, among other things…
so I thought Id throw that out there. Nice to know even if not in this context…
despite the fact that Im “back” I have to go yet again :\