Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loading jpegs dynamically and resizing

Status
Not open for further replies.

lucidtech

IS-IT--Management
Jan 17, 2005
267
0
0
US
Hi everyone. I am having a little trouble doing exactly what it is i want to do... I want to load JPG's dynamically into a movie clip. I started out using a loader component, but the loader only loaded the jpg half of the time.... so after a little research i used a movie clip and the loadMovie() method. Works all the time, only problem is i want to scale the size of the picture to fit where it should. I have upload code so the users can upload pictures to the server easily, so pictures will be of different sizes, so using _xscale and _yscale is out. I considered using server size code to resize the photos as they are uploaded, but am hoping there is an easier way. Anyone got any ideas?
 
try this:
Code:
_root.myMC._width = 400;
_root.myMC._height = 400;
that should resize the movieclip to those widths and heights. I had a problem with this not that long ago, and that is the solution i used.

Post back if it doesn't work!


Regards,

Martin

Computing Help And Info:
 
I'm pretty sure I've tried that... but I'll give it another shot. Any other ideas just in case?
 
note that can only resize the jpg once it has completed loading so using the resize code before then will not work
 
Just a side note.. you're original problem with the MovieClipLoader is probably because of progressive jpgs. Flash does not support them and therefore most of the time will not work with the loader. You may want to try using ImageMagick to set the interlace to none on the picture when its uploaded. Lookup the php function imageinterlace().

-Dustin
Rom 8:28
 
Thanks a alot everyone. I love this forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top