Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 876785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:29:25+00:00 2026-05-15T11:29:25+00:00

I am building a portfolio site which dynamically loads large hi-res images when the

  • 0

I am building a portfolio site which dynamically loads large hi-res images when the user clicks on a thumnail. However I’m having problems maintaining the original image’s quality when resizing it to fit the current browser.

Currently I’m just adjusting the width & height properties of the image to width to the stage proportionally which is working fine getting it to fit, however I cannot figure out how to maintain image quality? Do I need to load it as a bitmap and redraw/smooth or something similar?

This is the appropriate code that I am currently using:

var req:URLRequest = new URLRequest("images/101.jpg");
var loader:Loader = new Loader();

var widthRatio:Number;
var heightRatio:Number;

function imageLoaded(e:Event):void
{
 //add image to stage
 addChild(loader);


 // resize proportionally
 if (loader.width > stage.stageWidth){
  widthRatio=loader.width/stage.stageWidth;
  trace(widthRatio)
  trace(loader.width);
 }
 if (loader.height > stage.stageHeight){
  heightRatio=loader.height/stage.stageHeight;
  trace(heightRatio)
  trace(loader.height)
 }

 if (widthRatio > heightRatio){
  loader.width = stage.stageWidth;
  loader.height = loader.height/widthRatio;
 } else {
  loader.height = stage.stageHeight;
  loader.width = loader.width/heightRatio;
 }

 //centre on stage
 loader.x=stage.stageWidth/2 - loader.width/2;
 loader.y=stage.stageHeight/2 - loader.height/2;

}

loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
loader.load(req);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:29:26+00:00Added an answer on May 15, 2026 at 11:29 am

    Have a look at Bitmap smoothing.

    Your Loader will have a content property which will be a Bitmap. Set it’s smoothing to true.

    function imageLoaded(e:Event):void
    {
        //add image to stage
        addChild(loader);
        Bitmap(loader.content).smoothing = true;
    
        // ...
    

    It makes the image a bit blurry but it is a significant improvement in most cases.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a portfolio page, which contains quite anumber of images. I am
I'm currently building a portfolio site for a client, and I'm having trouble with
Building a site on CargoCollective, but it appears they use jQuery 1.4.2 which seems
Im currently building a horizontal scrolling portfolio. I want the images to be 100%
I am building a portfolio site and am looking to add html text titles
Building an iPhone application. The delegate loads a SplashScreenView which sits there until the
I'm building a portfolio website and want to implement a skill set page which
I am building a portfolio website that uses only CSS3 to display a grid
I'm building a website that acts as a portfolio for a companies advertising works.
building a site using PHP and MySQL that needs to store a lot of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.