Actionscript 3 :: Fit A Swf Into A Box Keeping The Same Ratio?
Jan 17, 2012
I have an as3 app that loads SWF's with various movie clips inside with a size of 1280 width and 720 height. I would like to fit these SWFs into a content box of height 885 width by 500 height. The SWF must keep a ratio of 1.77. This would be easy if as3 recognised the SWF being 1280 height by 720 width. It doesn't however, and takes the size of the movie clips inside the swf which varies (as long as it's within the original size boundaries). how I can make the SWF's fit into the content box even if the movie clip sizes and therefore the original SWF sizes vary?
View 1 Replies
Similar Posts:
Feb 4, 2008
I have this video background, and I want its aspect ratio to be kept intact when the window is resized. Also I want the screen fiiled, if the aspect ratio would make the video smaller than the window it won't resize, it would just center.
[URL]
I have that code, it gives you an idea of what I want. however its buggy and flickers.
View 3 Replies
Sep 2, 2010
This is what i'm trying to do , get the Ratio 4:3 9:16 etc from an mp4 movie (h264) so when ill open it in fullscreen using a flash player / action script 3 it will still keep the ratio.
View 2 Replies
Jan 23, 2012
I want to produce a small movie using flash that i can pass onto someone else for inclusion in a presentation
They have asked for the final movie to be a quicktime .mov using the H.264 codec and that the aspect ratio should be 16:9
So my question is, how do i set up a flash project to ensure the final outputted movie will be in the correct aspect ratio? do i need to know the correct pixel dimensions?
View 6 Replies
Sep 2, 2011
I have the following:
package {
import flash.display.MovieClip;
public class Ratio extends MovieClip {
private var counter:Number;
private var frequency:Number;
private var ratio:String;
[Code] .....
This outputs something like:
0: true
1: true
2: false
3: false
But what I would actually like is:
0: true
1: false
2: true
3: false
i.e. more even dispersion (alternation)...is there a way to do this?
View 1 Replies
Jan 17, 2008
I want to build a gallery that is full screen all the time and make it scaleable. The gallery is easy but I want image to maintain ratio but once reaching a 800 by 600 stop scaling .
View 9 Replies
Feb 9, 2009
i'd like to use one flv player .swf to play both 16:9 and 4:3 videos without stretching the 4:3. how to detect the aspect ratio of the flv file being loaded?
View 0 Replies
Sep 5, 2009
way to lock the width and height ratio? I'm trying to set the width of the mc equal to the stage but have the height keep in relation to the original ratio also. So the wider I open my stage the taller the mc gets also.
sizeXListener = new Object();
sizeXListener.onResize = resizerX;
Stage.addListener(sizeXListener);
[Code]....
View 0 Replies
Sep 3, 2009
I found a thread in actionscript.com that resizes a bg image beautifully (without any pixelation whatsoever), except that there is a minor glitch in the script that doesn't load properly. What does the solution mean: "try waiting until after the image is loaded. call your setBackground(); function from the onLoadInit"
Here is the script:
import flash.display.*;
// this tells Flash NOT to allow the assets to be scaled
Stage.scaleMode = "noScale";
Stage.align = "TL";
[code]....
View 2 Replies
Jan 29, 2012
I have developed a couple of websites before in Flash, the problem is, the resolution of the site is good on my platform. i.e. 1024 x 800. However, when I get to view the site in 1366 x 788 the whole site looks sad. Badly oriented and sometimes I have to scroll through my page up and down - you know what I mean.
how to solve the problem so that my site looks good, centre oriented, doesn't matter at which resolution the user is viewing it.
View 3 Replies
Apr 2, 2009
I am new to Flash and trying to create a vertical slider bar that will return a ratio between 0 and 1, change color while doing so, and display the resulting ratio on the side of the slider as you drag. Everything works except for the dynamic text box displaying the "ratio." I want the text box to be invisible until you drag, then display at about 70% alpha when you drag, and go back to invisible when you release (because of the 70% alpha I have decided not to use the "visible" property).
I have attempted to use the _alpha command to accomplish the above, but the actionscript appears to ignore and just display the text box at 100% alpha. I have put the dynamic textbox in a movie clip, but still can't make it work. Could I accomplish this with a rollover button covering the entire slider?
I have posted the .fla file here for your review; can anyone let me know where I'm going wrong?[URL]..
View 2 Replies
Oct 14, 2009
I have my object which is supposed to re size keeping the original ratio of width/height.. I am using a listener since the stage is set to "noScale".
My object is resizing but I don't know how I can make it keep the original ratio?
View 2 Replies
Mar 5, 2011
I have set my stage at 1920 x 1440 with a background bitmap that matches that size. The aspect ratio of my stage/bitmap is 4:3. When I run my Flash website on a legacy 4:3 monitor set at 1024x768, the top and bottom portions of the stage image are truncated. The remaining part of the displayed picture has an exact aspect ratio of 16:9.
[Code]...
View 2 Replies
Sep 21, 2011
I have made a resizeable box that you can resize using handles on all four cornersI have tl (top left handle), tr (top right handle), bl (bottom left handle) and br (bottom right handle)Its rather difficult to explain. See the picture attached, the blue arrows are where the mouse could move and the green arrows are where the boxes should goor now let's concentrate on moving the tl handle so that when it is moved left or downwards it gets smaller, towards the br handle
I've have tried this:
tl.y = tl.x
tl.x = tl.y
[code].....
View 7 Replies
Feb 21, 2011
How can I make an application with the same ratio width/height? I have an application with width = 800 height = 600. Its width = 1.33*height and when I change the width to 1024 I want the height to change to 768 automatically.
View 1 Replies
May 9, 2011
I have created a flash video player using as3 (videoObject) but when I play the video the video is streched how to tell flash using as3 to maintain aspect ratio.
View 2 Replies
Nov 16, 2009
I have 30 seconds spot that I need to convert it into DVD with 4:3 aspect ratio. Does Flash has ability to do it or do I have to burn it using third party software and on the third party software does it has the option to make the aspect ratio to 4:3? I think is 720X480 in pixel right? It has to be NTSC format.
View 9 Replies
Jun 8, 2010
I want to know how can i make something like if any one scale browser my site will scale in aspect ratio without cropping
something like jimcarrey website [URL]
View 2 Replies
Jul 2, 2010
how to make a video player and I was wondering if there is a way for me to receive the aspect ratio of a loaded flv or get native dimensions of the video so I know how to scale my video properly according to the loaded flv.
View 1 Replies
Oct 7, 2006
Is it possible to keep the aspect ratio of a picture loaded with loadMovie, or is there another way to accomplish the same?
View 4 Replies
Sep 8, 2008
i try to charge a XML images inside a movieclip, but i need this movie clip maintain the aspect ratio. This movie clip gonna change with the size of the explorer, but when this change my image is going stretch. I used this code doesn't work but i try:
Code:
stageListener.onResize = function() {
MC._x = Math.round((Stage.width/2)-(MC._width/2));
MC._y = 153;
[code]....
View 2 Replies
Dec 23, 2010
I need to scale images so that they always fit within my browser but also retain their aspect ratio. All other examples I have seen at some point either the width or height is cropped off by the edge of the browser. I need my images to always stay inside but also I do not want them to ever scale above 100% i.e. no enlargement. owever the images don't stay within 100% scale and also get cropped off.else as much as I can.The code I have is like this
Code:
if(mainTL.allImages._width > Stage.width){
mainTL.allImages._width = Stage.width;
[code].....
View 2 Replies
Oct 7, 2009
How would I go about creating a gallery that displays images in a grid format that are both portrait and landscape without any cropping or spacing. I cant figure how to go about scripting the arrangement/scaling functions?
View 1 Replies
Jan 4, 2010
I want to load it always to fill the whole screen but to retain the aspect ratio. So far I am able to stretch it to 100% of the screen but the aspect ratio is not preserved. The instance name of the mc in which I load the background image is "back".
Here is an example of what I need: [URL] Try to resize browser window to see how the background image preserves its ratio.
PHP Code:
function loadFunc(What, Where) {
var LoadingObject = new MovieClipLoader();
var NewObject = new Object();
[Code].....
View 8 Replies
Apr 23, 2010
How do change the ratio of my website so that, no matter how big someone's screen is, it will go as large as possible without messing up the ratio? I want a 4:3 ratio, by the way.
View 1 Replies
Apr 13, 2011
I am working on a new site with a liquid layout and I havent been able to find a way to keep the aspect ratio correct with the different sizes.
[Code]...
the image size im working with is 990x600 for a 1024 display.I would like the image to be centered and never to have empty area, so if it needs to it would strech past the sides.
View 3 Replies
Jan 9, 2010
I have a video gallery and some of my videos are in 4:3 ratio and some in 16:9 ratio. I have also a fullscreen function on my video player. The problem is on a screen with 16:9 ratio which most of us have, my 4:3 video's is stretched across the screen. They don't maintain their pixel aspect ratio.
View 1 Replies
Feb 25, 2011
Every Time I am getting Pixel Aspect Ratio as 1:1 when i use Capabilities class. How can I get the actual ratio when it is Non-square pixel?
View 1 Replies
Aug 25, 2009
My html has 3 parts which I want to appear vertically in the page: header swf footerThe header is 100px high and 100% of width. The footer is 25px high and 100% of width.
I want my swf to take up the remaining vertical space on the page while maintaining its aspect ration of 4:3. I'd also like automatic redistribution of space to occur whenever the page is resized.
I have attempted to put the swf into the page using dreamweaver's built in methodolgy cs4's method when creating a corresponding html page swfobject 2My swf ends up with the dimensions of the page (without regard to the header and footer). The result usually involves the other content being off screen and unwanted vertical scrollbars. Often, regardless of my choice of showall or exactfit, i get distorted aspect ratio.
Is there an approved or standard way to achieve automatic resizing of a swf based on the remaining available unused height in a page?
View 1 Replies
Mar 19, 2007
My question is in making a flash website the pictures never stay the same size, the resolution of a monitor changes my pictures to tall or fat looking, if not made in that resolution 1024x768. but i have seen some websites not do this, is there a back script in java in html or enbed in flash.
View 1 Replies