Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




SWF Resize On Browser Resize Causes Nav Buttons To No Longer Work.



Hello. I have a full browser width/height resizing swf. I can't figure out why, but the navigation rollover states no longer work after resizing the browser. My rollovers are handled by a button class linked to each nav button movie clip within the library. Other things of note. I am using the 3 frame AS3 preloading technique which holds all my assets in its own movie clip on frame 3.My document class only really handles preloading. And a class for all my assets, acting as the "real" doc class is linked to that MC on frame 3.Here is the URL to the problem:http://spiritservices.mindgrabmedia.com/stmary/Thanks in advance.



KirupaForum > Flash > ActionScript 3.0
Posted on: 09-09-2008, 12:05 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Resize Bg On Browser Resize While Maintaining Image Proporti
im using the following code to resize background images on browser resize:

Code:

var listener:Object = new Object()

bg_mc.width = Stage.width;
bg_mc.height = Stage.height;

listener.onResize = function(){

bg_mc.width = Stage.width;
bg_mc.height = Stage.height;

}
Stage.addListener(listener);


the problem i'm having is that my background image does not maintain proportion on resize. so, when i resize my browser to a width of 100px, the entire width of my background image is compressed into the 100px area.

is there some additional code i can add to the snippet above to maintain the proportions of my background image on resize?

thanks,
brandon

Resize Flash Movie, Make HTML Page Also Resize?
Hi All Flashkitters

I'm trying to do something that I believe is probably pretty simple and I'm guessing it involves some Javascript along with the Actionscript.

It's like on Fantasy Interactive's website, when you click on different sections of the site, the Flash container movie resizes, and makes the HTML page also resize vertically, to be able to scroll the content. Does anyone know how to acheive this? Its a handy function, I'd love to master it. It opens a big door for building flash sites that can hold real content.

So, anyone can point me in the right direction, I am greatful to.

Dynamic Resize Issue: Resize From Corner, Not Center
Okay. So I just got this little slide show I'm doing to load the next image (i'm still working on making it loop, so if anyone wants to help me with that, too feel free!)

As each new picture is loaded in the slideshow, I have a border that automatically resizes to fit it. Right now it's resizing from the center, is there any way to make it expand out from the top right corner instead of the center (since the orientation of the pictures are different, it looks a bit unnatural for what I'm doing)

Here is the code for my actions layer and if anyone can take a look and tell me what I need to change/add to make this work, I appreciate it!!


Code:
#include "mc_tween2.as"
space = 10;
photo_mc._alpha = 0;
MovieClip.prototype.loadPhoto = function(photo){
photo_mc._alpha = 0;
this.loadMovie(photo);
_level0.onEnterFrame = function(){
// modified the total and loaded so as to round it up
// to smaller number.
var total = Math.round(photo_mc.getBytesTotal()/1024);
var loaded = Math.round(photo_mc.getBytesLoaded()/1024);
if (total != 0 && loaded>=total){
var w = photo_mc._width + space;
var h = photo_mc._height + space;
border.resize(w, h);
delete this.onEnterFrame;
}
}
};
MovieClip.prototype.resize = function(w, h){
//the higher the slower the resize of the border
var speed = 6;
this.onEnterFrame = function(){
this._width += (w - this._width)/speed;
this._height += (h - this._height)/speed;
if( Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1){
this._width = w;
this._height = h;
photo_mc._x = this._x - this._width/2 + space/2;
photo_mc._y = this._y - this._height/2 + space/2;
photo_mc.alphaTo (100, 0.5, "linear")
delete this.onEnterFrame;
}
}
};
image_mc.onLoad = setInterval( nextImage, 7*1000 )
;
-SD

On Stage Resize, Resize Multiple Copies Of An Object Help
Hey everyone, I'm having some troubles figuring out the code for this. I have 12 button objects that are being created evenly across the stage, and I would like to have them resize on a stage resize event.

Here is my code so far:


