Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-15-2007, 03:21 PM   #1
Registered User
Join Date: Mar 2007
Posts: 163
Question JPGs loaded dynamically - quality sucks!

Can't seem to figure out why... I have a Flash training app that loads all its data via XML files. Most of the pictures seem fine when they load, but one image in particular just looks horrible. Looks almost as if it's stretched/squeezed to different dimensions, though I'm specifying the length and width. I've doublechecked that my dims are correct.

Any ideas? I've tried .GIF with no improvement.

I also made sure that the MC these images are loaded into are positioned at integer X & Y coords, as I've read elsewhere that loading images into a MC at non-integer coords can cause strange display issues.
Scuba_Steve is offline   Reply With Quote
Old 10-15-2007, 04:37 PM   #2
The dude abides
kool-Aid's Avatar
Join Date: Sep 2006
Location: PA
Posts: 568
Send a message via AIM to kool-Aid

Ya, if your x & y are not irregular and you checked the proportions i would say try png-24 or try opening and resaving jpeg.
kool-Aid is offline   Reply With Quote
Old 10-15-2007, 04:42 PM   #3
Registered User
Join Date: Mar 2007
Posts: 163

No improvement using PNG-24. Text still looks like it was printed, photocopied, and then scanned in. :/ Talk about frustrating.
Scuba_Steve is offline   Reply With Quote
Old 10-15-2007, 05:14 PM   #4
Banned by AS.org Staff
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073

Have any of the movie clip holders might have been scaled?
atomic is offline   Reply With Quote
Old 10-15-2007, 08:27 PM   #5
2006 Man Of The Year
evride's Avatar
Join Date: Mar 2007
Posts: 919

some dude wrote a function for image loading and smoothing.

ActionScript Code:
_global.smoothImageLoad = function(imgURL, targetMovie) {     var i = 0;     do {         i++;     } while (eval("_root.smoothImageLoadTemp" + i) != undefined);     tmc = _root.createEmptyMovieClip("smoothImageLoadTemp" + i, _root.getNextHighestDepth());     tmc.createEmptyMovieClip("ti", tmc.getNextHighestDepth());     tmc.tm = targetMovie;     with (tmc) {         tmcl = new MovieClipLoader();         tmcl.onLoadComplete = function() {             ti.onEnterFrame = function() {                 pixelData = new flash.display.BitmapData(ti._width, ti._height);                 pixelData.draw(ti);                 tm.attachBitmap(pixelData, 1, true, true);                 tm.smoothImageLoadComplete();                 removeMovieClip(ti._parent);             };         };         tmcl.loadClip(imgURL, tmc.ti);     } }; //to load in an image just call the function and pass in the parameters //smoothImageLoad([image], [movieclip to load in to]); smoothImageLoad("img1.jpg", myMovieClip);

this function does use a lot more resources than just loading in the image so if you're going to have a lot of them on screen be warned - it might be slow.
evride is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Animating dynamically loaded jpgs? riak ActionScript 2.0 1 09-10-2007 01:21 AM
Making dynamically loaded jpgs "clickable"..? Scuba_Steve Flash 8 General Questions 5 07-23-2007 10:00 PM
Determining the name of a dynamically loaded movieclip from a child movieclip PowerfulWebsites ActionScript 2.0 2 08-11-2006 02:49 PM
tab order with dynamically loaded swfs? tweaknee ActionScript 1.0 (and below) 0 04-07-2005 12:16 AM
Dynamically Loading of JPGs, reading height and width Matt Clarkson ActionScript 1.0 (and below) 3 02-28-2005 08:08 AM

All times are GMT. The time now is 01:49 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.