troubleshooting Question

Add close button to loader AS3

Avatar of ST3VO
ST3VOFlag for United Kingdom of Great Britain and Northern Ireland asked on
Adobe Flash
11 Comments1 Solution3108 ViewsLast Modified:
Hi all,

I am creating a loader (window) at runtime in AS3 but I need to add an X (close button) on the top-right corner.

Can anyone help please.

Please see code below.

Thanks

ST3VO

var myMapWindow:Sprite = new Sprite();
var myText:TextArea = new TextArea();
 
addChild(myMapWindow);
myMapWindow.addChild(myText);
myMapWindow.visible=false;
mapbtn.addEventListener(MouseEvent.CLICK, clickHandlermapbtn);
 
	function clickHandlermapbtn(eo:MouseEvent):void {
	myText.editable = false;
	myText.height = 480;
	myText.width = 645;
	myText.move(125,110);
	myText.setStyle("fontFamily", "Arial");
	myText.htmlText = "<b>Reference Number:</b> "+ nuTitle + "<br><br>" + 
	"<b>Description:</b> " + nuDescription + "<br><br>" +
	"<img src='_map/map1.jpg'><br><br>" +
	"<b>Location:</b> " + nuLocation + "<br><br>" + 
	"<b>PostCode:</b> " + nuPostcode + "<br><br>" + 
	"<b>Contact Location:</b> " + nuCompanyLocation;
	
 
 
myMapWindow.visible=true;
 
 
    
}
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 11 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros