Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to account for landscape and portrait pictures

Status
Not open for further replies.

ksbigfoot

Programmer
Apr 15, 2002
856
0
0
CA
I have created a slideshow by loading the images in through an XML file. Right now I am forcing the pictures to be W:315 X H:236, the layout starts at x:0, y:0 position.

How would I recognize if the picture was in a portrait layout, Eg.) W:236 X H:315

Thanks
 
this.createEmptyMovieClip("img_mc", 10);
var mcl = new MovieClipLoader();
mcl.onLoadInit = function(target_mc) {
trace(target_mc._width);
trace(target_mc._height);
//take action if width > height
}
mcl.loadClip("image1.jpg", img_mc);
 
Howdy billwatson,
Thanks for the post.
I don't know if anyone is going to submit a portrait picture.
But if they do, do I have to create my .swf to be of size 315 X 315, to handle the portrait picture? Or can I somehow change the size of my swf on the fly incase I run into a portrait picture?
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top