开发者

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:

  1. Re-Size the images to either match the desired web dimentions (or close as possible)
  2. Use 10-20% compression when saving them.
  3. Get rid of the 'showImg.scaleContent = true;' statement.

See if that helps..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