Log in

View Full Version : .swf aspect ratio



nikidon
12-12-2008, 05:57 AM
hi all,

i just need to know how can we control the aspect ratio of .swf on different screen resolution if viewing the .swf on TV (LCD).
The size of the stage is kept constant 800x600. do i need to change the size?
I tried:

a. Stage.scaleMode (tried but no working)
b. in html height =100% width=100% and scale ="allowScale".
c. in JS i tried to control the BG image .
d. The size of the stage is kept constant 800x600. do i need to change the size?

Kindly help ............

thanks and regards
nikidon

Medyman
12-12-2008, 07:38 PM
I'm confused as to what you need help with. Are you asking of resizing the SWF is necessary or how to do it? Additionally, are you having trouble maintaining the aspect ratio or as you simply trying to resize to 100% of the viewport.

nikidon
12-22-2008, 08:03 AM
hi Medy,
I need the aspect ratio of the .swf to kept constant. If i run the .swf on any screen e.g comp, tv etc.
thanks
nikidon

Medyman
12-22-2008, 04:30 PM
Ok, gotcha. Look at the following article/tutorial. I think it'll help you with what you need. If it doesn't, post back and I'll help you with some actual code (feeling a bit lazy atm, lol).

http://www.yapiodesign.com/blog/2007/02/11/scale-image-proportionally/

auntnini
01-05-2009, 10:03 PM
AfterEffects instruction books and tutorials deal with saving for various media (more than Flash). Does square-pixels vs. non-square-pixels affect aspect-ratio differences between displaying on TV or computer screens?

http://en.wikipedia.org/wiki/Aspect_ratio_(image)

http://en.wikipedia.org/wiki/Display_resolution#Considerations

nikidon
02-06-2009, 07:18 AM
hi medy,

Ok can you please let me know where to put this code ? also i need my .swf to be centered as my main .swf consists of 3 different .swf like top centre and bottom.

thanks

nikidon
02-21-2009, 06:55 AM
hi Meddy,

I want to control the resolution of my swf and once i do run it on TV screen the swf size gets enlarged. I want it to be constant throughout. I mean if i kept my stage size 800x600 then when i view it on 21inch TV or a Plasma TV (bigger) screen it distorted a bit.
So i need to know what are the thing s that i have to keep in mind so tht resolution is constant on everresolution i mean 800x600, 1024x768,1280x1024 or 16:9,5:3 etc.
And help will be highly appreciated. And thanks for the post that you have made .

thanks

Medyman
02-22-2009, 10:40 PM
So, you want the opposite of resizing? Really, you don't need to do anything for that. If you want to center the SWF inside another SWF, take a look at the full-screen flash tutorial at gotoandlearn.com.

nikidon
02-23-2009, 05:47 AM
hi Medy,
I tell you it is not about the swf inside another swf. suppose we have 3 swfs and they are on one page (aspx) as we do for normal html page. And when we publish this and put the swf in the code and run my application on different resolution that includes TV screens, the swf get distorted i mean they are not same on different screen resolution.
and in the html code i already done height=100% and width=100%.
I just wanted to know if i can control it from code written in flash or JS. Kindly let me know if you have any solution for this.
thanks

Medyman
02-23-2009, 11:56 PM
You can set an absolute height/width. When you set the height and width to 100%, it will obviously stretch to fill the viewport. If you set an absolute height/width (200px, for example), it won't resize.

If you want to resize the SWF in some relative way, use JavaScript.