Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Flash - ActionScript

Class question for button movie clip

 
Jump to:  
 
crisbosch
PostPosted: Thu May 22, 2008 8:11 pm    Post subject: Class question for button movie clip
       
Hi,I'm creating an interactive flash map that will list 70+ locations. I want
to link a class to a movie clip button that will be placed on the stage over 70
different instances(b1-b70). On roll over each has to display a tooltip with
the relevant location info for that point. I created the tooltip movie clip
which will display this info and placed it on the stage. The info will be
included in an array. The TooltipClass(see code) is linked to the movie clip
button, but it's not responding accordingly. The hideTip function works and
the trace command in the showTip function is executed, so both functions are
triggered. And I don't think it's a scope issue since the hideTip function
works and communicates with the tooltip movie clip. But the tooltip with the
information is not showing on roll over, and this is my problem. Any help in
this matter would be greatly appreciated.
Thanks!

class TooltipClass extends MovieClip {
public function TooltipClass(){
this.onRollOver = this.locator;
this.onRollOut = this.hideTip;
}

private function locator(){
var array_text:Array = new Array("location1","location2","location3");

showTip(array_text[Number(this._name.substring(this._name.indexOf("b")+1,this._n
ame.length))], 1);

function showTip(tipText, orient) {
_parent.tooltip_mc._x = _xmouse;
_parent.tooltip_mc._y = _ymouse;
_parent.tooltip_mc._visible = true;
_parent.tooltip_mc.gotoAndStop(orient);
_parent.tooltip_mc.tiptext.text = tipText;
_parent.tooltip_mc.tiptext2.text = tipText;
trace("over me");

onMouseMove = function(){
_parent.tooltip_mc._x = _xmouse;
_parent.tooltip_mc._y = _ymouse;
updateAfterEvent();
}
}
}

private function hideTip(){
_parent.tooltip_mc._visible = false;
}
}
 

 
kglad
PostPosted: Thu May 22, 2008 8:57 pm    Post subject: Re: Class question for button movie clip
       
showTip() shouldn't be in locator().
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

hotele zakopane Katalog Firm gratka Kochanowski Jan wiersze nieruchomości łódź