troubleshooting Question

Flash cs3 - using loadClip to load image into empty clip and I want to know the _width of the clip after the image is loaded

Avatar of Donzella
DonzellaFlag for United States of America asked on
Adobe Flash
4 Comments1 Solution1203 ViewsLast Modified:
I have an empty movieclip that I am loading an image into dynamically. I am using a listener to know when the image is loaded completely and then I want to know the width and height of that clip AFTER the image is loaded. My problem is, everything I try the clip still stays it is 0px wide and 0px high even after the image is loaded. Does loading an image into the clip not change it's dimensions? Is there anyway to tell what size the image is inside the clip after it's loaded? Thank you.
var mcLoader:MovieClipLoader = new MovieClipLoader();
		var mclListener:Object = new Object();
		mclListener.onLoadComplete = function(target_mc:MovieClip, status:Number):Void {
			trace(_root.ThumbClip._width + ' x ' + _root.ThumbClip._height);
		mcLoader.loadClip('http://' + _root.t, _root.ThumbClip);
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 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 4 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