You might want to build an "onLoadComplete" function in your class
that you call and set up a resize param that gets called after the
file is loaded. Or you could google "ImageLoader" and use that class.
It is a very nice class that dynamically loads and tracks progress. It
also smooths the dynamic image as well.
JAT
Karl
Sent from losPhone
On Jul 13, 2009, at 1:31 PM, noentourage <[email protected]> wrote:
I'm dynamically loading swf's or jpgs in to a loader class that I
wrote and
it works well with jpgs but
the loaded swf's get resized too large. I tried setting the size of
the
actual loader but that doesn't change anything.
My loader class takes the following params...
public function
ImageLoader(
img:String,w:Number,h:Number,sclImg:Boolean,showPrg:Boolean =
true)
img is the file string to load.
w: is the width of the file to load
h: is the height of the file to load
sclImg: Is true or false to scale the image. Set it to true if you
know the
image is larger than the w & h you pass in.
showPrg: is to show the progress bar or not.
I have a swf that is 700x460 and this contains a MovieClip that I
scaled
down to fit in these dimensions. The MovieClip contains and embedded
swf
that originally was built
by someone else at too large of a size (1024x768) to fit my main Flash
movie. It's a frame tween animation so it's going to take too long to
rebuild the original animation which is why I imported it into the
700x460
fla as a movieclip then scaled it down.
This is a weird behavior so I'm wondering if anyone has had this
problem or
knows of a simple fix.
Thanks,
-Gerry
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders