my removeMovieClip doesnt work onRollOut...
Can somebody help me with this. My removeMovieClip doesn't work onRollOut...Also if somebody can tell me how to change the color of the movie clip onRollover.
I have two MC with instance name as loc1, loc2 (stored inside mainMap.map.pan), now when i rollover to these, there is a toolTipMC which displays with title on dynamic text box with instance name "tip" (toolTipMC.tip) and image attached to movie clip with instance name "imgHolder" (toolTipMC.img.imgHolder) and some details showing on dynamic text box with instance name "detail" (toolTipMC.detail).
Here is the code:-
locs = {loc1:{tip:" Canada ", detail:" Canada is Canada :P", img: "loc2"}, loc2:{tip:" North America ", detail:" North America is North America, llalalalala, hahahha", img: "loc3"}};
mc = mainMap.map.pan;
toolTipMC._visible = false;
toolTipMC.tip.autoSize = "right";
toolTipMC.tip.wordWrap = false;
toolTipMC.tip.border = false;
detailMC._visible = false;
detailMC.detail.autoSize = true;
for (i in mc) {
if (typeof (mc[i]) == "movieclip" && i != "click") {
myBtn = mc[i];
myBtn._alpha = 0;
this.useHandCursor = false;
myBtn.txt = locs[i].tip;
myBtn.txt2 = locs[i].detail;
myBtn.img = locs[i].img;
myBtn.onRollOver = function() {
if (miniMap._visible) {
this.useHandCursor = false;
var point = {x: (this.mouseX ), y: (this.mouseY)};
this.localToGlobal(point);
toolTipMC._x = point.x;
toolTipMC._y = point.y;
toolTipMC.tip.text = this.txt;
toolTipMC.detail.text = this.txt2;
toolTipMC.img.imgHolder.attachMovie(this.img, "img", 10);
toolTipMC._visible = true;
}else{
this.useHandCursor = false;
}
};
myBtn.onRollOut = function() {
toolTipMC._visible = false;
this.img.removeMovieClip("img");
};
myBtn.onPress = function() {
if (miniMap._visible) {
toolTipMC._visible = true;
slider.setValue(100);
PanMapCenterTo(this._x - (baseSize.width / 4) + this._width, this._y - (baseSize.height / 4) + this._height);
}
};
};
}