Log in

View Full Version : close the window



Assad
06-17-2008, 10:42 PM
i use window to viow my pics.....

------------------------------------
import mx.containers.Window;

var my_button:mx.controls.Button;

System.security.allowDomain("http://www.helpexamples.com");

var buttonListener:Object = new Object();
buttonListener.click = function(evt_obj:Object) {

var my_win:MovieClip = mx.managers.PopUpManager.createPopUp(evt_obj.target, Window, true, {title:"Salam", contentPath:"image1.jpg",closeButton:true});
my_win.setSize(320, 240);
};

my_button.addEventListener("click", buttonListener);
-------------------------------------------------------
but i cant use closeButton...
help pls..

Medyman
06-18-2008, 01:15 PM
What is closeButton? createPopUp has the following syntax:


createPopUp(parent:DisplayObject, className:Class, modal:Boolean = false, childList:String = null):IFlexDisplayObject

I think what you're looking for is the removePopup() method (http://livedocs.adobe.com/flex/2/langref/mx/managers/PopUpManager.html#removePopUp()).

Assad
06-19-2008, 08:19 PM
please write a script for me which open a pop-up window by pushing a button and has the ability to include an image in it..,also i had a problem in enabling the close button, so please check if it works properly or not. tnx

Medyman
06-20-2008, 03:16 PM
please write a script for me which open a pop-up window by pushing a button and has the ability to include an image in it..,also i had a problem in enabling the close button, so please check if it works properly or not. tnx

Sorry, I don't just create scripts for people. If you have a specific question, I'd be happy to demonstrate the technique and/or troubleshoot the code.