Search  

SCALE IMPORTED IMAGE - XML / AS2

HomeForumsHelp NeededScale imported image - XML / AS2
Default-profile HovardKr
4 posts
Bought between 1 and 9 items

I am making a simple thing to display a bandname and picture. I will work against a CMS and shall get title and pictureinfo from the database.

I am almost done with it, but need some help with a little part of the flash file.

The flash gets all info from an generated XML , like this: http://pastie.org/237427

AS2 in fla: http://pastie.org/237428

I wonder if there is a way to set the mc “bildet” to a spesific size, and to make the AS tell the picture to scale to the either minimum height for landscape images or minimum width for portrait images. I need this because the site will be updated by different persons.

I have tried to make it work in some way with the last two lines. The picture displays correct when I set 150, but the “window” for display is 190px heigh.

Guess there is some things I dont understand yet.

Posted 2 months ago
36416 Emroni
173 posts
Sold between 100 and 1 000 dollars Bought between 1 and 9 items

Since you are using [“bildet”+i].loadMovie to load the movie in, doesnt [“bildet”+i]._width and [“bildet”+i]._height work?

Posted 2 months ago
41307 ZacharyKnight
50 posts
Exclusive author Referred at least one person Sold between 1 000 and 5 000 dollars Bought between 1 and 9 items

I would definitely suggest using the MovieClipLoader class instead of loadMovie. That way you can make sure that the re-sizing code is not attempting to run on an image that hasn’t fully loaded yet.

Posted 2 months ago