Jump to content
GreenSock

jtvalles

Loader width/height displays at half size

Moderator Tag

Recommended Posts

Without exception the following code:

 

queue.append(new ImageLoader("images/whale.png", {width:640, height:450, scaleMode:"proportionalOutside", crop:true, container:this}));

 

Displays the image at half the size entered.

 

My project will be loading images of different sizes and orientations and I want to scale and crop them to fit a movieClip of a specified size.

 

Any advice?

Link to comment
Share on other sites

that seems odd. are you sure the scaling isn't be caused by some other code?

can you post a full example of 1 image loading and being scaled improperly?

from the code you have shown its difficult to assess properly.

 

thanks

 

Carl

Link to comment
Share on other sites

You're right Carl. I overlooked the code:

 

 

var loadedImage:ContentDisplay = event.target.content;
loadedImage.scaleX = loadedImage.scaleY = .5

 

From the demo file I edited.

 

Thanks.

JV

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×