ActionScript 1/2 :: Resize A Movieclip To A Stage Size?
Dec 5, 2011how can I do to resize the size of my movieClip and the content of my movieClip(swf, jpg) to the stage?
View 5 Replieshow can I do to resize the size of my movieClip and the content of my movieClip(swf, jpg) to the stage?
View 5 RepliesI want it to take the whole screen but i dont want to scale it.The elements on the application will change the position according to the stage size,but i dont know how to change the stage size according to the browser size.
View 1 RepliesI'm wondering how to set my stage to resize relative to the size of the user's browser and keep the main movieclip centered. But I don't want the stage to scale, I want the physical boundaries to get larger without scaling the content.
The reason for this: I have something that we'll call "snow" falling in the background. When the browser resizes, I don't want the stage to scale and the snow flakes get bigger or smaller, but have the stage show more area for the snow flakes to fall. I already have the snow flakes falling outside the current stage boundaries, I'm just wondering how to make the stage boundaries extend dynamically to the size of the browsers.
how can I do to resize the size of my movieClip to the stage?
View 2 RepliesWhat i try to do, is to make a "wrapper" in Flash, in which other swfs could be embedded. (passing the URL of the external SWF by URL) to attach a link to the swfs. (ClickTag - Issue, maybe someone knows this).In the HTML - Code this would look like this:
Code:
<embed src="wrapper.swf" ...>
<param name="filename" value="path-to-external-swf.swf"/>
<param name="clickTag" value="http://www.example.com"/>
The SWF "wrapper.swf" should load the "path-to-external-swf.swf" an puts a onClick - Event on the whole area.That works just fine, BUT The loaded external SWF should always fit to the stage size (like 100% width and 100% height) .My code looks like this:
Code:
// Variables should be passed by URL
_root.filename = "http://example.com/animation.swf";
_root.clickTag = "http://www.example2.com";[code]....
Code:
mClip._width = Stage.width;
When i click on the swf, the movie fits exactly to the stage width...
Here is my problem (unfortunatelly didn't find solution @google or in this forum): I'm loading external swf[AS2] into main swf[AS3] using Loader class. The main swf is 800 x 600 and the external swf is 290 x 247. After adding the external swf to the main swf the external swf expands (scale to) from 290 x 247 to the main swf's size: 800 x 600. How can i prevent this? I want the loaded swf to save it's original stage size.
View 2 Repliesi have searched this and many other forums as well as the doc for the answer to this question. I have a flash movie in which I dynamically create a diagram at runtime. The size of the diagram varies, but I need to display it within a fixed size area on the HTML page. What I would like is for the stage to scroll dynamically based on the size of the diagram, but have no scrollbars at all if the diagram fits within the fixed area in the browser.
View 1 RepliesHere is my problem (unfortunatelly didn't find solution @google):I'm loading external swf[AS2] into main swf[AS3] using Loader class. The main swf is 800 x 600 and the external swf is 300 x 200.After adding the external swf to the main swf the external swf expands it's size from 300 x 200 to the main swf's size: 800 x 600.
View 1 Repliesi saw a thread while ago .. that always position a movieclip in the middle of the stage even if the stage or window resize any1 can point me to it
View 3 Repliesknow how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip,
View 3 RepliesI have a movieclip that i want to resize to fit the stage and center it with a button click. Then resize back to it's original size and place with a second button.[code]...
View 6 RepliesI'd like users to be able to drag out a shape from the side of the stage (say a square) and then resize it on the stage. I think I've seen this Flash functionality somewhere on the web.
View 29 RepliesI'm trying to get an object to increase in size the lower it goes down the stage, and decrease in size the high it moves up the stage.
It only needs to increase or decrease by a small amount. Basically, it's for a game character. To ad realism to his movements, it would be nice to have this feature.
This is where i'm up to so far:
Code:
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
[code]....
I think I need something like:
if (object moves up)
decrease
else if (object moves down)
increase
Does anyone know how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip
View 3 RepliesI have a MovieClip and i want to adjust the position on movieClip According to stage size. Means I resize the stage than it will adjust position according stage size. Either I run this swf in browser it should be same.
View 2 RepliesHow do I get an exact width and height of a MovieClip if it was scaled on stage resize?
for example if I have:
stage.scaleMode=StageScaleMode.EXACT_FIT;
stage.addEventListener(MouseEvent.MOUSE_DOWN, checkSize);
function checkSize(e:MouseEvent):void{
trace(mc.width);
}
It will always output the same width and height no matter how big or small the stage is. Is there anyway to get exact current size?
How do I get an exact width and height of a MovieClip if it was scaled on stage resize?for example if I have:
ActionScript Code:
stage.scaleMode=StageScaleMode.EXACT_FIT;
stage.addEventListener(MouseEvent.MOUSE_DOWN, checkSize);
[code]........
Is there any performance difference? I am scaling a 2000 - 4000 wide movieclip, within a 600 wide stage. Does it matter which way I scale it in terms of CPU usage;
myMovieClip.scaleX *= 2;
or
myMovieClip.width *= 2;
The movieclip will be scaled multiple times and to varying sizes.
it's possible to script an external preloader's empty movie clip to be of a specific size and position on the main stage? here's the script i've got for the preloader so far:
var my_pb:mx.controls.ProgressBar;
my_pb.mode = "manual";
this.createEmptyMovieClip("Portfolio", 999);
var my_mcl:MovieClipLoader = new MovieClipLoader();
[code]....
Just a quick one. Using AS3, how would I ensure that a movieClip always stays in the centre of the stage on resize?
View 1 RepliesI'm working on a slideshow where I'm calling in photos from an xml file. How do I tell AS to resize the stage according to photo dimensions? Would I need to list the dimensions in the xml file? If so, how would I pull that into the fla file with AS?
View 6 RepliesI'm writing a web based flash app that's written entirely in AS3. I have objects on the screen as part of a GUI. I would like the user to be able to resize the window, or make it full screen. I would like everything to auto-scale with the resize, but also remain in the same relative position on the stage.
View 1 RepliesWhen you resize the browser window the thumbnails rows and columns adjust accordingly to fit.I've managed to attach the thumbnails correct when my enableButtons() function is called but i'm unsure how to approach resizing.
Stage.align = "TL";
var numberOfGalleries:Number = 20;
var thumbMarginX:Number = 163;
var thumbMarginY:Number = 109;
[Code].....
I've got a large bitmap (1920 x1306) that my client wants as a bg image, scaled to the swf size on load (930 x 575); but that can "grow" up to its original size if/when a user expands the browser window. All the rest of clips in the display list are to remain in place (except for a copyright clip, which they want to always be 14 pix above the bottom of the browser frame. I've tried loading the bitmap dynamically at full size and then using scaleX,scaleY to set it's initial smaller (930x575) size, and I've tried just setting the height/width of the dynamically loaded image using the math of scaleX,ScaleY just in case the scaleX "transformed" the bitmap so that it couldn't return to its original size. Both make the bitmap the right size. But the resize function below did nothing to it, (or the copyright.y.) THEN I tried just putting the bitmap into the display list (both sizing methods work here, too). But even as an original member of the compiled display list, the resize event is still not reaching the target. Everything I've seen on the web says this should work - but...no luck.
Here's the AS3 code in the 1st frame of my swf:
import flash.display.Stage;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
[Code]......
I have different web banners that sometimes only needs to have a different width and height (pixels) to fit elsewhere on my wehsite. I'm tired of doing the Flash web banner from scratch always... I have 2 questions:
1.) I have a web banner a SWF with 336 x 280 pix. How can I load this banner into a a new bannersize 468 x120 pix and keep all the objects in the swf proportional (not stretched). And keep the tweens, timeline functions and so on. I need the banner to always be identical like original. There could be other web banner sizes to fit.
2. ) How do I resize all the objects from 336 x 280 pix to 468x120 pix, or any new size without corrupting the objects, time and tween inside the FLA. -I am using Flash CS3.
is possible to dynamically change the dimensions of my flash stage depending on the size of the browser window ?
Very important, I don't want to stretch any element. Just make the background bigger.
is possible to dynamically change the dimensions of my flash stage depending on the size of the browser window ?
Very important, I don't want to stretch any element. Just make the background bigger.
please take a look at [URL] The flash graphic is supposed to auto-resize to the page size but it does not. If I take the same code and put it in an "ordinary" webpage it works fine - look at [URL] What I had hoped to acheive is the effect in this page where the flash movie resizes to match the size of the browser window. I am using the script AC_RunActiveContent.js and calling it from the webpage with the height and width attributes set to 100% - it seems to be sizing the flash at 100x100 instead.....
View 3 RepliesI've just an SWF object to display the users webcam, however it won't let me make the webcam smaller than 320 x 240. Is this the lowest size I can go?
Just for any reference if needed:
import flash.media.Camera;
import flash.media.Video;
var camera:Camera = Camera.getCamera();
[Code].....
I have different web banners that sometimes only needs to have a different width and height (pixels) to fit elsewhere on my website. I'm tired of doing the Flash web banner from scratch always. I have 2 question:
1. When I only have the SWF
I have a web banner a SWF with 995x150 pix. How can I load this banner into a a new bannersize 468 x120 pix and keep all the objects in the swf proportional (not stretched). And keep the tweens, timeline functions and so on. I need the banner to always be identical like original. There could be other web banner sizes to fit.
2. When I have the *FLA
How do I resize all the objects from 995x150 pix to 468x120 pix, or
any new size without corrupting the objects, time and tween inside the FLA.