slow loading images
Just need a bit of guidance. This is my portfolio site - http://ahardenjr.com/ - My images are loading in very slowly. I'm loading them in with a UILoader component for more functionality and my code is below. Also the images look a bit distorted. Does anyone see anything wrong with the code or maybe my server godaddy account is running slow.
var myImage:String = "images/showcase.jpg";
var myR开发者_StackOverflow中文版equest:URLRequest = new URLRequest(myImage);
showImg.scaleContent = true;
showImg.load(myRequest);
I'll take an educated stab at it,, others can (and will) feel free to jump in here.
Q: Are the images you're trying to load close (or at) the desired dimensions?
I don't think the bottleneck is the actual transfer of the image, as much as it is the re-scale task. JPEG comes with a built in compression feature. You can always try to compress the image by 10-20% without any noticable loss. Of course that may actually contribute to the 'choppy-ness' if your trying to scale a larger image to a smaller image.
My suggestion would be to:
- Re-Size the images to either match the desired web dimentions (or close as possible)
- Use 10-20% compression when saving them.
- Get rid of the 'showImg.scaleContent = true;' statement.
See if that helps..
精彩评论