Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set position of popped-up Window component??

Status
Not open for further replies.

basuraman

Technical User
Mar 19, 2005
10
0
0
US
hi!
anyone know of a way i can set a popup'd window (used the popupManager) to open at a certain location? right now it looks like it pops up at 0,0 - upper left corner - of my loaded (it's parent) movie. how can i set it to, say 200, 100?

here's my popup code:
Code:
function OpenPop1() {
	var popUpWin = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, false, {closeButton:true, title:"copyright 2005, Russell Perkins.", contentPath: _root.rppDataSet.image01});

	sizerPop = new Object();
	sizerPop.handleEvent = function(evtObj){
	if(evtObj.type == "complete"){
    popUpWin.setSize(popUpWin.content._width, popUpWin.content._height + 25);
	}
}

	close = new Object();
	close.click = function(){
	popUpWin.deletePopUp();
	}

	popUpWin.addEventListener("complete", sizerPop);
	popUpWin.addEventListener("click", close);
}

any ideas?

thanks!
josh
 
Code:
function OpenPop1() {
    var popUpWin = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, false, {closeButton:true, title:"copyright 2005, Russell Perkins.", contentPath: _root.rppDataSet.image01});
    [highlight]popUpWin._x = 200 //X location[/highlight]
    [highlight]popUpwin._y = 200; // Y location[/highlight]

    sizerPop = new Object();
    sizerPop.handleEvent = function(evtObj){
    if(evtObj.type == "complete"){
    popUpWin.setSize(popUpWin.content._width, popUpWin.content._height + 25);
    }
}

    close = new Object();
    close.click = function(){
    popUpWin.deletePopUp();
    }

    popUpWin.addEventListener("complete", sizerPop);
    popUpWin.addEventListener("click", close);

}

Hope it helps.


Wow JT that almost looked like you knew what you were doing!
 
that does it. i knew it was something simple. Thanks Pix! i also heard you can use the UIObject.move method too. should do the same thing, huh?

cheers,
josh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top