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


Similar Posts:


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

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 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 :: Rolledover Clip To Scale Up And All The Others To Scale Down And Blur?

Mar 8, 2007

Scenario: main moveiclip with 4 other clips in it. I want the rolledover clip to scale up and all the others to scale down and blur.

Question: What is the most effiecent way to code this. Would it be a "for in loop"? I am trying to minimize the code and would rather not use a whole bunch of if then statements.

View 3 Replies

IDE :: Flash Content To Scale When Scale Browser Window?

Feb 19, 2010

I want my flash content to scale when I scale my browser window.

View 5 Replies

ActionScript 2.0 :: Initialize X Scale And Y Scale Into Percentages?

Jan 14, 2006

How can I convert the current scale of the instance to 100% so I can easily "visualize" and manage the instance when I modify its scale? Here's the actionscript, it works, but I just want the temp._xscale and temp._yscale to be in percentages, not real numbers.

Code:
USflag.onMouseDown = function ()
{
var temp = USflag;
onEnterFrame = function ()

[code]....

One last thing, what's the tag you have to put that is designed for boxing actionscripts? I'm suing [ code ][ /code ]

View 1 Replies

Scale A Flash Using Dreamweaver - Can't Get It To Scale

Dec 4, 2009

My Flash image will not scale.if you zoom in, it gets chopped up. if you zoom out, it has a big blank area.What should I change in order to have this Flash image scale just like the rest of the site? [URL]It is the Flash in the center.

View 1 Replies

Javascript :: Video With Transparent Background On Page Above Image Background?

May 2, 2010

I 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 Replies

Flex :: After Importing A PNG With Transparent Background It Shows Up With White Background

Dec 28, 2010

As the title already states i have a (big) problem importing a PNG in a Flex 4 application.Created a PNG file in Photoshop with transparent background. Loaded in Flex application using this code:[code]So when the complete event fires the data has been loaded and it is possible to assign the data loaded to the image component named Thumbnail:[code]Unitls now everything works as expected!But when i try to send the Thumbnail component's data to a WCF service i receive a photo with white background:[code]

View 2 Replies

CS3 - Make Background Flash Background Transparent In Dreamweaver?

Apr 10, 2009

I've designed a Flash site in CS3 using Action Script 2.0 that has a main flash movie sorta floating in space over a gradient background. I want the gradient background to re-size with the browser, so I thought that the easiest way to do this would be to delete the gradient background in Flash and instead recreate the background in Dreamweaver using the repeat background option and then make the Flash movie's background transparent. (I hope I'm making some amount of sense here).

I've found a few tutorials on how to do this, but so far I just get a white background instead of transparent. I've tried choosing "Transparent - Windowless" under Window Mode on the HTML tab in Publish Settings. And I've tried selecting the movie from within DW and clicking the parameter button and adding a "wmode" parameter with "transparent" as its value.

View 2 Replies

ActionScript 3.0 :: Printing A MC With White Background, Not Stage Background?

Dec 10, 2008

trying to print a movieclip with a white backgroundwhile keeping the stage background black.The movieclip,printResults_mc has a white rectangle in the bottom layer, 850pixels x 1100 pixels. The following function scales printResults_mcto the printers printable area but because isimpossible to predict the aspect ratio of the printable area someblack background always leaks out. I tried making the whitebackground 20 pixels larger than I need (870 x 1120) and thensetting a crop rectangle in addPage of (10,10,850,1100), no luck,the black stage background just fills in the area outside the crop.A simple solution would be to temporarily set the stage backgroundcolor property to white, print, then set it back to black, but I

View 1 Replies

ActionScript 3.0 :: Background Caches And Flashes On New Uploaded SWF As Background

Aug 2, 2010

When I click on the next button that loads a another swf the background from the previous swf flicks on the screen.click on the attached link URL..[code]I would like the "current_ plan.swf" to load so that the over lays (no so much on the views but more in the LIVING MASTER.We are creating this for both touchscreen and web(the link is the working touchscreen version hence the files being large).[code]

View 7 Replies

Professional :: Background Scrolling - Attach The Trees To The Background?

Nov 19, 2010

I have converted a large background image (much larger than the stage) into a Movie Clip.  I did this so I can make it scroll as the player traverses to the edge of the scene.This appears to make the player free to roam the entire background image.I have a tree symbol with a class attached to it that blocks player movement.Here is my problem:

When I drag and drop instances of the tree symbol onto the background, the trees are stationary and do not scroll with the background.I do not want to have to implement code to make the trees scroll when the background does.I was wondering if there was a way to simply attach the trees to the background so that if the background moves, the trees move with it and appear to be part of the background as if they were drawn into it.It is convenient for me to be able to drag and drop as many trees as i need to block certain routes on the background from the player.I tried writing code to make the trees move but it was only working for the very last tree that I added to the scene.

View 8 Replies

Scaling Background / Whole SWF Object Without Tiling Background

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

Image As Background / Resizing / Scalable Background

Jul 24, 2009

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

Background Controlled By Navigation (Dynamic Background)?

May 26, 2009

create an effect that loads a fullscreen background image that changes according to the navigation selection. The background will be replaced everytime the navigation is activated

View 1 Replies

ActionScript 2.0 :: Corresponding Background MC Come To The Top Of The Pile Background?

Dec 11, 2007

I have a series of background MCs, all different coloured gradients (pretty!), and a series of corresponding buttons elsewhere on the stage. On a press of each button I would like the corresponding background MC to come to the top of the pile of backgrounds, then fade in above the previous background. The background that was previously on top, needs to stay next-to-top.If the corresponding background is already at the top of the pile, then nothing needs to happen.

At the moment I am using swapDepths(1) which brings the target to the top no problem, but it may also send the previous top layer MC way down the pile.This is what I'm doing at the moment:

on (release) {
if (_root.BG.colour2.getDepth()<=0) {
_root.BG.colour2._alpha = 0;[code].....

View 14 Replies

Swf Won't Scale To Fit Div

Feb 15, 2010

I am trying to use swfobject 2.2 to display an swf, but the swf won't scale to fit the div that I'm putting it in. You can see what I've got here. When it first loads, it is the right size, then it expands larger for some reason. If I right-click on the movie and select "Show All", it then fits perfectly.[code]

View 5 Replies

AS2 :: Scale Objects With It?

Sep 7, 2010

I have a purple box on the stage. I turned this box into a movie clip with the instance name of "purple." onEnterFrame, I want to increase the wdith of that box. It is currently 11.75px. I want it to ease into 40px. I want this to happen onEnterFrame.

View 2 Replies

ActionScript 1/2 :: Scale One MC But Not Another?

May 13, 2009

It's been awhile since I've worked in as2 but I think I'm close to accomplishing this. I've got one mc to center itself in the browser and move with the browser size without scaling. What I'm trying to do now is get my background video to scale with the browser without affecting the centered mc. I've grabbed this code and altered from another source.

[Code].....

View 3 Replies

Way To Scale My Application

Mar 13, 2010

How can I make my application to fit the browser size? I wont it to be on all of the screen(not full screen mode) and not just the size that I chosen.

View 6 Replies

Set SWF To Scale To Screen?

Mar 1, 2012

I have finished my Flash presentation which is set for a large monitor. My file is 1920x1080. How can I get the SWF to scale to a smaller monitor if needed? When I output an HTML file, (set at 100%) the file scales, but the rollover buttons only work on (Click) and the cursor doesn't change from the arrow to a hand. Is there a code that I can place within the action window?

View 2 Replies







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