| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Jul 2005
Posts: 1
|
Hello
Please help... Firstly, I need to dynamically load many images of different sizes in sequence - (I can do that part). But I also want the aspect ratio of my images to remain intact. This is the part that I have been having such trouble with. From what I've picked up, it seems that Flash does not recognise that new images are being loaded and does not treat each one as a new object and therefore does not change the scaleMode, but I'm not sure. This is my code that loads the images. I have taken out all the ScaleMode stuff because none of it works. ActionScript Code:
Could anyone help me or send me in the right direction. I have tried hard to find the answer, but I can't. Thank you. Gradey. |
|
|
|
|
|
#2 |
|
Don
Join Date: Feb 2003
Location: Akron, Ohio USA
Posts: 1,897
|
ok, here is what I did for a similar situation. My setup included loading images of various sizes and creating thumbnails of each. My thumb_nail size was 65 pixels wide x 65 pixel tall, but the movieclip I was loading it into was 75x75. There are three problems that present itself that have to be solved. First is knowing the image sizes before any actions take place and then 2nd,what to do about images where the width is greater than the height and 3rd, those images where the height is greater than the width. This is the formula I came up with.
ActionScript Code:
__________________
Damn the torpedoes! Full speed ahead. |
|
|
|
|
|
|
|
|
#4 |
|
Registered User
Join Date: Aug 2005
Posts: 6
|
If I use this code to load the image
ActionScript Code:
//N |
|
|
|
|
|
#5 |
|
Registered User
Join Date: Aug 2005
Posts: 9
|
try
ActionScript Code:
Last edited by james@ba; 08-23-2005 at 11:15 AM.. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|