ActionScript 2.0 :: Tiling And Scaling Flash
Jul 1, 2005
I've seen a lot of posts on how to tile an image in a Flash movie that is being scaled to fit the browser. I found some code posted a while back to do it in MX 2004. (below) Can someone tell me what parts of this don't work in Flash MX? (I don't have 2004) Can this be adapted to work in Flash MX, or does someone know another way to achieve the desired result in MX?
[Code]...
View 3 Replies
Similar Posts:
May 15, 2009
I really don't know much about flash or swf files but in updating my portfolio I came across Polaroid gallery. I have managed to update the background jpeg with my own picture and remove the fade effect. However in the original program the background was tileable so when seen in a full screen browser looked fine. As my picture is not tileable I would like to know if it is possible to scale the background or the whole swf object without tiling the background.
View 1 Replies
Aug 13, 2009
I've seen the Full Browser Flash video which has tiling in the background. Can somebody supply code, and possibly an example of how to have one scalable image as the background without distortion whilst the foreground flash remains the same size. the site below is exactly what i'm after with the menu fixed to the left.
[URL]
Is it also possible to have the menu bar a fixed percentage from the top of the browser?e.
View 2 Replies
Nov 16, 2010
I have a weird issue that only seems to show itself on IE 8 so far. I have a semi transparent png tiling accross some divs on my site. All works ok. However as soon as i put any flash content on any div on the page, doesn't matter where, IE stops tiling the png and stretches it instead. It only occurs with flash and on ie8.
View 1 Replies
Jul 2, 2010
I've attempting to create a tiling image that fills the stage using AS3. Its all well and good until the stage is resized - once this happens things being to look very poor. At first I thought it was a smoothing issue but now I realise that the same image is being drawn over itself again and again. As I want to eventually have this over video, I need the transparency. If I use an opaque image, obviously you cant see the problem.
I've tried adding a condition to remove the child that is being drawn to in several ways but this dosen't seem to work. You can see these commented out in the code below.
[URL]
Code:
import flash.display.Bitmap;
import flash.display.BitmapData;
var _stageHeight = (stage.stageHeight);
[code].....
View 3 Replies
Sep 1, 2005
I am using this code to create a tiled background on a site I'm working on.
tileBG = function () {
tile_width = 128;
tile_height = 128;[code]....
It works great, but because I'm publishing my SWF with noScale at 100% width and height, the background doesnt fill the whole swf, only the size of the actual stage in the FLA. Is there any way I can change this so It will fit accordingly?
View 4 Replies
Jan 25, 2009
I'm building an XML driven video player that will allow users to customize a wide variety of layout/visual features for the player, and one of the important features is letting them switch between a regular background image, and a tiled background. I've been playing around with various methods for tiling using the Bitmap class, and its been working fine, as long as I load the image from the library. However, when I try to load the image dynamically (i.e. through XML), it doesn't jibe.
Here's the code for the tile:
function tile() {
var tile:BitmapData = BitmapData.loadBitmap("linkageIDForBitmap");
this.beginBitmapFill(tile);
this.lineTo(Stage.width, 0);
[code]....
Again, if I write a variable which references the xml node, and use that variable in the loadBitmap function, it doesn't work. I'm assuming this is because the dynamically loaded tile doesn't have a linkage ID attached? Not sure how to do that...
My other thought is to simply load the tile into a movieclip (as I do with all the other content), and then convert the movieclip to a bitmap, then proceed as normal with the code above. I've searched the boards for a method to do this, but have come up empty.
View 1 Replies
Aug 8, 2005
I was trying to work into my 100% width and height backgrounds i have been putting into flash (code at bottom).The question I have is, the duplicate background tutorial only works for the defined space of the flash stage, ie: if the stage is 900x600 - the background will duplicate for that, but anything beyond is just the stage color.How can I make the background duplicate across the entire browser window.
Here is the code being used for my 100% w/h backgrounds (not tiled):
Code:
// Control stage size without content resize.
Stage.scaleMode = "noScale";
_root.bgFull_mc._width = Stage.width;
_root.bgFull_mc._height = Stage.height;
[code]....
View 3 Replies
Mar 11, 2008
I've search through all the threads with "scaling" and "resizing" and can't find the solution.
Basically I have a GUI element on a gallery that I don't want to scale, while the rest of the page is free to resize/scale.
I think I need to add a listener of some sort to the stage, but I'm not sure how to do this.
View 2 Replies
Feb 12, 2010
I am using the blitting technique that jeff from uses for creating tiles. I am trying to paint 2 layers of bitmapdata onto a bitmap. One the first layer is the background ( 1 image). and the second layer is the tiles. In that class below. the updateMap is the method that gets called in the loop to repaint the image.
package com.eapi
{
/**
[code].....
View 2 Replies
Dec 7, 2007
So I need to tile a number of images to simulate a wall full of framed pictures. The images will be sized randomly onLoad and need to be spaced evenly. Here's is the effect I'm wanting to achieve:
how to pull this off? They'll load one at a time and probably starting in the center of the stage a building outward.
View 13 Replies
Jul 24, 2006
I am working on an as3 slideshow class and I came across a blog post that gave me the idea to use better transitions than the sliding out and fading I originally intended to use. [URL]The source for that class is available and it is a good starting point but I wanted to check and see if anyone know of similar projects that had more effects. Right now I just have the random explode effect from the above link and before I start working on effects I wanted to see what was out there.
View 1 Replies
Feb 7, 2007
I took the tutorial on using the bitmapdata to effectively tile a background, but it doesn't tile it across the full screen. Only the size of your flash movie. I want it to cover the entire screen muc like [URL]I'm looking for a way to tile the image across the full background regardless of window size. So if you maximize your browser, the background tiles the the full screen. I've been racking my brain all morning trying to figure it out!
View 6 Replies
Jun 21, 2011
I can't get this to work, and I guess it has to do with my knowledge of loading a bitmap
This is what i've got so far:
[Code].....
View 3 Replies
Feb 23, 2009
I'm building some navigation that extends all the way from left to right across my SWF. When the window resizes, I'd like the nav buttons to get wider but not have the text on the buttons get wider.
The buttons themselves are rectangles with a vertical gradient and a stroke around the outside. I'm using 9-slice scaling so the stroke doesn't scale, but the middle (gradient) gets wider or narrower.What'd be great is to be able to select an object or layer and say "don't scale, even if the rest of this movie clip scales". Is there a way to do that, or will I have to do it via actionscript?
View 1 Replies
May 20, 2010
i have a diagonal movieclip that I am trying to scale along with the background video. The background video scales perfect, I am attaching the diagonal movieclip (br in the code as bottomright) with addChild
Instead of scaling with the window, it seems to repeat such as the image is displaying. this is the main section of the code that is doing the scaling
var br:mc_bottomright = new mc_bottomright();
addChild(br);
//proportional scale
if ((stage.stageWidth / stage.stageHeight)> (owidth/oheight))
[code]....
View 4 Replies
Apr 10, 2009
I am trying to achieve an effect of scaling a movie clip on click...very similar to [URL] When the user clicks on See, Hear, Play and Shop boxes, the boxes expand. I have created a box movieclip that has a bar on top. This bar is a movie clip inside the box movieclip. When i try to scale the main box movieclip, the internal bar movie clip scales as well. How to stop this?
View 2 Replies
Apr 9, 2011
So I'm creating a classic side-scroller using the Pushbutton Engine [url] and I want the 'world' bits to be any given size, of course, and the repeat/tile my art assets. I've got the following render setup code as a start:
[Code]...
However, that just takes brick.png and stretches/shrinks it to fill the size of the object. Lame. :) I've spent a bunch of time trying to google how to do this, but I'm perhaps not getting the right terms or some such as I haven't come up with anything. Mostly articles on building tile-based games with PBE. While I'm sure I can hack together something that'll do the trick, I want to make sure I'm doing it the right way such that I get the best performance and what not. where I should be looking to pull of this standard effect?
View 2 Replies
Apr 18, 2004
really sorry to bring this one up again. I've managed to create quite good working gallery. What I'm trying to now is create a menu that is attached to the scaling part but does not scale it self - in other words just changes position. here's an example of what I mean: galleru #1
View 14 Replies
Apr 18, 2004
What I'm trying to now is create a menu that is attached to the scaling part but does not scale it self - in other words just changes position. here's an example of what I mean: galleru #1
View 13 Replies
Aug 26, 2009
i have to sanp images into tile or grid form. but my images are in 4 different sizes in height/width. i have to place all images in side by side like tiling.
View 1 Replies
May 16, 2003
am using bitmapdata to make me a nice lil' background image, and it works great...until it's resized. Whats happening is it's creating a new bgHolder clip on the resize, NOT resizing the current empty clip "bgHolder"Here's the code(taken from various posts)
import flash.display.BitmapData;
#include "mc_tween2.as"
Stage.align = "TL";
[code]....
View 3 Replies
Mar 30, 2008
I was hoping to get a little guidance from the AS pro's. I have a movieClip that is 500x500 in one of my movies that I would like to add a tiled background to. This tile will be very simple something like 4x4. I have been reading up on the BitmapData class and figured this would be the best way to get this done and use up the smallest file size.But I am not 100% understand if that is the best solution. Anyone have any thoughts? After reading up on full page flash movies I figured that method should be able to be applied to individual movieClips as well.
View 4 Replies
May 26, 2009
I am having a header in flash lets say of 900x600. And i was asked to scale it only horizontaly. I know and i have used scaling the movieclip on all sides. But in this case they only want me to scale it horizontally and don't make the elements in it loose proportion.So if the website scales so will have the flash to scale increasing it's width so i can add more elements in flash, dinamically to left and right.
View 2 Replies
Jun 3, 2007
I'm having problems scaling images in Flash with ActionScript 3.0. The only way I can see to get the quality decent is by using smoothing, which drastically hurts performance.
The thing that confuses me is that I made the same site in ActionScript 2.0, targeting Flash player 7, and the image quality is fine when scaling even without smoothing. As soon as I target Flash player 8 (or 9 with Actionscript 3.0) the quality degrades when scaling.
I don't have to move back to Actionscript 2?
View 4 Replies
Apr 24, 2003
can scale a group of images with different sizes into one fixed size?
In other words, I have an array of images coming into my movie. that have different sizes. I place each image upon a Mc that resides inside another movie clip and resize accordling. The problem is, all of the images have to be the same size. I want to be able to import any size image and scale and resize it to a specific size.
View 6 Replies
Oct 19, 2010
In the current document I'm working on I'd like to expand or spread out the width of an object on both ends when clicked.Currently the Scale X property only pushes it to the right. How would I make it spread out evenly on both the right and the left? how would I make it "fill" the document so that if it's not perfectly centered it will spread out to the edges?
Code:
if (s==false)
{
s = true;[code]..........
View 7 Replies
Sep 10, 2009
if i was to make a flash website is there a way that i could have it scale the width to fit the browser, and scale the height so that it keeps the same aspect ratio and doesn't stretch the contents out of proportion?
View 3 Replies
Feb 19, 2010
I have my Flash file embedded using swfObject and I want the Flash file to scale with the size of user's resolutions and browser windows. If I view my Flash file in the stand alone viewer it will scale properly, but not when it is embedded in the html page. I don't want it to fill the whole browser window, but stay proportional to the space it is centered on the page.
View 3 Replies
Apr 11, 2010
Im designing a website but having trouble viewing the whole page on different sized monitors. On more square resolution monitors, the left side of the website will get cut off. If you scale the browser window up, to a more widescreen format again the site will come back into view, but as you scale your browser window to the left e.i. making it more square, agian the left side gets cut off.
anyone know how to prevent or fix this? the site address is [URL]
View 3 Replies