ActionScript 3.0 :: Full Browser Image Gallery With Tiled Background
May 5, 2010
I 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.
View 0 Replies
Similar Posts:
May 14, 2009
This 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)
View 1 Replies
Aug 9, 2009
I've spent the past few days having a look for this and no luck so far. Basically I have got a multi-page XML gallery with thumbnails. At the moment the images in the gallery stay their original size. I want to make it so that a) the image takes up the entire page of the browser/stage, and b) the image resizes as the browser does, which I suppose might be in the publish settings.
So my question is how can I size this image so it takes up the entire stage? I've tried fiddling around with Stage.width and Stage.height but no luck so far.
Something like this: [URL]is what I mean.
Attached is my .fla, the actionscript code is all within a key frame inside gallery_mc.
View 2 Replies
Apr 12, 2010
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 Replies
Aug 24, 2009
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)
View 1 Replies
Feb 27, 2007
I am following the tutorial here: [URL]. And all that happens is I get one copy of my image in the bottom right corner, not tiled. I have copied the code exactly. How to create a tiled background image? Using Flash MX.
View 3 Replies
Apr 12, 2006
a couple issues I'd like to work out. I have taken the XML photgallery tutorial a step further by making it full browser (with images centered in the browser window). To make this possible, I've sunk the "picture" mc one level deeper into a "container" mc that is centered via actionscript.
So the code changed from: picture to _root.container.picture
Problem is, the registration point for the loaded images is top left. Since some of the images are different sizes, I'd like the registration point to be dead center. How would I do this? Actionscript follows (it's a lot, my apologies).
Side note: Why is the fade-in script so poorly written? Is there a way to make the fades smooth? It works ok when on local drive, but I'm assuming that the delay introduced by an image being accessed on the server makes some of the fades very sudden and ineffective. Any idea how to force the alpha fade to wait until the image has fully loaded?
[Code]...
View 6 Replies
Apr 22, 2010
problem regarding xml flash gallery and as 2.0. I have created a xml photo gallery from Kirupa ([URL]) I want to create a gallery where the images from the .xml fill the entire screen and scales proportionally. To achieve this I have followed this tutorial: [URL] As long as I can center the content of the mc center to stage this works fine, but when I create an empty movie clip and try to load external content from the xml file to the mc (instance name = picture) the images does not behave as espexted. It looks as if the TL corner of the jpg images are aligned TL in relation to the MC. Also the image rotates 90degrees clockwise. A final problem is that this test:
[Code]...
View 1 Replies
Apr 15, 2009
I'm looking to create a site that has video playing full browser in the background. A very perfect example lies here:[URL]..As you can see, the video is scaled according to stage resize while the menus and such stay where they should like a perfect liquid layout. I've watched the Liquid Layout video (from this site i'm pretty sure?) and understand how to position objects on the stage according to stage resize, but I've never figured out how to scale only the video like that. The only way I've been able to do that is by setting my publish settings to NoBorder with 100% width and height, but that defeats the whole liquid layout because it scales your entire swf. I feel like it's some sort of math I'm not grasping.
I'm probably wrong, but I feel like the way I'd go about doing this would be to set everything up as a liquid layout site; that is specify stage align and scale to TOP_LEFT and NO_SCALE. I'd have my liquid menu items positioned accordingly with a resize function and for the background video I'd use a FLV Playback Component that would be manipulated through another as3 function to scale accordingly. I'd use a Playback Component so as to be able to load multiple external videos (.h264) when a link was clicked. Am I on the right track? AS3 only please!
View 14 Replies
Dec 7, 2007
I am trying to build an AS3.0 flash site with a full browser background imagethat scales proportionally like in [URL] I found some stuff online but nothing on how to do it with AS3.0
View 11 Replies
Jul 23, 2009
I am using an XML Gallery on my website and I would like to make it full screen (take up the entire browser) -- instead of its current size. I have played around with the code for hours and pulled most of my hair out and STILL I have no luck on making it fullscreen... I get the positions changed but I can't manage to enlarge it to the whole browser.
Here is my code used to align the holder on the stage and the gallery components (bttnPrev and bttnNext are on the left and right of the image to control movement to other images):
Code:
alignPic = function () {
holder._x = (stageW-holder._width)/2;
holder._y = (stageH-holder._height-menu_mc._height)/2;
bg_mc.bg._x = holder._x;
[Code]....
View 1 Replies
May 19, 2009
How do you make a flash full browser background with high quality like here: [URL](choose your language at first. After that opens up a screen with a full browser bitmap man on the left size.)I have been trying to make such scalable high quality background image but the results have been poor.
View 8 Replies
Sep 19, 2008
how to make a tiled background in Flash. how to change the tiled background to something different. The scenario for example is each section of the site the background has the same tiled background but just different colors. I've made all 4 different tiled background now all I need to do is make them switch out when a link/button is triggered.
View 10 Replies
Sep 1, 2009
I am creating a space game in AS3. In order to show movement while keeping your space ship in the center of the screen I would like to move the background (in the opposite direction that the space ship is moving). I would like the background to tile so that if you ever reach the end of one background image it will place another one right next to it seamlessly. I have worked out the code to move the tiles to the right place at the right time, however whenever the tile is repositioned due to the ship reaching the edge, there is a brief period of lag.
View 4 Replies
Sep 2, 2009
Essentially I have an animation with two main movie clips - a foreground and background movie clip.I want the foreground movie clip not to scale but the background movieclip to take the full screen of the browser.I'm only using vector images
View 1 Replies
Feb 16, 2009
I'm trying to create a repeating tiled background. I've also attached the FLA (tiledBg issue.zip) so you can test it for yourself. The code works well, but it's acting weird when resizing the stage. It looks like new tiles appear on top of the existing one, thus darkening the screen. Just take a look at the screen capture to see what I mean. and here's the code I used:
[code]....
View 3 Replies
Mar 14, 2007
I am trying to make a class that makes a tiled background but i cant make it to work. Here is the code:
[Code]...
View 7 Replies
Oct 15, 2007
Is it possible to dynamically load a JPEG image and use it as a tiled background for a fullscreen flash movie?Everything I see online is for bitmaps already loaded in the library.
View 1 Replies
Apr 7, 2010
I'm trying to create a website with full screen background images (or possibly, a video) but don't know the best way to approach it. The Die Antwoord site does pretty much what I'm trying to accomplish. I'd also like to know how they can use such high resolution images. If I try to use a high res image, the file size is enormous.I also want to do is to be able to change the background image when a button is clicked. What is the best way to do that with large images? Another site that uses similar technology only with a video is the TV on the Radio site.
View 3 Replies
Apr 15, 2009
I'm trying to create a website similar to this one, where the content is a fixed width and height (i.e. made to fit a 1024x768 screen), but the background image is full screen and scales proportionally when the window is resized.
How can I achieve this full screen background using Flash CS4/AS3?
View 5 Replies
Jun 15, 2010
I was wrote the following code to set the background image in one vBox.
vBox.setStyle("backgroundImage", "PreviewBackground.png");
vBox.setStyle("backgroundAttachment", "fixed");
Where the height and width of vBox was 250 x 350 and the height and width of background image was 400 x 400.The problem is that the background image doesn't show the full image. The image has cropped. How can i show the full image as a background image?
View 1 Replies
Oct 30, 2011
How can I fill my whole background with a big image? The photo is 1400*867 and with the solution here it fills up the width but not the height. I don't care if the photo gets cropped in order to fill up the height too.
The CSS3 way (background-size) is perfect but doesn't work in IE.
If you don't know a way with css/jquery could you direct me to a flash script where I could just enter the path of the image and let flash resize it?
View 3 Replies
Oct 2, 2009
I have searched everywhere but I can't seem to find anyway to create a full screen background image. Does anyone know the code to do this? Or know of any tutorials?
View 3 Replies
Sep 9, 2009
I am trying to create a background like the attached image (full screen).I don't like these colors, but do like the effect.
View 9 Replies
Jun 28, 2009
I need to do exactly the same, but using an animation inside a mc instead of a pixel background. Does anyone know how to do that?
View 1 Replies
Jun 16, 2010
I 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 Replies
Jul 15, 2009
I'm looking to achieve the effect seen as these sites (a background photo that rescales while not losing image quality)...
[URL]
View 4 Replies
May 30, 2007
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]....
View 5 Replies
Aug 12, 2010
I 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 Replies
Feb 15, 2011
I 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)
View 1 Replies