ActionScript 2.0 :: Resize Background Image To Browser?
Jul 15, 2009I'm looking to achieve the effect seen as these sites (a background photo that rescales while not losing image quality)...
[URL]
I'm looking to achieve the effect seen as these sites (a background photo that rescales while not losing image quality)...
[URL]
I am trying to achieve an effect seen as on this website. [URL]
I want to have a background image that resizes to the browser window (my other elements retaining their size) - but stays in scale. I have been using the code provided at gotoandlearn which tiles the image. Here is the code used there.
import flash.display.BitmapData;
GreyBar._xscale = Stage.width;
var tile:BitmapData = BitmapData.loadBitmap("tile");
[Code]....
I am creating a site and I want a small swf slideshow background to be loaded into the main site SWF and be able to be resized to fill the browser. But as I bring in other swf files they are able to retain their size, not be resized in the browser. And I want the main site to stay in the center of the browser.
View 5 Repliesam not much a coder but am learning i just wana know how i can center my flash site/content/background on browser resize
i found a tutorials about that exactly the only problem was am using AS2 and the tutorials is for damn AS3 so please if you know one for AS2 then direct me or if you got som code u wana share dont hesitate 2 post it 4 me
I am creating my website in the Flash and I am having problems. I need the image on the bottom of my page (background) to resize itself according to window size similar to this site..... like here http:[url]....for example: if i make background with res 1024*768 and somebody will look at it with monitor res 1920*1200 he`ll have image resized to this ressoulution
View 4 RepliesI am making a slideshow background which adjusts to the width of the browser. However, whenever I resize the browser, the background color is visible for a moment along the edges. How can I get rid of this. I know that it is possible. If you look at the following site, the images resize perfectly:
[URL]
everything is working well with the exception of the background image/stage. Whenever I preview it in a browser, the site gets stuck in the upper left corner. I need it to automatically resize according the to viewers browser size. How do I do this? From what I've seen online, it involves possibly putting everything in a movieclip, which I can do, I just don't know how to proceed from there.
View 2 RepliesThe name of the background image movie clip symbol is bg_main. The problem here is img is aligning outside the browser window on extreme bottom-right hand side instead of centering.[URL]
Here's the code below:
//set stage for FBF
stage.align = "TL";
stage.scaleMode = "noScale";
[code]...
I am wondering how would I scale an image on browser resize with minimum and maximum width and height parameters?
I know how to use the Event.RESIZE function to make my image proportional with the browser using stage.stageWidth/Height, but I am trying to figure out a way to have a movieclip or image scale up or down to a certain dimension such as on browser resize the image max would be 640x480 and the minimum being 320x240.
What i want to know is if someone knows how every site i'm looking at makes their sites rezise without their images gets pixly?Their images looks sharp nomather how big my browser window is... when i try to do the same for my site, it looks like this
View 5 RepliesI used a colour gradient background image on my stage for my website.Managed to load up the same background onto the browser background.However, the result is not satisfactory as I can see the website background image boundaries against the browser background.How can I get around this? Or is there a code that allows me to change my website background to transparent so that I can only see one browser background?
View 3 Repliesany idea about the image gallery in the [url]... website? When you try to resize the browser it will automatically adjust its column..
View 1 Repliesive been using this tutorial [URL] after following the tutorial everything works except when I have an image that is not on all frames, the fluid layout doesnt work on that image until I resize the browser again after I have gone to that frame, which obviously isnt quite right.
View 1 RepliesI have a white stage and my background is non-solid/non-uniform. My flash project will be my whole website, therefore when a browser window is larger than my stage, the stage color (white) shows in the background. Its basically a white border on the left and right. I wish I could continue my background image to cover the whole browser window. What I want to do is: if needed (if the browser window is larger than my stage) continue my background on both sides by taking a copy of my background image, flipping it horizontally, and placing it on both sides of my background. If you can imagine it, this will give a more uniform continuation of the background. I'm guessing actionscript would be the best bet?
View 2 RepliesI want to create a website in flash for which i want to use the bg in flash to fit on 100% of width and height of browser in which it is opened (according to screen resolution) but want the content and other things used remain in same layout (they should not stretch) and remain in the middle area of the browser, like you see mostly a html page have a bg image which is set to fill 100% of width and height of the page.
is it possible with flash, i dont want to use bg image of html page (body tag background image)
As you resize your browser window the background image resize proportionally. The content on the page does not resize however, it stays fixed. Also when you reach a certian size the background stops adjusting and the browser give you scroll bars.
View 1 RepliesThis is a thing I developed using Flash and Javascript, to set any image dynamically as a background image of a web page and allow all other page content to scroll over the top of it.
[URL]
Would be interested on anyone's comments feedback, particularly about the flash (source code can be downloaded)
I have been trying to work out how the full-browser background was done here: [URL] It scales in a very elegant way: it never stretches the image, stays centered on the image and never causes ugly blank areas around the image. For me, it's become deceptively difficult to achieve! :-(
View 1 RepliesI am creating a website where the entire background is tiled and it also contains a photo gallery. Now, the photo gallery has to only appear within a limited height but the width could be similar to the browser window. (The website will be a full browser website with a capability of going fullscreen.). I tried a lot of things but the stage calculation requires to be a little different than the general stage properties.
In general, the height and width of the image is directly proportional to those of the stage. But what I am looking at is for the image to be rescaled proportionally to the width of the stage but the height nneds to be about 20-30% less than the height of the actual stage. Basically the background will be visible in that 20-30% of empty space. (And of course other elements)
My scaling of the image code looks like following,
Code:
function scalePic():void {
if ((stageHeight / stage.stageWidth) < imHeight) {
im.width = stage.stageWidth;
im.height = imHeight * im.width;
[Code] .....
And it also centers the image on the stage based on the new stage size.
i am trying to scale a background image to the size of the browser window. heres my code. for some reason it does not fill the entire stage, any ideas?
Stage.scaleMode = "noScale";
Stage.align = "TL";
background_mc._width =Stage.width
background_mc._height =Stage.height
[code]....
Currently I have link on an HTML page, and when the link is clicked, it opens a flash movie with slideshow and a semi transparent black background. The way I have it set up is as follows
CloseButton.as (the close button for the slideshow)
FullBackground.as (the black background)
MainContent.as (loads the slideshow)
then I have
main.fla (loads the CloseBtn, FullBG, and MainContent)
preloader.fla (loads the main.fla .swf)
I am trying to scale a background image to the size of the browser window. For some reason it does not fill the entire stage?
Stage.scaleMode = "noScale";
Stage.align = "TL";
background_mc._width =Stage.width
background_mc._height =Stage.height
background_mc.onResize = function() {
background_mc._width = Stage.width
background_mc._height = Stage.height
} Stage.addListener(background_mc);
i want to create a flash website where the whole browser window is filled with a background image/photo which resizes proportionally when the browser window is resized. Has to be using as2.URL...
View 2 RepliesI'm having a bit of a problem here. As per the title, my flash swf file works fine when tested from the IDE, but when I publish it and open it through the browser, the stage doesn't seem to resize along with the window.I post below a bare-bones example. The "back" movie clip should resize, only it remains at the starting dimensions
Code:
import flash.events.Event;
import flash.display.MovieClip;
[code].....
I have a datagrid that occupies 100% of browser screen. I want the grid to automatically resize when the browser is resized to small or full screen.
View 1 RepliesI am working on image and i like to scale or resize the image by dragging and resize option.same working as "free transform tool" in flash (design part); i need same functionality in application.
View 7 RepliesI want to embed some video into my HTML page. As background I want to use big picture. And above it I want to insert loop video with (i.e.) walking man.So, can I embed video (without flash and any player controls) in page?Can I decode video with transparent background? Is there any codecs which support transparent background (alpha-channel)?
View 1 RepliesI want repeat a image library for all stage size, does anyone know how I can do this.
View 1 Repliesthis is my first post on this forum. I'm new to Flash and Actionscript. Please forgive me if this question is too dumb. I don't know how to use the ComponentEvent.RESIZE event. I want to use it to resize my textfield's background, whenever the textfield is resized (the textfield is resized automatically when the user changes the input text). I don't know if I'm asking the right question, I will try to explain it through the code:
[Code]...
I am relatively new to Flash CS3 and i have been learning Action-script 3 over the past week. I have come quite a long way and i have made a site in flash but i just have a question.I have been using an image as my background and i am happy with the way flash automatically scales all the objects in my file but the background image does not scale. Is there a way to do this? I have found out things online which show me how to add auto-resizing to the background but this knocks off the flash auto scaling/resizing for everything else.
View 4 Replies