Ok, I am new to this group so if this is something that has already been
answered and/or is stupid, feel free to flog me (hopefully after providing
me with some insight as to the answer).

Anyway, I am trying to create a flash file where I can provide it a list of
jpg filenames (I'll figure out where this will come from later, maybe an XML
file) and it will load the images into movie clips and resize them so they
fit in their perspective MovieClip's.  My problem is that whenever I try and
load the JPG into the movie clip and then resize the movie clip, the image
will disappear, and if I try and trace the width and height of the image
(before or after loading the image) it returns 0 (which since I would have
no clue the starting resolution to do the math, rules out using xscale and
yscale even though they are the only reliable working thing right now).  The
structure I am trying to use is

*Pic1  (MovieClip)* - this is the main movie clip that I want to hold
everything involving a single image.

Pic1 contains:
*Frame (MovieClip)* - a simple movie clip filled with black so that when I
overlay the image on top of it I will have a border
*PicData (MovieClip)* - a blank movie clip that I try and load the jpg into.

I have tried loading the jpg by using Pic1.PicData.loadMovie(); and by using
a MovieClipLoader so I can hold off on changing the width until the
onLoadComplete event is triggered.  Regardless of how I load the movie, the
result is always the image disappearing if i try and change the width or
height.

The only things that seems to almost work are the _xscale and _yscale (which
are of no use without being able to determine the original width and height
so I can calculate the scale I need) and changing the width and height of
Pic1 (which changes the width of the image but also shrinks my frame).

I even tried taking PicData out of Pic1 so that I could change it's width
without messing with my border but no such luck.  I also tried using the
following structure:

*Pic1 (MovieClip)* - contains the frame
*PicData (MovieClip)* - will contain the picture

Pic1 contains:
*Frame (MovieClip)* - the movie clip with the black frame

PicData contains:
*PicInnerData (MovieClip)* - used to load the jpg.

I tried this because I figured that since changing Pic1's width earlier
changed both the frame and the image, if i broke them out but kept the image
in the same type of structure that maybe changing PicData's width would
change the width of the image in PicInnerData but I had no such luck there.
At this point I am extremely confused and am probably confusing everyone on
this list with this email, but I'm hoping somewhere out there may have come
across something like this in the past and may have a clue as to how I
should go about fixing it.

Thanks for any help.

-Jamie
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to