troubleshooting Question

Background Image not resized if i resize the stage

Avatar of Member_2_4768634
Member_2_4768634 asked on
Adobe Flash
2 Comments1 Solution503 ViewsLast Modified:
Hello,

please can somebody help me?
I wrote some lines to load a background image and if i resize the browser window, the image has also to be resized. for resizing i use a class of Michel Vandersteege - that works. I have only a bug in my code, but can´t find it.

Thank´s in advance!

Regards,
Mario
public class xfiles extends MovieClip
	{
		.......
		.......
		.......
		.......
		.......
 
		public function xfiles():void {	
			this.preloadData("xxx", 0);
			stage.frameRate = 30;
        	stage.showDefaultContextMenu = true;
        	stage.scaleMode = StageScaleMode.NO_SCALE;
        	stage.align = StageAlign.TOP_LEFT;
	  		stage.addEventListener(Event.RESIZE, handleResize);
			loadBg();
		}
		
		private function loadBg():void {
			addChild(bg);
			this.setChildIndex(bg, 0);
		}
		
		private function handleResize(e:Event):void{
			bg.resize();
		}
		
		//stage.addEventListener(Event.RESIZE, handleResize);
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
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 2 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