troubleshooting Question

Keep original stage dimensions of loaded swf

Avatar of Alex500
Alex500 asked on
Adobe Flash
6 Comments1 Solution706 ViewsLast Modified:
Hi all ive jsut made an image gallery in another swf that I want to load into a website. The problem is when I load the swf in it looses its stage dimensions of 540 x 380, which means all the content that was off the stage is now visible in the document it is loaded into which is much larger 1200 x 800. Ive seen some stuff about masking but due to the way this is developed id like to do it with actionscript. How would i go about keeping the loaded swfs original stage dimensions.  my loader code is posted below. is it not possible to mask it with actionscript?


/*Load in external swf */
				var loadSwf:Loader = new Loader();
				var requestSwf:URLRequest = new URLRequest("photo_gallery.swf");
				loadSwf.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
				loadSwf.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
				

				loadSwf.load(requestSwf);
				
				
				
				/* Add swf to stage */
				function onCompleteHandler (loadEvent:Event) {
					stage.addChild(loadEvent.currentTarget.content);
					
					
					
					
				}
				
				/* Progress tracking*/
				function onProgressHandler(mProgress:ProgressEvent) {
					var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
					trace (percent);
				}
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 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 6 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