00:00
00:00
carbonlad
Livin my worst life

Newgrounds HQ

Joined on 4/19/15

Level:
19
Exp Points:
3,869 / 4,010
Exp Rank:
14,153
Vote Power:
6.11 votes
Audio Scouts
1
Rank:
Police Officer
Global Rank:
10,539
Blams:
649
Saves:
247
B/P Bonus:
10%
Whistle:
Normal
Medals:
114
Supporter:
5y 6m 2d

Flash Resize Math

Posted by carbonlad - 1 day ago


Edit: An example of resizing your flash videos to widescreen:

Swivel has a bullt in ratio function when you enter the height x width, so as long as your movie falls within reasonable numbers, it will find the second value when entering (e.g. width), for you.


I wanted to make a post real quick.


Some of my videos on my youtube channel get resized to 16:9 with bars along each side, because the movie is too small. Flash MX's default setting has the stage set at 550 x 400, which is something like 13:10; My math could be very wrong. (1.5 ^ 10 = 38). All my videos have been 550 x 400 and then resized by multiplying _root._xscale to something like 145 (797x580) Aspect ratios for most videos and games were something like 320x240 then grew to 640 x 480 in games like MvC2.


Widescreen is 16:9, so similar resolutions for those could be 320:180, or 640:360


You can resize your resolutions this way:


640 x 9 / 16 = 380

Or this way:


640 x 3 / 4 = 480

The formula is something like "Width" x "new Height / "new Width" = "Height"

or "Width" times "3" divide by 4 = Height e.g. ( 320 x 3/4 = 240)


To find the aspect ratio you take 640 and divide 1.5 ten times or like (1.5 ^ 10) which is 38.


640  x   4
480  x   3        

Code to Resize your movie could be something simple like:


Frame(1)
_root._xscale = 145
_root._yscale = 145

and changing the Movie properties to:


Height x 1.45
Width x 1.45

Pick a new value in Pixels (e.g 800)

If you want to find the percentage for your new size, try:

800 x 100 / 640 = 125


and to find the ratio'd height


800 x 480 / 640 = 600

The above checks out because 480 x 1.25 is 600 (old default desktop resolution for windows in 1998 was 800 x 600)


I'm really stupid and im sorry for reflecting on this but I thought it was pretty important.


Edit-iii:

"Current Height x 9 / 16 = "New Width"


I hope this helps someone


Tags:

2

Comments

This could be very useful