I'm really close to make a "fullscreen scale image proportionally". Now i know how scale image proporcionally to width, or height. I don't know how i can combine this two scales. For explane first script is for scale width:
And this is for scale height:Code:sky.height = (stage_width / old_width)*old_height; sky.scaleX = stage_width / old_width;
I wonna do something like this:Code:sky.width = (stage_height / old_height)*old_width; sky.scaleY = stage_height / old_height;
Idea is really simple. If my web broswer have more width like height, then flash web site use first script. Else use secund script. But i'm not a programmer, so i don't know how i can make this :/Code:function() { if (stage_width > stage_height) { sky.height = (stage_width / old_width)*old_height; sky.scaleX = stage_width / old_width; } else if (stage_width < stage_height) { sky.width = (stage_height / old_height)*old_width; sky.scaleY = stage_height / old_height; } }
Plz help me




Reply With Quote