Resize Swf
Hi all,
I m trying to load an external swf file into a mc. The problem is that the dimensions of the swf file are bigger than the ones of the mc. How can I resize the swf so it fits?
Many thanks, Soto
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 09-19-2006, 06:09 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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
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.
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
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
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!
I Cant Resize Windows And Stop Resize.
I'm going mad here! - I know this is probably really simple but i have a flash movie and i want the links to pop up in a new window of a defined size - i also want to turn off resize and get rid of the toolbar and scrollbar.
If anyone can help me Id be really grateful! :-)
Thanks - Dan (dan@introspection.f2s.com)
Resize Movieclip BG Per Stage Resize
I'd like to have a movieclip that scales in the background per the resize of the browser. I'd also like to have menu 200 pixels to the left of the stage width. How would I set it up in AS3? Thanks
ReSize Doesnīt Resize Automatic But Why?
Hey.
Iīm kinda stuck.
have a look: reSizse sucks right now
my problem is that you canīt see the hole background untill u manually resize the browser window. i just canīt figure out why it doesnīt work.
maybe itīs beacuse itīs late, maybe beacuse iīm getting sick or maybe beacuse I just suck at this.
please help anyone?
u can download fla file n everything right HERE
tnx in adv
//Mo
Resize Mc On Stage Resize
Hi,
I'd like to resize a movie clip via a percentage of the available screen size, so that when the stage is scaled, the movie clip responds accordingly. - Any help greatly appreciated.
Ben
Help Me Its Possible Way I Can Resize My Swf? Its 14mb, I Want To Resize To 5mb
I created a series of animation of pics with backgound music on it. It has also
buttons which they could change the background music. It works well but it was 14 mb,
The purpose of this animation was to embed it to my webpage. Uploading it to my site is already a pain in the ***, but my concern is for the viewer that they could easily view this animation of mine.
Now my question is. Can I possibly resize my swf considering its 14 MB, resizing it to atleast 5 MB without changing the quality? Help me masters, coz I'm still a newbie in flash
Stop Resize In A RESIZE
hey...there's a open source running around somewhere...
with a resize setup for loading a JPG into a empty MC...
and there's a border that resizes to that image once it's loaded..
it's even tweened to scale smoothly... (below)
problem 1:
it's a bit hefty for the eye... but it works sweet...
but i'd like to manage to work some Zigo tweens into it...
i was wondering if anyone has the super powers to
figure out how to recode it so the resizing is done through
those easing classes and tween and them through fuse...
problem 2:
i modded the resize... inside the border...this little crop box i created...
i added movie clips that are looping through a doTween setup...
so instead of lines defining the border (which will be resized according to which jpg or png is loaded) ... i have movie clips running up and down each of the total 4 sides...
but when they resize....it stretchs the in a very ugly way...
it's like in design class when the type teacher said...
don't stretch the type...i was reaffirmed why...cuz it looks like crap.
is there a way to resize a movie clip...
and have the movie clips running inside that movie clip stay constrained? ; to remove unproportional scaling?
Code:
spacing = 50;
containerMC._alpha = 0;
MovieClip.prototype.loadPic = function(pic){
_root.containerMC._alpha = 0;
this.loadMovie(pic);
_root.onEnterFrame = function(){
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1){
var w = containerMC._width + spacing, h = containerMC._height + spacing;
border.resizeMe(w, h);
delete _root.onEnterFrame;
}
}
};
MovieClip.prototype.resizeMe = function(w, h){
var speed = 5;
this.onEnterFrame = function(){
this._width += (w - this._width)/speed;
this._height += (h - this._height)/speed;
if( Math.abs(this._width-w)<1){
this._width = w;
this._height = h;
_root.containerMC._x = this._x - this._width/2 + spacing/2;
_root.containerMC._y = this._y - this._height/2 + spacing/2;
_root.containerMC._alpha = 100;
delete this.onEnterFrame;
}
}
};
can someone take a crack at this? it's giving me allergies...
thanks in advance!
anybody run into any flash chat rooms where people can have live feedback and pass some flash nerdtalk? cuz i'm way down for that.
22/m/actionscript,tokyo
Resize?
i'd realy like to know how, once i have set-up my movie to run full screen (no browser visible), i can give the user the option of then viewing the browser if they choose...
..after all it does seem a bit, well, rude.
any ideas???
Resize HELP
I designed a movie....on a stage are of 700x350.....I opened up tje .fla again...and now decided that I want the whole thing bigger. Like an area of 775x425..or something..
This .fla has many layers...in main time line...as well as MANY individual MC's in it. Is there a way to resize everything so it will all be proportionate if I mae the movie dimensions 775x425?....There ha sto be a way to do this no?..Thanks -whispers-
No Resize, Please.
I have just finished my first Flash splash page and I really don't want it to resize to fit the window (although that is a cool feature--just not for this one). When I play the .swf file alone, it doesn't resize. When I drag .html file to a browser window, it doesn't resize. But after both are uploaded and on the site, it resizes. What's the problem here? I have the width and height set to 800x600 in the code and in the .fla file. Please, I beg of you gurus, help me.
Thanks!
Not Resize
hey guys,
I have a .swf file that users can run in the flash player or out of their browser. I would like it to not resize to the window...so I'd like 100% to be the default instead of "Show All". Does anyone remember the command for this in actionscript? Or would I have to do it through an html page?
Thanks!
dege
Resize Swf From Another Swf..?
umm ok...im still looking in forums about this but thought id ask too
im trying to resize a loadMovie swf from another swf..how do i do that??
REsIZe <<<>>>>
Is there anyway to resize an MC using _xmouse and _ymouse??
Thanks!!!
Resize All
Hi
I have a Flashmovie, with about 540 frames. Now I would like to resize all. That means I would like to resize each graphic and each Textfield in every frame (to get 50% smaller)
Is there a way to handle that, without doing it in every single frame?
Resize
Ok, I know how to resize my canvas,
However, I already have the movie made, and I need to resize for a different use. Problem is when I resize the movie all the content stays in the upper left corner.
Q: How can I resize a movie content and all to keep everything centered? (Similar to when resizing in photoshop)
Resize Mc
Hi , ive to do this, how can i resize a mc like this?
http://www.softbimage.com/sbpics
thanks.
No Resize?
This may be silly...
You know how I can tell my exe file not to resize when the viewer puts it in full screen or even resizes the window?
Can I tell my swf the same thing? I know I can do that by telling the html file that holds it not to resize the movie, but my problem here is I'm not using an html. The swf is supposed to run by itself... is there a way for me to prevent it from being scaled like that?
Thanks!
Resize ?
I have a document which is 350px by 350px. then I have an image which get smaller and larger depending on what value it is sent.
currently, here:
http://www.vaude.com/temp/query/imgC...gt=400&wdt=400
the image resizes proportionally by values passed to the HTML page fine.
What I need to do is resize DISproportionally (100 x 700)
I did it thru actionscript which worked, but then when it got larger the movie size of 300 x 300, the sides would get cut off.
is there anyway to do this so you can resize proportionally?
Resize SWF
Can i resize swf file in new fla file. Like in dreamweaver we grap the handles to resize swf, same i want to do it in flash.
Resize
My movie is complete and has a stage of 800 x 450. Is there a way to resize the stage "including" all to the graphics at the same time?
Cannot Resize Jpg
I'm still very new to Flash & actionscript, so please bear with me. I've written the following script thats supposed to display a resized jpg.
Code:
loadMovie("images/gallary/image3.jpg", _root.photo);
_root.photo._x = 12;
_root.photo._y = 12;
_root.photo._height = 445;
_root.photo._width = 626;
It shows the jpg just fine, except that it won't resize it. Any suggestions?
Resize Or Not ?
Hey there.
Anybody have an idea for displaying 2 swf on a browser window and having one of them resized to fit the window and the other one keep a fixed size, like on www.hi-res.com ( the bg picture gets resized but not the menu) ?
Thanks a lot.
Romain.
Resize......
Hello... i have a problem:
I have an intro which open a fullscreen home.swf,
inside i should create a button to resize the window, someone know the code??
Infact now i must close the window to return at the browser...
i would like not to close it....
sorry for my english....
Resize
Can somebody please tell me how to make my flash file automatically resize itself to fite to the viewers screen? Thanks
-Woodlit
Swf At 100% But Not Resize
Look this site:
http://www.stylesucks.com/main.html
I need to publish a swf with a central part that doesn't resize, and two black bands up and down that fill the rest of browser.
Only html or need i actionscript too?
Resize R E S I Z E R E S I Z E
Hey Yalls-
check this out!
http://www.brianmccutcheon.com/
nice huh?! go ahead and click throught the images.....
can someone help me figure out how the flash shell resizes to fit the image...
very new to actionscript...any help would be much much appreciated!!
Resize With Var
here is the thing
please download the attached file, to understand what i sayinī please
ok here is the thing i whant to change the last value, at the
setproperty action, with a number placed at one of the text boxes
i dont think is to hard, but i can find the way to do this
thnx...
Resize Box
hi, i have a little problem, with something im sure is realle easy
Please download the attached file, so i can explain u my situation
Now that u have open the ".fla", heresīs the thing
check out the script at the green button
ist something like this
on(release) {
setProperty("star", _width, "50");
setProperty("star", _height, "50");
}
{
what i whant to do is that the last value at the "setProperty" line
setProperty("star", _width, "50"); reads the number that i type at the textbox, instead of that fixed number.
if u have any doubt about what i qhant to do please ask me....
Swf Resize On The Fly?
Hi could somebody tell me how this site resizes its swf half way through (if indeed it does)
notice - once fnished loading - the page lengthens and a scrollbar appears BUT the pages doesnt (appear to) repload!
http://www.constructiondurable.com/
thanks
Resize Bug?
okay so i', loading some .swf into another 'main' swf. each loaded swf has the same dimension, controlled by a line of script in each loaded .swf something like:
this._width = 600;
this._height = 400;
this works fine on each swf. however, after making some minor adjustments to one of the files to be loaded in, suddenly the proportions of the movie become completely skewed. For example, width is suddenly much smaller that height, even though the code specifies otherwise. frustrations: i know the movie is still getting resized, (because it still changes size) and if i take out those two lines of code, the movie respects its orignial dimensions when being loaded in....
any thoughts? is this just a bug in flash mx 2004, or have i just overlooked something basic?
No Resize On Swf
I dont know how come i am having so much trouble with turning off the resize of swfs. Every script i try doesnt work. I dont want to be able to resize it.
Anyone got any scripts for me? I just put it in the 1st frame hay? So simple what am i doing wrong?
Hook me up with a script that works please.
Cheers,
Mark
Resize
I want to resize my applet to a specific size but it is not working. For what ever reason the browser does not scroll to show all of the areas. Here is the code
Code:
Stage.scaleMode = "noscale";
resizeMe = function () {
Stage.height = 900;
Stage.width;
};
this.onResize = function() {
resizeMe();
};
Stage.addListener(this);
I really hope I was clear enough. Thanks
Resize
i created a movie with the stage at 550 x 400. I decided i'd rather the stage to be 800 x 600. is there a way that i can do that AND have all the other objects on my frame increase in size proportionately?
Thanks,
Simon
Help NN FF Resize
Any idea why this works in IE, Mac IE, Mac Saari...but no firefox and Netscape?
http://www.blueholdings.com/splash-c...er-final5.html
I get a huge white border at the bottom of the page...any help would be great,
Thanks,
Simone
Resize Mc
hi! I have a simple question!(i guess) . How do I resize a mc (change the _width and _height property) without changing the border line _width and _height properties. Thanks!
Resize Help
i made this site and it has a white border on it, how can i make it so that the swf MC goes to the edges?
heres the site if it helps http://www.rocketinnovations.ca/newsite4.html
Resize As Well?
i am moving a rectangle MC on mouseover and mouse out (its X pos) using this script:
on (rollOver) {
_root.xpos = 0;
}
on (rollOut) {
_root.xpos = 0;
}
i would also like to adjust the width as well (make the rectangle wider) how can i accomplish this?
thanks in advance!
[F8] Resize
how can you keep a swf movie from being re-sized??...can you make a swf movie windowless??
thank you guys for all the help......Herman
Resize MC?
Hi,
I need a way for a user to resize an MC on the stage using the mouse to drag the edges, where can I start? I want to write the AS myself and not sue other peoples prebuilt classes.
Thanks
[CS3] Resize SWF
Hi everyone, I am new on this forum, and not a genious of Flash (I am a designer, but I really like to learn more of the tecnical stuff).
I have a graphic design portfolio designed in Flash. The size is 1024x768, but it's still not online because I don't want it to appear with scrollbars.
Now, I have already prepared a HTML document that should contain this portfolio, and in order not to have to rebuild the whole thing (it's of about 80 pages, all different SWFs) I have maintained the proportions in order to resize to 900x675.
Could anyone please tell me how to do this? There MUST be an easier way...
Thanks!
Isabella
[CS3] Please Help With Resize...
If you can help me with a few issues on my flash project I would really apperciate it. I am new to flash and I have a sizing issue and a problem with link my botton to another page. Please email me if you are willing to help.
Help With Resize
is it possible to define the size of an externally loaded swf (say to 500x500 inside a 1000x1000 that calls it) so that it obeys the size boundaries you set and not inherit the larger size? im trying to load an swf that bases some of its properties on the size of the movie it is being loaded into and i dont have the original fla to make changes.....i appreciate the help
Resize Mc Using AS
hi all,
how we can resize mc using AS at runtime, like the resize we do with flah.
thanks
|