Code:

//--------------------------------------
// CONSTRUCTOR
//--------------------------------------
public function BasicFullScreen(){

initVideo();
createButtons();
stage.addEventListener(Event.RESIZE, resizeHandler);

}


//Create Buttons
private function createButtons():void{

for(i==0;i<12;i++){
//trace(i);
button = new MovieClip();
button.graphics.beginFill(000000);
button.graphics.drawRect(0,0,(stage.stageWidth/30),(stage.stageHeight));
button.graphics.endFill();
button.x = (stage.stageWidth/12)*i+(stage.stageWidth/40);
button.y = 0;
button.alpha = .5;
addChild(button);

}

}

private function resizeHandler(event:Event):void {
//What to put in here?
}
I'm not sure what to put in the resizeHandler function to resize all the button objects.

Thanks for any help,

Matt

Buttons In Main Loader Swf No Longer Work
Hi

I have a main swf file main.swf (welcome screen) that loads in one of
two swfs location1.swf, or location2.swf depending on which one the user chooses (one button for each swf).
On the timeline of the loaded swf is a button to reload the welcome screen main.swf.
When the button is clicked, main.swf (the welcome screen) reloads, but the buttons to once again
load (location1.swf, or location2.swf) no longer work.

Could it be because main.swf is loaded back into itself?

Can someone help with this please!

Regards Max

Resize To Browser
How do you have a movie created in Swish2 resize as the browser window changes sizes? I saw this last night but I did not save the url. Thanks.

Resize Browser
Hi.

I just need source on how to make flash send a function to java in the browser.
Say I press a button in flash it will make the browser change in size....


Ive done this before but lost my source files... can anyone help me??

Resize Browser
hello...
how do you make the content resize in flash depending on the size of the window browser???

thanks for your help

SWF Resize In Browser
Is there a way to resize your swf so it stretches full screen horizontally but not vertically?

Browser Resize
Hi,
i'm trying to have this effect take place on my site:
http://www.hairheroes.com/
The site resizes to fit the users screen size exactly.
Any suggestion on how to do this? Javascript?
Thanks!

Resize To Fit Browser
Hello,

is there a way to make Flash movie "fit to any browser window"? If possible i would like the whole movie to fit the window. But Primerily i would like to know how to keep my navation which is at the bottom stay at the bottom.

Any ideas? Is this possible?

HUGE THANKS in advance!


Matt

Resize Browser To SWF?
Does anyone know how to do this??

I'm working on a site that I want the browser to "hug" around the flash swf as one of the images bleeds off to the right. (I don't want to use as a pop up).

Make any sense...?

Here is my site

Any help with this would be great!

Thanks,

Jayjavascript:smilie('')

How Can You Resize A Stage And Have Flash Resize The Objects As Well?
Is there any way you can resize your stage in Flash and either have it keep the objects all cenetered or have it compensate for the objects and adjust them accordingly?

This tends to be a problem when I start a new file and then forget I want the stage to be much bigger.

Any help is appreciated...

How To Dynamically Resize Clips With Resize Handles
Hi Guys
was wondering if someone could help me figure out a way how to free transform objects on stage. I saw it in action at
http://www.myholidaysweater.com/

Objects can be uniform scaled, rotated with the handle when you click on the objects.

its a very cool feature.
Any tip greatly appreciated

adrian

Q: Resize Textfield Width And Height On Resize
Does anyone know if it is possible to resize a text field dynamically when I change the size of my Flash? I want the text to do what html does on a page when you resize it. Would this be possible? Any help would be appreciated. Thanks!

Resize Swf When Browser Is Resized
can i resize the contents of framset when browser is resized??


im not sure this can be done....i have 3 frames in .html and in left frame i have this swf
can i make it resize when browser is resized by user or frames have a fixed width??

Resize Movie To Fit Browser
How can I make my flash movie resize itself to fit a browser window? You know, some use 1024 x 768 and some use 800 x 600, Is there a way to do this automatic so I don't have to make the same movie twice and it can be viewed in its largest form for everyone?

Resize Browser Window
Please Help

i want to resize a browser window how do i do that??

Pop-up Browser Window And Resize
I'm using flash mx-

There are plenty of ways to resize a pop-up window using javascript. I'm looking for a way to call or input the script in flash mx...

Here's what I'm wanting to do....

on this page- www.integritypoolstx.com (gallery page)

I want the user to be able to click on the thumbnails for a larger image. I want the larger image (440x295) to come up in a window that is 440x295. No adress bar, status bar, scroll,... nothing- just a window for ther picture... and resize

can any one help me with this prob. I know it has got to be simple!!

Thank in advance!

Allowing SWF To Resize In Browser
Hello,
When I publish a SWF with the properties of Width="100% Height="100%" it scales within the browser by itself, however when I try to take the SWF and place it within a TABLE <TD> with a Width="100%" and a Height="100%" the SWF does not appear.

The page I am try to create is fluid depending on the user's browser resolution and I was hoping to keep the Flash fluid so it gets bigger and smaller with the user's browser.

My current SWF is 400x300 4:3 Ratio...

Thanks!

Resize To Fit Browser Window? 'elp
Hello Flash Munkees

I'm sure this must be very simple and I'm missing something but can someone give me a hand please

I have put up a site for a friend and he's happy with it but unfortunately he's viewing it on a 17" monitor and say's it doesn't all fit on. I produced it on a 19".

Is there an action script that I can use in the first frame to resize automatically to the viewers screen????

Many thanks for any replies in advance.

A

Resize Browser Window
I have a link in my flash movie that would open another movie. I was loading it into another movieclip, but that was causing problems, so now I want to open it in an entirely new browser window that is sized to match the swf

I was using:

on (release) {
getURL ("java script:NewWindow=window.open('http://page. htm','newWin','width=500,height=400,left=0,top=0,t
oolbar=No,location=No,scrollbars=Yes,status=No,res
izable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}

but on both ie and mozilla firefox the window wasnt resized and the swf wasnt playing. I would apreciate if some one could point out my stupidity, and give me a hand.

Stage, Browser Resize?
Hi i've set up a web page to display what i want to do...
http://www.designbykrust.com/asd.html

basically. i'm using the following script... it does everything i want it to do except allow the menu object to move with the browser window (it does move, but it just jumps after each time i resize the window). i also need it to stop when it gets to a certain point but i dont know how to script this. can you help?

Stage.align = "TL";
Stage.scaleMode = "noscale";
//
Menu.onEnterFrame = function() {
this._x = Math.round(Stage.width-400);
this._y = 25;
};
Stage.addListener(Menu);



cheers.
krustafarian@hotmail.com

Resize Browser Window
So I've gotten my browser window to resize after it loads, but how can I have it open the same size with no scroll bars, regardless of whose machine or browser the user is operating?

www.twotimesdaily.com

- Mike

Getting Swf To Auto Resize In Browser
I am building a website with MX. I was told that swf files would automatically
resize themselves to fit within the browser
This is apparently not the case.
Dose anyone know how to make the swf files do this? is there a way to embed this behavior before the swf is published? Colud teh problem be on my index page? That page is an HTML file. ther rest of the site are swf.
thanks.

www.mosleystuff.com here is the site so you can see what I am mean.

Text Box Browser Resize?
Hi there

I have created a dynamic text field in flash,(which is nice)... but when i preview the text field in a web browser and resize the browser the text filed does not scale with it?? This may not be possible?!? but if it is can you help me and tell me how i do it please?

thanks

Stage Resize On Browser
I have built my site to 800 x 600, which looks pretty good on monitors set at 1024 x 768 or better. There's still a few people out there with lower settings though. My goal is to have the site resize smaller if the browser window is smaller, but not increase in scale above the dimensions of the original size of 800 x 600.

I got a new book with my purchase of Flash 8. Gave me code to do just this. But as simple as it is, I can't get it to work. Thinking there's something I need to include in the html file maybe? I dunno, but here's what I'm working with in a test movie with a stage size of 550 x 400:

var Bozo:Object = new Object();

Bozo.onResize = function(){
if (Stage.height < 399 || Stage.width < 549){
Stage.align = "C";
_root._xscale = Math.min(Stage.width, Stage.height) / 550 * 100;
_root._yscale = Math.min(Stage.width, Stage.height) / 400 * 100;
}
};

Stage.addListener(Bozo);


any help on the matter would be greatly appreciated

Resize Browser From Flash?
Hì u all,
I really would like to change/resize the browser dimentions from flash when a object for example is bouncing on it, the problem is that I have no idea how this could work, and what to search...
please help!!!

salta

Browser Auto Resize Itself
how a browser automatically resize itself, once visitors type in the link ? and no rescale allowed.
i know the way to open a fixed size pop up window, but i haven't seen any tutorial about auto-resize browser ?

Browser Auto Resize Itself
how a browser automatically resize itself, once visitors type in the link ? and no rescale allowed.
i know the way to open a fixed size pop up window, but i haven't seen any tutorial about auto-resize browser ?

Scrollbars On Browser Resize
Hi:

I've built a photo gallery in CS3/AS3 which is 1024x768 in size. I set the HTML publish dimensions at 100% and used this code to keep the swf centered in the browser and from resizing if the browser is resized:

import flash.display.*;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP;

SO...how on earth do I get the site to automatically add scrollbars if the browser is smaller 1024x768, so that viewers can move around and see my entire site? Surely this is simple since practically every site on the web calls up scrollbars when necessary.

Is there something I should be adding to my HTML file? After days of searching the web, I've found nothing useful for such a seemingly basic request.

Thanks!!

Resize Browser From Flash
Hì,
is possible to change the dimensions of the browser from flash? For example if an object (movieclip) bounce on it (or touch bottom of the window) the browser gets bigger?
please help.. I don't know even what to search.. browser resizing from flash??

thank in adv.
mak

Browser Auto Resize Itself
how a browser automatically resize itself, once visitors type in the link ? and no rescale allowed.
i know the way to open a fixed size pop up window, but i haven't seen any tutorial about auto-resize browser ?

Bounce On Browser Resize...
i was wondering how to make the flash movie react to the browser window on a resize, like at this site - http://www.nulldesign.de. does anybody have any idea of how to make this bounce effect happen? also, does anyone know how to change the background like it is done in this site (in the customize menu - lights on/off)? thanks...

Browser Resize Confusion
Hi. I try to resize the size of my movie to fit user's screen resolution. After reading many threads, I understand I have to publish with percent setting and put 100% width and height in my embedding code instead of fixed values.

But when I do this, my movie appears very small in my page so I guess I'm missing something.

Also, if i want my movie to be full screen in 1280 x 1024 as well as in 1024x768, I should do my original layout in the biggest format to preserve image quality. Am I right?

Thanks

Browser Resize Issue
I have noticed an odd and annoying effect on some of the machines i've tested on at work.

One of them is set to display the page in the browser as it is resized (as oppossed to just showing you handles and resizeing on release). When this is a page with html content and flash content the html content resizes as you would expect but the flash content trails after it in a disconcerting way.

So i suppose my questions are 2 fold.

1) What causes this and how do u stop it. and

2) What settings in either the OS (win2k in these cases) or the browsers (i.e.6 and netscape 7) affect whether the browser resizes dynamically while you hold the mouse button down or just show handles and resize on release.

fgf

Browser Resize Problems
Hello,

I've had this problem before and don't know why this happens....

I've managed to eliminate the problem on I.E. 5.2 but it still happens on I.E. 5.0.

When the window is manually resized (by moving the corner) the whole movie disappears. Some elements will reappear on rollover but basically you have to refresh the page to get it back up. If you adjust the window size at any time again it disappears.

Here is a link....

http://jsvisuals.com/seongnew/index.html

Someone please help me fix this bug....I will be very grateful.

Thank you!

Auto Resize SWF In Browser
I am trying to recreate the auto fullscreen and resize feature found at this link: http://marketdelmar.com/ can anyone help?

Flash Resize To Web Browser AS3
Okay,

I am having a hell of a time trying to get the following header to resize.
http://www.spectacularstuff.com/php-test/inprogress/home.php

I have the class set to noscale.
I am missing something to do with the width and height. I have read a million tutorials on this and have attempted to do this 1000 times and it is not working. I keep running into errors I do not understand.

Here is the code to my noscale class. Can anyone please help me on what I am missing to get this thing to resize with the browser windows so that it is fluid?

I want the same effect as the following:
http://www.senocular.com/demo/Layout/examples/StageResize.html
Full Screen from 1 edge to the other and resizes everything when the browser window is smaller or bigger.

Thanks for any help,

Wayne





























Edited: 10/26/2007 at 08:43:20 PM by SpectacularStuff

Resize Swf With Browser Window
I have a swf with a background that resizes when I resize the browser window. Everything works fine.
Then I have a second swf which I load into layer 5 and it does NOT resize with the rest of the content.
How can I change this?
Also, How can I make sure that the second swf will not be in an odd proportion when it is being resized. I dont want it to be scrunched.
You can see what Ihave now at
http://joshuataylordesign.com/fullscreen.html

and the code attached below







Attach Code

import flash.display.*;

Stage.scaleMode = "noScale";// no resize of the swf
Stage.align = "TL";// align top left.




image = "image.jpg";// url of your image

// movieclip loader and smoothing image
var receveur_mc:MovieClip = this.createEmptyMovieClip("receveur_mc", 1);

receveur_mc.createEmptyMovieClip("container", 1);
receveur_mc.createEmptyMovieClip("bitmap_mc", 2);

receveur_mc._visible = false;

var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
target_mc._visible = false;

var bitmap:BitmapData = new BitmapData(target_mc._width, target_mc._height, true);
receveur_mc.bitmap_mc.attachBitmap(bitmap, receveur_mc.bitmap_mc.getNextHighestDepth(), "auto", true);
bitmap.draw(target_mc);
receveur_mc._visible = true;
bouge();
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip(image, receveur_mc.container);

//-------------------------------------


// resizing functions
var ecout:Object = new Object();
ecout.onResize = function() {
bouge();
};
Stage.addListener(ecout);

bouge = function () {
var rapp:Number = receveur_mc._width/receveur_mc._height;
receveur_mc._x = 0;
receveur_mc._y = 0;
receveur_mc._width = Stage.width;
receveur_mc._height = Stage.width/rapp;
if (receveur_mc._height<Stage.height) {
receveur_mc._height = Stage.height;
receveur_mc._width = Stage.height*rapp;

}

};



// ----------------<MCL>--------------------------\
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();

myMCL.addListener(myLisntener);
// ----------------</MCL>--------------------------\



var myListener:Object = new Object();
myListener.onLoadInit = function(mc:MovieClip):Void {
mc._x = 0;
}
myMCL.addListener(myListener);

myMCL.loadClip("menu.swf", 5);

Browser Resize Issues
Hello All,

i've done the browser resize tutorial here...but it doesn't work in firefox.
a friend told me to use dive tags but that doesnt' work either.

i'm trying to create a site like this
notice if you scale your browser...the bottom player adjusts .sliding w/ the bottom of the browser...!!

how do they do that??

how do you get a Movie clip to dynamically move when you adjust your browser...

heres my site in progress..


any and all help is appreciated!

Thanks in advance,

Ry

Browser Auto Resize Itself
how a browser automatically resize itself, once visitors type in the link ? and no rescale allowed.
i know the way to open a fixed size pop up window, but i haven't seen any tutorial about auto-resize browser ?

Browser Auto Resize Itself
how a browser automatically resize itself, once visitors type in the link ? and no rescale allowed.
i know the way to open a fixed size pop up window, but i haven't seen any tutorial about auto-resize browser ?

Why Is Swf Unloading On Browser Resize
i'm working on this site. despite its many problems i am currently focusing on one. to see the problem go to the site, click on the first empty thumbnail (defined by a grey border) next to TV. this will load an swf into an empty mc on the main stage. this empty mc is set to move with the browser window so that it remains in the middle of the stage.

now. the problem:
if you change the size of your browser the swf unloads. how do i avoid that?

this is the code telling the empty mc to stay centered

Code:
Stage.scaleMode = "noScale";

var canvasWidth:Number = 600;
var canvasHeight:Number = 500;
//on resizeing screen
var stageListener:Object = new Object();

function positionContent():Void {
tvload_mc.gotoAndStop(1);//send logo to first frame so that the calculations dont use the positioning of the extended logo width
//these 2 lines position the tvload_mc in the middle of the screen
var xMax = (_root.canvasWidth/2);
var yMax = (_root.canvasHeight/2);
//these two lines will put it in the upper left of the screen
//var xMax = (_root.canvasWidth/2) - (Stage.width/2);
//var yMax = (_root.canvasHeight/2) - (Stage.height/2);
//for pixel fonts to be clear, you have to use rounded numbers for their x and y location
tvload_mc._x = Math.round(xMax);
tvload_mc._y = Math.round(yMax);
}

stageListener.onResize = positionContent;//on resize of the stage, call the function positionContent
Stage.addListener(stageListener);

positionContent();//call positionContent function on load.
this is the code on the TV thumbnail

Code:
on (release) {
_root.tvload_mc.loadMovie("videogallery_test1.swf");
}

Flash Resize Browser
Hi all,

I am looking to have a site setup so that when you go the the index page, it automatically enlarges the window to fill the browser screen depending on the user's resolution size, similar to this site:

http://www.hungrysuitcase.com/

Can someone please help?

Thanks in advance...

HELP...autocale/resize To Fit Browser
hi guys.....
i still have this problem that i cant solved,maybe anybody can help me,

its about autoscale/autoresize (i dont know what to call it) a movie so it will fit any size of browser,
look for example in : http://ravijour.com (try to resize the browser,or change your screen resolution)
or in : http://www.milesaldridge.com

i'm looking everywhere including in kirupa's archives,but i cant found anything,or maybe i looked the wrong "title"....
could anybody,anyone help me.....
a sample (.fla) file would be appriciated...


much love

Quirky AS3 Browser Resize Help Please
Hello All-

I have been battling against this browser resize issue for what seems like monthes. After several variations, my code is more effective, less concise and still not stable. I am basically trying to make my bg resize to the full browser and my site movieclip to center. If the browser gets smaller than the site MC then the site MC should constrain to fit in the browser. What I have right now works like 98% of the time, but still screws up and makes the site tiny or too big sometimes. I was hoping that someone else has gone through this and may be able to comment or drop in some good code. As I said mine got uglier and uglier as time went. I kind of hate this code. If I didn't write it, I'd say the author was insane... which I kind of am.

anyhow, any help is mucho appreciated.

here's the code for a look.


Code:
import gs.TweenLite;

stage.align=StageAlign.TOP_LEFT;
stage.scaleMode=StageScaleMode.NO_SCALE;

var siteHeight:Number = 600;
var siteWidth:Number = 850;
var siteRealHeight:Number = 600;
var siteRealWidth:Number = 850;

var siteAspectRatio:Number = 850/600;
var theFactor:Number;
var stageOldHeight:Number = 600;
var stageOldWidth:Number = 850;

var resizetimer:Timer = new Timer(1500,3);

resizetimer.addEventListener("timer", firstResizeHandler);

init();

function init() {
stage.addEventListener(Event.RESIZE, resizeHandler);
TweenLite.to(site, 1, {scaleX:1, scaleY:1});
resizetimer.start();
}

function firstResizeHandler(event:TimerEvent):void {
position();
}

function resizeHandler(event:Event):void {
position();
}

function position(){

bg.width = stage.stageWidth;
bg.height = stage.stageHeight;

if(stage.stageWidth < siteWidth) {
siteResizeWidth();
}
if(stage.stageWidth > stageOldWidth && stage.stageWidth < 850) {
siteResizeWidth();
}
if(stage.stageHeight < siteHeight) {
siteResizeHeight();
}
if(stage.stageHeight > stageOldHeight && stage.stageHeight < 600) {
siteResizeHeight();
}
var siteX:Number = (stage.stageWidth)/2 ;
var siteY:Number = (stage.stageHeight)/2 ;

TweenLite.to(this.site, 0.5, {x:siteX, y:siteY});

stageOldHeight = stage.stageHeight
stageOldWidth = stage.stageWidth;
}

function siteResizeWidth(){
theFactor = stage.stageWidth/stageOldWidth;
site.width = (site.width*theFactor);

siteWidth = (siteWidth*theFactor);
siteHeight = siteHeight*theFactor;
site.height = site.height*theFactor;
}

function siteResizeHeight(){
theFactor = stage.stageHeight/stageOldHeight;
site.height = (site.height*theFactor);

siteHeight = (siteHeight*theFactor);
siteWidth = siteWidth*theFactor;
site.width = site.width*theFactor;
}
thanks for the help!
michael

X And Y Scaling On Browser Resize
Hi

I have searched the forums for this problem and some poeple have touched on similar problems but nothing seems to hit what i need so I hope someone can help.

I have the following code on the first frame of my timeline:

Code:
stop();
//load test image
loadMovie("test.jpg", this.holder);
Stage.align = "TL";
Stage.scaleMode = "noScale";
//set start position for background and image holder box
background_mc._y = Stage.height/2;
background_mc._width = Stage.width;
background_mc._height = Stage.height/2;
//resizing function
reSize = function () {
holder._x = Stage.width/2-holder._width/2;
holder._y = Stage.height/6;
holder._height = Stage.height/1.5;
holder._xscale = holder._yscale;
background_mc._width = Stage.width;
background_mc._height = Stage.height/1.5;
background_mc._y = Stage.height/6;
};
stageListener = new Object();
onEnterFrame = function () {
reSize();
};
stageListener.onResize = function() {
reSize();
};
Stage.addListener(stageListener);
this loads an image and will center it and scale it roportionally as I change the browser window size vertically.

what i want to do is to have it also scale the loaded image as i change the browser window size horizontally - currently it keeps it centered when i change the horizontal size of the browser window but dosent scale it to fit.

can anyone help as I really have no idea how to do this and Im sure its not that complex.

cheers

dan

Browser Resize Question.
hello.

I've stretched a black band at the bottom of my swf using the folowing code.

Code:

// bottom band resize



sWidth = 900
sHeight = 650

function Resize() {
   bottom_mast._x = -((Stage.width-sWidth)/2);
   bottom_mast._y = (sHeight+(Stage.height-sHeight)/2)-bottom_mast._height;
   bottom_mast._width = Stage.width;


}
Stage.scaleMode = "noScale";
var myListener:Object = new Object();
myListener.onResize = function() {
   Resize();
};
Resize();
Stage.addListener(myListener);


// end bottom band resize


I'd like to place a logo in the bottom right corner and have it maintain its position on browser resize.... having trouble since the band is there... the bottom_mast (band) is 40 pixels high.

How do I go about incorporating another element in this?

Thanks!
Dan

Copyright © 2005-08 www.BigResource.com, All rights reserved