ActionScript 2.0 :: Script That Will Dyanamically Scale Some Background Images

Jan 26, 2005

i've been working on a script that will dyanamically scale some background images, I can't see what's wrong with this function:[code]I get 13 AS errors- one for each of the lines in the function.

View 3 Replies


Similar Posts:


Possible To Scale Only Background?

Mar 13, 2009

Is it possible that when i embed my swf file to an html page n then view it in the browser, it should autoscale only the background image of my flash file and keep everything else to the center?I'm using actionscript 2.0 for this movieclip.

I got this code from a blog and tried it..but it doesn't seem to be working..(my background pic(movieClip) instance name is 'pic') [code]...

View 1 Replies

ActionScript 2.0 :: Scale A Background Clip Proportionally?

Oct 24, 2011

I have browsed the internet looking for a solution to this, and I have come close to getting what I need but it isn't perfect. [code]...

View 3 Replies

ActionScript 2.0 :: Unable To Use The Full Scale Background?

Jul 10, 2006

I am using a full size background on my website with the following code.

Code:
Stage.align = "TL";
Stage.scaleMode = "noScale";
bg.onResize = function() {
var imageAspectRatio = this._width/this._height;

[code]....

The problem any swfs that I load into are not centered because of the Stage.align = "left"; So I adjusted all loaded swfs like so.

_root._x = 200;
_root._y= 100;

Which center my movie perfectly. The problem is when I try my movie on other resolutions the movie is no longer centered? Do I need to write some code that gets the screen resolution and adjusts the _root based on screen resolution?

View 12 Replies

IDE :: Resize Background Image To Browser In Scale?

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

ActionScript 2.0 :: Fullscreen Background - Maintaining Picture Scale?

Mar 6, 2007

I pretty much got it working. The only problem I'm having is that it's only full screen based off of the width. I want the picture to maintain it's scale, so I need it to fill the height if necessary and cut the sides off of the picture. You can see what I mean by clicking [URl]. Resize the browser so it's a lot taller than it is wide and you'll see what I mean. I want it to fit both height and width no matter which is taller. I've played around with it all morning and nothing.

Code:
// pic_mc is the movieclip that I used to load my full-screen background image.
function bgResize() {
pic_mc._width = Stage.width;
pic_mc._yscale = pic_mc._xscale;
if (pic_mc.height >= _yscale) {
pic_mc._x = (Stage.width)/2;
pic_mc._y = (Stage.height)/2;
[Code] ......

View 3 Replies

ActionScript 2.0 :: Making A Page Where Background Needs To Scale To Browser?

Jul 18, 2009

Fairly new to this sort of thing. I am making a page where the background needs to scale to the browser. Background is a mc. Here is the code:

Stage.scaleMode = "noScale";
Stage.align = "C";
sizeListener = new Object();

[Code]....

Now what i've noticed is that when it first loads into the browser it does not scale. When I manipulate the browser by pulling up on the bottom of the browser the background distorts and the top of the background is hidden. When I slide the left side of the browser to the right the background again becomes distorted and slightly hidden on the right edge of the browser.

By the way it seems like it ignores the actionscript when it first loads. Then when I first try and do a resize it follows the above actionscript once . Then it ignores it for any future resizes.

View 2 Replies

Actionscript 3 :: Background Image Auto-resize/scale In Flash Cs5.5?

Jan 28, 2012

The 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]...

View 1 Replies

ActionScript 2.0 :: Scale A Background Image To The Size Of The Browser Window?

May 7, 2005

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]....

View 1 Replies

Simple Stage Resizer As File To Just Increases The Background Image Scale

Feb 28, 2009

I have a simple stage resizer.as file to just increases the background image scale when the window is enlarged. this works fine. however now I have uplgraded to CS3 Flash it no longer works. would this be an issue with my publishing settings somewhere?

View 1 Replies

ActionScript 3.0 :: Swapping Images - Change Background Images

Dec 4, 2008

I would like to have my background image change images every so often. I would like to use only AS3 for this. Could someone point me in the right direction. I am new to the language as well as flash.

View 3 Replies

ActionScript 2.0 :: Movie Clip Not To Scale / Background Movieclip To Take Full Screen Of Browser

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

ActionScript 2.0 :: Scale All Images To Same Size

Sep 12, 2009

I am loading images through xml. I want to be able to scale the images to the same size of the container MC they are getting loaded into. Is there a way to scale multiple images that are all different sizes and make them all the same size with Actionscript.

View 3 Replies

ActionScript 2.0 :: Scale Images To Fit Browser Without Distorting?

Mar 23, 2008

I need to achieve the image scaling done here (not copying the site, just need that image scaling technique)[url]...

i've got the listeners in place, and have no problem getting images to fit the browser windows. the problem is stopping the distortion, while also making sure at least 1 dimension fits the browser's dimensions (ie no borders appearing along one direction). i don't mind the browser 'cropping' the image.

View 9 Replies

ActionScript 3.0 :: For Loop Acting Up, Images Scale And Are Missplaced?

Aug 3, 2009

I have an image which i am attaching, it is the white portion of the image( i saved it on a black background so it is easy to see, but it is on a transparent background saved as a gif and imported to flash). When my for loop runs, i am trying to position this image on stage programatically, but it seems as it is not doing it right. It scales the image, and positions some all over the place.I wanted the images (8 of them) to appear in 2 colums each one spaced out evenly, but it fails to do that. The movie clip holds the image below. Also since it is a irregular shape, it seems to make the edges look really rought.

1) Why is the for loop generating these images all over the place like that?

