# Repositioning Tooltip

**URL:** <https://forum.kirupa.com/t/repositioning-tooltip/311869>\
**Category:** flash\
**Created:** [July 19, 2010, 7:47am UTC](https://forum.kirupa.com/t/repositioning-tooltip/311869 "2010-07-19T07:47:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![holborner](https://avatars.discourse-cdn.com/v4/letter/h/df788c/32.png) [@holborner](https://forum.kirupa.com/u/holborner)\
**Post date:** [July 19, 2010, 7:47am UTC](https://forum.kirupa.com/t/repositioning-tooltip/311869/1 "2010-07-19T07:47:03Z")

</div>

Hi all,  
I’m setting up a row of thumbnails that will show a tooltip TextFormat object on rollover.

```auto

thumbContainer.addEventListener(MouseEvent.MOUSE_OVER,showTitle);

function showTitle(e : MouseEvent ):void {
            var thumb:MovieClip=e.currentTarget as MovieClip;
            
            var myFormat:TextFormat = new TextFormat();
            myFormat.font=myFont.fontName;
            myFormat.size=12;
            myFormat.color=0xFFFFFF;
            myFormat.letterSpacing=0;

            tooltipTxt.autoSize=TextFieldAutoSize.CENTER;
            tooltipTxt.defaultTextFormat=myFormat;
            tooltipTxt.embedFonts=true;
            tooltipTxt.selectable=false;
            tooltipTxt.text=thumb.titleTxt;
            addChild(tooltipTxt);
            tooltipTxt.alpha=0;

            tooltipTxt.x=thumb.x+thumb.width;

            TweenLite.to(tooltipTxt,0.5,{alpha:1,ease:Quint.easeInOut});
        }

```

However when the screen is resize and the thumbnails are repositioned. The tooltips are still referencing to the old position. I tried to ‘refresh’ the positions by adding the same EventListener again on resize. But didn’t work ☹

Any pointers would be great! Thanks in advance!

```auto

public function resizeStage(evt:Event) {
           
            container_mc.y=stage.stageHeight-100;
            container_mc.x=stage.stageWidth/2 - (1050/2);
            //reset thumbnail position by refreshing event listeners
            for (var i:Number=0; i<container_mc.numChildren; i++) {
                container_mc.getChildAt(i).addEventListener(MouseEvent.MOUSE_OVER,showTitle);
            }

        }

```
