Hi i am trying to show my popup on the image mouse over it is showing fine when i trying mouse over right side last images popup is going out of the screen Here TalentInfoPopUp is **TitleWindow
This is my sample code
private static var staticWindow :TalentInfoPopUp = null;  
private static var visibleWindow:TalentInfoPopUp = null;
public static function show(t:Object, parent : DisplayObject, x:Number , y:Number):void
{
if(staticWindow == null)
{
visibleWindow = staticWindow = PopUpManager.createPopUp( parent , TalentInfoPopUp , false) as TalentInfoPopUp;
    }
    else if(visibleWindow == null)
    { 
        visibleWindow = staticWindow;
        PopUpManager.addPopUp(staticWindow, parent, false);
    }
    PopUpManager.centerPopUp(staticWindow);
    staticWindow.talent = t;
    staticWindow.x = x;
    staticWindow.y =y;      
    Po开发者_如何学PythonpUpManager.bringToFront(staticWindow);
    staticWindow.talent = t;
    staticWindow.move(x,y);
    staticWindow.callLater(staticWindow.setPosition,[x,y]);
    //staticWindow.setPosition(x,y);
}
private function setPosition(nx:int,ny:int):void
{
    var maxWidth:int =  stage.width ;
    var maxHeight:int = stage.height;
    if(nx>maxWidth-width)
    {
        nx=nx-width;
    }
    if(ny>maxHeight-height)
    {
        ny=ny-height;
    }
    this.move(nx,ny); 
}
Try using systemManager.screen.width and systemManager.screen.height instead of stage.width and stage.height; also learn about the localToGlobal and globalToLocal methods and how to use them.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论