2) Would it be more ideal to draw this shape with flash, rather then using a gif image? Is such a shape even possible to draw?This is the code:

import fl.transitions.*;import fl.transitions.easing.*;import flash.events.TimerEvent;
var imageLoader:Loader;
var xmlData:XML;[CODE]............

View 5 Replies

Apply Dynamically Scale Down And Up Into A Thumbnail Images Size?

Jun 9, 2010

I'm working on one current project, I don't have any issues to load a SWF into a main SWF but I can't figure out how to apply dynamically the scale down and up into a thumbnail images size while using the Resize event handler to fit in any browsers sizes.

I load SWF into a Loader object then add it into a container => currentMC. I want to size it and keep all the pieces inside this container. Therefore no matter browser size, I just want to be able to apply scale on it to fit it.

Does anyone know how to do that? How would I deal with stageWidth and stageHeight?

View 1 Replies

ActionScript 2.0 :: Scale And Smooth Dynamically Loaded Images

Jun 22, 2009

I've got a nifty bit of script that loads some images from an XML file into flash. It loads the pictures into specified movieclips:

ActionScript Code:
xmlImages.reset();
xmlImages = new XML();
xmlImages.ignoreWhite = true;
xmlImages.onLoad = loadImages;
xmlImages.load("[URL]");
function loadImages(loaded) {
[Code] .....

Each instance of the movieclips are called picture_mc1, picture_mc2 etc. On the frame where these picture_mc's sit, I've got this code:
ActionScript Code:
function randomImage() {
if (loaded == filesize) {
image = (imageFileName[0]);
picture_mc1.loadMovie(imageFileName[0], 1);
picture_mc1._xscale=23;
picture_mc1._yscale=23;
[Code] .....

Everything works fine, but my image scaling is making my picture_mc's look really pixilated. I've seen references to bitmap image smoothing, but i'm not sure the best way to approach this. It seems that each time I try and smooth my images, the code is smoothing the image placeholder, rather than the jpg that's being loaded into it.

View 0 Replies

ActionScript 2.0 :: Scale External Images To Full-screen?

Dec 14, 2011

I have this code to scale external images to full-screen:

function resize_image(){
pic = big_mc.swfloader;
Stage.align = "TL";

[Code].....

It works fine but I want to change it so the scaling is determined by the browser height, at the moment it scales to the browser width so you lose some of the image height - Also, need to keep the images in proportion

View 0 Replies

ActionScript 2.0 :: Scale Down Flash Images Using BitmapData And Matrix?

Feb 4, 2008

how to scale down flash images using BitmapData and Matrix?? I'm using it for fullscreen so that the images are always perfect. I've been tampering with this, but cannot get it to work properly.

View 3 Replies

ActionScript 3.0 :: Scale Images In Full Browser Sites?

Jul 24, 2010

What's the best practice to scale images in full browser sites? I am new to Flash and have a pretty good understanding of how most things work in Flash. My newest goal is getting Flash to scale 100% on all browsers. But when I do, my pictures become pixelated and I'm sure videos would do this as well. So my question is - what's the best practice or actionscript to keep this from happening? Sites like [URL] that have utilized their abilities to scale their images on any browser are great examples. How can I achieve this?

View 1 Replies

Making Text And Images Not Scale Whilst The Whole Flash Doc Fills Browser?

Aug 25, 2010

how I can have my swf fill the entire browser (as in publish settings 100% w & h etc) but not stretch/distort the text and images in the swf.

There is a site [URL] that does this. It fills the whole screen yet when you resize, the objects do not become distorted.

I may have the wrong approach with publish settings width & height 100%??

View 2 Replies

ActionScript 2.0 :: Create Simulated 3D Rotating Set Of Images - Change Scale, Depth, And _y Based On _x?

Jun 26, 2007

I'm looking to create a rotating set of images, simulated to look 3D... that can rotate either left or right, reactive to someones mouse location.

The path of the images would look like a flat oval, and as the images came to the forefront, they would be at full scale, have the lowest position (high _y), have the highest depth (appear in front of everything else) and be dead center _x.

As they slide left or right, they would reduce everything by a relative 50% to the final shift (scale, _y, and depth) until they got to the end, moving in an upward arc following the oval path. When they got to the end, and kept rotating beyond (move in the opposite _x. but appear to follow the flow of the arc), continuing to decrease in scale, _y, and depth.

View 1 Replies

Professional :: Png Images For Title And Background?

Apr 5, 2011

My problem is, I have setuped a simple iPhone app in Flash.I compile it, but some of elements are missing.Like i have *.png images for title and background, and problem is background is not appearing.Layers are set correctly, in editor they are positioned right.

View 1 Replies

ActionScript 2.0 :: Preloading Images (SWF) In Background

Apr 19, 2011

Me and My friend building part of a site in AS2 which needs to preload images while the user is on the site. For example:
Illustration section has 10 images
A user clicks on the link for this section the images will begin to preload without the user knowing. They will be able to click on a link for an image and it will either display if fully loaded, or continue to load as a priority over the other images that are loading until it is ready to be displayed.

View 4 Replies

ActionScript 2.0 :: Loading Images In The Background?

Jul 30, 2008

How would i go about loading a set of images in the background? Just so that they are ready to go and I don't have to load them per image. I want to load the whole set for each section of a site.

View 1 Replies

ActionScript 3.0 :: Navigation Blurs Out/in Background Images

May 25, 2009

I have a simple single main timeline for the website with 6 navigation buttons. Each button sending the playhead to a label keyframe (the site has 6 'pages'). I converted 6 photos to movie clips and added one to each of the 6 labels as a full page background. To each movieclip photo, I have added a fade in blur using one of the FLASHeff effects so when a nav button is clicked, the background fades/blurs in, I have given each background 20 frames to allow the blur to fully complete.
 
Now all that works as expected... but now the fun begins... what I would like to do is that when a navigation button is clicked, whichever of the 6 backgrounds is currently showing will fade/blur out first before the new background photo fades in. I could do this with 36 (the total combination of transitions with 6 photos and 6 buttons). A bit of an ugly solution!
 
Here is the code I have for the buttons:
 
teamBt.addEventListener(MouseEvent.MOUSE_DOWN, mouseTeamHandler);function mouseTeamHandler(event:MouseEvent):void { gotoAndPlay("team");}
 
My question is: Is there a more elegant and dare I say, sexy actionscript 3 way to do all this and hopfully still be able to use flasheff for the blur effect?
 
I had better get up to speed using actionscript 3 to save myself further forum embarrassment.

View 8 Replies

Flex - Changing Background Images Per State?

Jun 4, 2010

I have a Component that has a specific background image. The code looks like:

<mx:backgroundImage>@Embed(source='img1.png')</mx:backgroundImage>
<mx:states>
<mx:State name='state2'>
<mx:SetStyle name="backgroundImage">

[Code]....

But when I change the state to 'state2', it doesn't actually change anything.

View 3 Replies

Flex :: Animating Sequence Of Images In Background

Nov 21, 2010

I would like to animate a sequence of background images within a uicomponent but also dynamically add and remove components to this component. My first question would be:
1.) What's the best way to animate a sequence of images using Flex 3?
2.) What's the best way to handle adding and removing components on top of the background dynamically?

View 1 Replies

Actionscript 3 :: Tween Background In And Then Dynamic Images?

Feb 25, 2012

I have a method that takes a few paramerters and dynamicly adds three images to the stage it also adds a background image to the three images.I am trying to figure out the following: How can I tween in the background movieclip and on complete tween in the three dynamic movieClips? Can I have a function within a function that shares the same variables?

Something like the following:

public function addImages(BackGround:String,Image1:String,Image2:String,Image3:String):void
{
var symbol_class:Class = getDefinitionByName(BackGround);
var image1_class:Class = getDefinitionByName(Image1);
var image2_class:Class = getDefinitionByName(Image2);

[Code]...

View 2 Replies

ActionScript 2.0 :: Fading Fullscreen Background Images?

Apr 11, 2011

I'm currently working on this site, which was made on a linear timeline and just rewinds and fast fowards to the frame with each page on [URL]

This was done with limited Actionscript, but now I need to redo it almost entirely in AS

I figure I need to keep everything on one frame (separate vertical frames, but no animation horizontally) and create movieclips for each page's content and tell it to fade in the content of whatever page is clicked on the nav, and fade out the rest. I will also need to do the same, but with the background images in fullscreen. I also have a problem with the bottom nav. It adjusts to window height on resize, but I can't get it to adjust automatically.

So how do I

1. Tell the movieclips to fade in and out when a button is clicked

2. Get the background images to fit full screen, and also fade in/out for each page

3. Get a movieclip to adjust to screen size without using onResize

View 0 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved