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




Allow Stage To Be Resized Through Flashvars;



Hi,

I have completed my first 100% Actionscript flash banner thing that loads in external images and gets paths from XML.

Now I'm wondering, can the stage be changed to a size specified? Im just thinking that I can re-use this banner on different sites without ever having to open it up in Flash and change the Actionscript.

Stage.width doesnt do anything, but then what about if I used fscommand("scale", "true"), then set in the swfobject width 100%, height 100%, could I just make the swf go to 100% of the container element (ie. div) without it scaling any of the images inside?

I have used the search on this forum and found this link

Does this suit my needs?



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 10-09-2008, 12:38 PM


View Complete Forum Thread with Replies

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

Can The Stage Be Resized?
I have built a Flash file with a fixed width to be embedded in a webpage. Everything works perfectly except the client wants one section of the page to scroll. I used the scroll component, but that is not what he wants. He wants the actual Flash file to scroll within the web page. I know this is possible by setting the size of the stage at a particular width and using scroll tags in the web page, but some of my Flash file is a fixed width and the other needs to be made longer in order to scroll within a webpage.

Is this possible?

Can A Stage Be Resized Dynamically
I am asking this question as you folks here seem to know your
****. I have learnt a lot from the people at flash kit so here i am again to ask a question.

I want to know if this is possible at all in actionscript.

I want to know that once a swf is playing whether a user can
resize their stage size for example if i had made a
thing where you could draw things and print it and i wanted the user to be allowed to change the stage size

can it be done please help

cheers pixelmagik

Can The Stage Be Dynamically Resized And Scroll Bar
My objective is to add horizontal and vertical scroll bars to a .swf at runtime .

the situation is this.

Im trying to create a dynamic changing organization chart tree.

pixels: the size of the chart can vary between 300 X 400 to even 2400 X 1800 etc

all depends on the values present in mysql database.

Now I intend to draw rectangular boxes to represent each entity in my organizational chart

for each rectangular box in the organizational chart I intend to create a separate movieclip like

_root.createEmptyMovieClip ("rectangle1", 1);


with (_root.rectangle1) {
lineStyle (5, 0xff00ff, 100);
beginFill(0xff00ff, 100);
moveTo (150, 25);
lineTo (200, 25);
lineTo (200, 75);
lineTo (150, 75);
lineTo (150, 25);
endFill();
}

and

_root.createEmptyMovieClip ("rectangle2", 2);


with (_root.rectangle2) {
lineStyle (5, 0xff00ff, 100);
beginFill(0xff00ff, 100);
moveTo (200, 25);
lineTo (250, 25);
lineTo (250, 75);
lineTo (200, 75);
lineTo (200, 25);
endFill();
}

etc

I intend to put this in a loop and create dynamically the x and y co ordinates and the number of movieclips (boxes) will vary based on data present in mysql database

ie. there could be many movieclips in the same row

while creating this flash mx 2004 professional application

so now if I define a canvas(stage) size of say 300 X 400 it could accomodate just about say 5 horizontal boxes and 5 vertical boxes max

and if the action script tries to print the 6th box it will print outside the stage and that box will not be visible at all.

but if I choose an ALL inclusive size of 2400 X 1800 it will look really odd indeed if there are fewer boxes...

remember the boxes will be drawn dymaically using actionscript. so if the action script tries to print a 6th box in a 300 X 400 canvas(stage) then a scroll bar should appear automatically.. is this possible ?

so I need a scroll bar both horizontal and vertical for my entire stage(canvas) to appear automatically

is it possible ?

I tried to use the scroll pane component but then it loads *another* swf file..

and *that* .swf file's dimension needs to be static !

so it also will not be suitable for me.

Anticipated thanks your help.

param

[F8] Align To Stage When Browser Is Resized
Hello fellow humans,

I need to know how to align a _mc to the bottom of the stage no matter how large or small the browser is stretched.

right now I'm using this script to change the purpotions of a mc.
topstretch._width = Stage.width;

I know it must be close to the script used above I just cant find anything on the world wide web to tell me more.

Any help would be rad!
~Snake

Retile Background When Stage Resized
I want the background of a proloader to be retiled when the stage is resized. I'm guessing I have to delete the previous sprite and then retile, sort of like this:


ActionScript Code:
loaderContainer:Sprite = new Sprite();addChild(loaderContainer);loaderContainer.mask = smask;function resizeLoader():void {            if(loaderContainer.numChildren > 0) { loaderContainer.removeChild(backGroundSprite); }    loaderContainer.y = stage.stageHeight-62;        smask.x = 0;    smask.y = stage.stageHeight    smask.width = stage.stageWidth;        var backGroundSprite:Sprite = new Sprite();        backGroundSprite.graphics.beginBitmapFill(new Pattern(0, 0));    backGroundSprite.graphics.drawRect(0, 0, stage.stageWidth, 62);    backGroundSprite.graphics.endFill();    loaderContainer.addChild(backGroundSprite);        trace(loaderContainer.numChildren);    }resizeLoader();stage.addEventListener(Event.RESIZE, resizeLoader);


This does not seem to be working. Am I going about it the wrong way?

Need Script To Work Regardless Whether Stage Is Resized
So I made a listener that moves around MCs when the stage is resized and it works great. However the script doesn't work until the stage is resized . Below is the script and I would really appreciate it if you could show me how to get the script to work regardless if the browser is resized.

var stageResizeListener:Object = new Object();
stageResizeListener.onResize = function() {

back_mc._x = Stage.width-back_mc.width;
back_mc._y = (Stage.height+1)/2;
next_mc._x = Stage.width-next_mc._width;
next_mc._y = (Stage.height+1)/2;
};
Stage.align = "TL";
Stage.scaleMode = "noScale";
Stage.addListener(stageResizeListener);
Stage.addListener(sizeListener);

Calculate How Much Pixels The Stage Resized.
How can I calculate how much pixels the Stage resized?

What I want to do is this:

ActionScript Code:
var stageListener = {};
Stage.addListener(stageListener);
stageListener.onResize = function():Void  {
    var dif:Number = //how much pixels the stage resized
    //
    this.myMC._width = Stage.width - 70 - dif;
   
};


Can anyone help? Pleeeeaaassseee...

Stage.stageheight Works Until Resized. Workoround?
i took a mathematical approach to centering my movie clips. it all seemed good for a long time. until i resized it (i need it full screen). every time i resize it stage.stageheight goes hey wire. is there another way to effectively center my movie clips. i need wish it to be something like stageheight since i need it to center on especific objects inside movieclips like in speedtest.net where it centers on a place of a map. i already got the math down so help please.

How To Get Resized Component Size When Using Stage Scale Mode ShowAll
Hi

Could anyone please tell me how I can get the modified height or width of a component (e.g. a button) when the stage scale mode is set to showAll. Here is a simple (I had hoped) task. Put one button component on the stage, set the scalemode of the stage to showAll. If I wanted to keep the button in the centre of the stage as I resize the stage (in showAll mode), how can I do this? stage.stageWidth updates, but the buttom component width property always stays the same,

Resized
gentlemen, ladies

I need some help. I posted a thread on a chromeless window a little while ago but iI didn't get any help. Attempt two. I don't think I need chromeless. Basicly I have a site thats full screen, but when viewed on a small monitor it's cut off. I CANNOT figure out why. PLEASE help. If you have any information on what i'm doing wrong please tell me. It looks fine on a 15 to 22 inch monitor, but when viewed on a 12 or a laptop monitor the bottom is cut off. SOMEONE please help.

Resized?
in flash i have done this fla
and when it's on the web it's like this
all black and the img that was suposed to be on the middle it's on the upper left corner..!! how can i make it appear like what i did? help me

Sites That Can Be Resized...how Is That Done?
Can anyone tell me how to make movies that automatically resize? Is that done in 3rd party apps like Dreamweaver or through action-scripting?
A good example of what I'm talking about is http://www.ralphpucci.com
The site stays centered around a background that can be resized.
Anyone have any ideas on how to do that?
Thanks

Flash Resized
http://img.photobucket.com/albums/v4...ntang/beta.swf

i made it from 468 x 60 px, but after i host it , i just resized, any way that i could fix the size?

[F8] Gap Between Resized Buttons
Hi,

i have few buttons, and on rollover i resizing them, everything works fine.

but i want to leave the gaps between all buttons the same as they were before resizing.

see in attachement.

any ideas?

Why Does My Movieclip Get Resized?
Good evening, my Flash demo looks horrible!
The movie clip that plays back each .swf in turn gets resized by the clip. I'm perplexed which command to keep it viewable. I use MX and I'm not a Actionscript guru (I finally got loadMovie to kinda work between layers, but not so good) but I do understand OOP and some geometric concepts, so give it to me straight. Obviously I'm kinda beyond a simple search and grab, though.
I'm grateful for any assistance.

Hundreds Of Flv's Need To Be Resized
Last year we made hundreds of flv's used in online training. The client insisted on a 480x360 dimension, which is now proving too big and we need to resize all the flv's to 320x240. Original uncompressed .avi's are gone. Is there any way to open 10 to 12 flv's at a time, reduce their dimension size and export them back to .flvs efficiently. Sorenson Squeeze and After Effects won't import flvs. Flash 8 will, but the process would be clunky and take forever doing them individually. I searched for a software tool to do this, but found nothing.
Any advice welcome.

FLV Gets Automatically Resized
I have the following script that works perfectly to play random and in a loop but everytime it loops the size of the video is resized but i cant see where its being done...Anyone who does see it?

my_FLVPlybk.muteButton = mute;

var movies:Array = ["filmpje1.flv","test.flv","filmpje3.flv"];
var tempMovies:Array = movies.concat();
var lastMovie:String = "";

function getMovie():String
{
if(tempMovies.length==0){
tempMovies = movies.concat();
trace("--------LEEG-----------");
}
var movie:String = tempMovies.splice(Math.floor(Math.random()* tempMovies.length),1).toString();
if(lastMovie==movie){
tempMovies.push(movie);
return getMovie();
} else {
lastMovie=movie;
}
return movie;
}


var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object) {
my_FLVPlybk.play(getMovie());
}

my_FLVPlybk.addEventListener("complete", listenerObject);
my_FLVPlybk.play(getMovie());

External SWF Gets Resized
I'm using the code below in a movieclip in Flash CS3 to import an external swf into my project. However, every time I upload the site to the server (http://www.kimandbrett.com), when I click on Gallery, the Gallery.swf is stretched out & the image is too big. I tried uploading the same exact thing to http://www.personal.kent.edu/~nglase/FlashSite/index.html & it works just fine. The site that is not working is hosted by GoDaddy. Are there any server settings that might be causing it to behave differently?

Thanks,
Natalie







Attach Code

var _loader:Loader;

_loader = new Loader();

_loader.load(new URLRequest("Gallery.swf"));
addChild(_loader);

Restart When Resized
I have a little question. I have a flash movie in a html page, it resizes when the window is resized, but when it's resized it starts over again. Is there any way to prevent this?

Restart When Resized
I have a little question. I have a flash movie in a html page, it resizes when the window is resized, but when it's resized it starts over again. Is there any way to prevent this?

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

How To Prevent Loaded Jpg Getting Resized
I have a web page that contains a movie file that is set to occupy 100% height and width, I have dynamically loaded jpegs in an empty movie clip in this movie. But is it possible to prevent the 300*400 images being strecthed along with the base flash file movie, so that even if the rest of the flash file resizes the jpegs stay the same size???

Pop-up HTML Window (cannot Be Resized)
greetings,

how i can make a button that when clicked a pop-up window will appear but u cannot resize it?

in a HTML site i would do like this:


Code:
<script language="JavaScript">
<!-- Begin

function openWindow(winname,str,name)
{
winname = window.open(str,name,'scrollbars=yes,width=750,height=600,resizable=no')
}

//-->
</script>


but i dunno in flash...please help!

thanx

Twinphotographie Resized Mc Effect?
This site, www.twinphotographie.com resizes the mc to fit the jpg. I would greatly appreciate any help in figuring this one out. There was a lengthy thread on it a while ago, but the Search gods won't help me find it. Does anybody have a handle on this code?
Many thanks!
Cos

Resized Images Twitching
I am resizing images in Photoshop and when I import them to Flash and animate them they twitch at the end of the tween. It is wierd. If I import the image without resizing them....the twitch is gone. Not sure why.

Does anyone know why or know what to do to fix this.

Thanks Tom

External Image Being Resized - HELP
Hi..

I'm having in issue with an external photo (.jpg) which the .swf loads at runtime.

The image is the same size as the flash movie, but for some reason when it loads it, it enlarges the image. (you can see that it becomes more pixelated and larger).

Why is this happening??? I don't want it to enlarge!

Zip file of the .fla, .jpg, and .txt. files attached

Thanks!

/bob

Resized Movieclips Move BUG
Check it out:

http://razumov.info/flash/resizebug/index.html

1. In first swf (resizebug.fla): resized movieclip from library. Only one AS code in first frame:

Code:
asd.startDrag(true);
2. Non-resized.


Any ideas? Looks like Flash Player Renderer BUG!

Why Why Images From PS Pixelated If Resized
I bring in images from PS

.png (need transparency)

when I resize, the image .. i even brought in 300DPI

it gets all pixelated!

Opening A New Resized Window?
I was trying to use the following code:

function kkHandler(e:MouseEvent):void{
var url:String = "javascript:window.open('flashplayer.html','preloa der','width=750,height=550');";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, '_blank');
} catch (e:Error) {
trace("Error occurred!");

but I keep getting a sandbox error and can't figure out a way around it.

Can anyone help?

Thanks.

.FLV Resized, But Same File Size?
Hey guys,

I've just done a video for work, which will be uploaded as an .FLV in varying sizes (for folks with less than amazing Internet connections).

I converted the .AVI into an .FLV at it's full resolution (720x576), and it came out at about 35mB, which is great. I imported the same video and, using the conversion settings, halved the resolution. The file size is still the same...

Anyone know of any way to import it, with the same bitrate, audio settings etc, but at the lower resolution, with a lower file size? Is it coming out the same because it's the same source video? I know I could re-render a smaller .AVI, but I'd like to try get around it in Flash first.

I'm using Flash CS4 at the moment but could easily switch to a machine with an earlier version, like Flash 9.

Cheers,
Rik

Textboxes Resized Dynamically
Hello flashers!

I need some help. I need to create a dynamic text box with a graphic background that loads the text from a txt file. I want it to be dynamically resized in height along with the background (I donīt want to use a scroll bar) to make the text fit.

Can anybody please tell me how to do this.

Thanx!!!

Complete Movie Needs To Be Resized
please forgive me for posting a question that's already been asked numerous times. to minimize wasting your time I did search the forums but the problem I ran into was just me getting more confused.

my question, I have made a complete flash site and found that I need to resize it. is there any easy solution to resize everything (objects, text, etc) without manually resizing everything one by one? Any help would be much appreciated. Thanks.

Mc Container Resized By Xml Content
hi all,
i'm wondering :
is there a way to have a container mc resize itself according to the content, that is, text loaded via xml ?

so let say the mc before the xml loading process, is 100px height, and the xml loaded requires 120px height, how can i make it to resize according to the content ?

thanks for your ideas,

alex

Resized Movie Is Pixelated
Hi everyone - I used some software to record screen movements (so you can create a software demo) - the software creates a SWF file which I placed on the stage.

In some cases, I want to show the movie at a reduced size (i.e. 33%). When I resize the movie and then preview it, the image is pixelated and unclear.

I believe this is due to the resizing.

Are there any good solutions?

I need to use the movie at various sizes including 100% through the timeline.

Thanks

_xmouse On Resized Movieclip
I am creating a video player and have a scrub bar which you can click on the timeline to get a point in the video.
The player is dynamic in size and can be opened at any size you require, set by the movie dimensions in the HTML.
I have the controls for the player resizing and positioning dynamically with the width of the movie, so the scrub bar is dynamically changed in length.
Everything works except when I click on the bar and retrieve the _xmouse position is is still returning the original coordinates of the movieclip, its size when created.
The width of the bar in pixels is being returned correctly when I check, it is just the _xmouse coordinates which are returning original values.

e.g. (for ease I have rounded things up)
If I increase the width of the movieclip from its original 400px to 800px wide, when I click 3/4 of the way along the resized movieclip I get a result of 300px instead of 600px.

Do I have to reset something?

Thanks





























Edited: 05/09/2008 at 05:07:28 AM by thebobajob

Stretched, Shrunken, Resized...
Hi there guys and gals
Have a look at the zip file I attached it contains 7 flash files with their swf files. If you open "main" you'll see that it "external loads" the other 6 movies.

My question is simple. I've made the other 6 swf's a specific size but when the main movie loads them, some get stretched, some get resized and I'd really like it if they didn't resize.

Can anyone help?

Complex Button And Resized Pop Up?
Hi,

Is it possible to get a new window in a certain size (let's say 700 x 520) when clicking the complex buttons from Warhero's tutorial? The button from the tutorial works fine and getting a new window as well ofcourse, but I can't get it to resize to that size...

Thanks : )

Quality Of A Resized Image ?
I'm trying to resize an image in Flash8 with actionscript... but the quality of the resized image is not too good... for example, in Photoshop, the program also smooths out the resized image, but flash doesn't..

flash seems to just squeeze the image together without any smoothing...

ideas ?

Alpha Changes When Browser Is Resized?
http://touchsun.freehostia.com

Resize the browser and watch the alpha on the logo text change...
Why does it do this?

My Actionscript:
Code:

Stage.scaleMode = "noScale"
Stage.align = "TL"

var stageW:Object = Stage.width;
var stageH:Object = Stage.height;
var stageHalfX:Object = Stage.width/2;
var stageHalfY:Object = Stage.height/2;

this.attachMovie("logo","logo",this.getNextHighestDepth);
logo._x = 35;
logo._y = 25;

var stageL:Object = new Object();
stageL.onResize = function () {
  logo._x = 35;
  logo._y = 25;
}
Stage.addListener(stageL);

Resized Image Quality
I am resizing some images in my movie and the quality is very poor.. all the images I am resizing are dynamically loaded into my movieclip, so I need a code based way to increase the quality when resizing images.

MovieClip Dynamically Resized?
i am wondering how i would write actionscript that would increase the hieght of MovieClip1 to equal the size of MovieClip2.

MovieClip2 is an empty movieClip that upon load of the page populates with a number of movieclips dynamically via an xml sheet. this movie clip will vary in hieght depending on the amount of items in the xml sheet.

Movieclip 1 contains a rectangle of a default size.

What i need is Movieclip1 to resize automatically to match whatever MovieClip2 is at any given time.

any help would be greatly appreciated!

Need SERIOUS Help To Open New Resized Browser Window
I've been trying this for some time now and nothing seems to work. Is there an easy way to open a new browser window from flash? Can someone please help me out here?

>>>>>>How Do I Popup My Flashsite In A Window That Cant Be Resized?<<<<<<
is it javascript or is the script native to flash?

thanks...help much appreciated

*kiss*

Resized Button Doesn't Work
I've got a invisible button working in a MC.

But when I resize this button with

setProperty(this[newClip2].NButton._width=100);
setProperty(this[newClip2].NButton._height=50);

It stops acting like a button.
Strangly enough when I put something, anything in the
first frame of the button symbol, it starts working again.

Puzzled!

Text Doesn't Fit When Movie Resized
Through HTML, I have a movie being resized in a table based on the user screen resolution - in this case either 800x600 or 1024x768.

In the movie, I am using dynamic text fileds calling out to a .txt file. At 800x600, the dynamic text fits in the text field properly, but once resized, the text size slightly increases, or something, and the text no longer fits the text box perfectly.

Anyone have any suggestions regarding this.

Thanks,

Setting Alpha Once Movieclip Has Resized
Hope someone can help me...

I have a movie clip which resizes itself depending on the variables certain buttons send it. On one button the code is:

on (press) {
wide = 233;
high = 22;
tellTarget ("_root.content")
gotoAndPlay("about");
}

The movie clip then resizes itself to the variables wide & high. It also commands the another movie to goto the label "about". that all works fine but then i want the label "about" to check whether the resizing movieclip has finished before continuing.

I put an if statement on the label "about":

if ((_root.panel._width == _global.wide) & (_global.high == _root.panel._height)) {
gotoAndPlay(4);
}

but it doesn't go to frame 4.

can anyone shed some comforting light???

Repositioning Content When A Movie Is Resized
I was reading the technote at moock's technote and I was trying to have a horizontal line going across the screen. And resizing as the screen resizes.
Can it be done using attachMovie?

Any ideas?

Resized Pop Up Photo Links From Thumbnails?
hi, i'm trying to get thumbnail links from my .swf file to generate pop-up windows that are resized to the photo....

i have one main .swf file... and scenes within that file. in the "photo" scene, i have pages of thumbnails... when you click on the thumbnail, another larger version of the photo appears... and that photo i have set as a button with the following action:

on (release) {
getURL("javascript:newWindow('char1.htm','300','40 0')");
}

...i have programmed the java for my index.html page so that the flash file is opened in its own resized window. how do i get the photo links to work? is there a code i need to put in dreamweaver? or will the above code suffice? waaaah it's so confusing since this is all coming frmo within ONE main file...

please help!

kira

Can Flash Movie Be Dynamically Resized?
Can Flash movie be dynamically resized? What I mean is the swf movie embedded in an HTML file for example takes on a different size, length, for example.

Say the original size is 800 (w) x 600 (h) px when the movie starts. now user has clicked a link and the next MC that's loaded into the original movie is taller because of a lengthy text area, say 800 (w) x 900 (h) px. Can the original movie be resized, if it doesn't fit the screen then the browsers scrollbar can be used.

Thanks for any ideas.

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