ActionScript 3.0 :: Resize A Movieclip To Stage?
Jun 7, 2010I 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 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 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'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 Replieshow can I do to resize the size of my movieClip and the content of my movieClip(swf, jpg) to the stage?
View 5 RepliesDoes 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 RepliesJust 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 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]......
Is it possible to resize a movieclip without stretching the contents of the movieclip??? I'm having the most frustrating time trying to do this.
View 5 RepliesI have two problems. 1) the page still will not resize properly until the window is resized. I assume I have the code wrong somehow.
2) I changed the height of my menu object to stage.stageHeight, but its now coming up squished and only about 30% of the actual height of the stage. I am not sure what I did as it seemed to be working before, but I cant seem to fix it.
Code:
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, stageresizeListener);
[Code]...
Is it possible to resize everything on the stage in one (or a few) step? I know scaling the movie has the same result, but when working in Flash it's a lot easier when you see the actual size.
View 1 RepliesI've been working on my web site. Its 1024x768px and i run it fullscreen.I come up with an idea and i added a 1024x768px to the top (new frame) as a intro like action.When i try to resize it to stage it will really mess up my whole pageAnd also cause of resize my movieclip stretched and looking terrible
Code:
var xy:Tween = new Tween(asdasd, "_x", Strong.easeInOut, 0, -1024, 2, true);
Code:
[code].....
They show their work as the page�s background which can be resize with the browser window, but their navigation always stays the same.I know how to achieve the resizing effect, but it resizes the whole stage including navigation.
View 2 RepliesThe stage is set to 955x465 at 1st frame but once load external movie clip in 2nd frame the stage is set to 955x855 size, is it possible to do it?
View 1 RepliesI created a game but I made the game a little too big. It would be alot of hard work to shrink all the objects in the game and resize the stage using the properties. I notice that in debug mode the whole screen can shrink when you adjust the window. Is there some code I can use to this on it's own? and will it be costly on performance ?
View 2 Repliesi am trying to build a resize with stage image gallery. It is working except for when you first open the swf the image has it's original size, and it only adjusts to the stage when the stage resizes.s the script:
ActionScript Code:
Stage.addListener(this)
this.onResize=function(){
[code]......
have a Movieclip where i have duplicated a clip that loads external swf. My cuestion is how can i make this movieclip resize it self and it's content on stage resize.
View 2 RepliesI'm trying to resize my stage using this code but I can get it work correctly. (I'm using FLASH CS4)
ActionScript Code:
var Stage_height = flash.system.Capabilities.screenResolutionY;
var Stage_width = flash.system.Capabilities.screenResolutionX;
[SWF(width=Stage_width, height=Stage_height)]
When I launch it I get this ERROR Could not parse 'Stage_height' as a number for height. And the same for the width.
I tried to set them as Number variables but that didn't work either.
i have a swf that i export and it works perfectly its 600 kb and runs nicely. i put proper code to for the stage to resize and keep all the movie clips in their right place, center ect.. but when i resize my swf my animation slows down drastically? there is a lot of animations movie clips within movie clips for it to all work.
View 6 RepliesI m doing the background to resize according to the stages width, but if I use OnEnterFrame event, the movie get to slow.What is the other way of doing the same? Detecting the changes in width of the stage and only then aplying the resize of the background?
View 3 Replieshow I could resize my swf stage with buttons and change the look of things, without affecting what's in the webcam / chat area of something similar to this: [URL]
View 1 Replieshow to do stage resize in flash
View 13 Repliescoordinates in flash, particularly after resizing the flash player window.I have an mc on stage and draw an ellipse inside that mc. The movie is of size 800 x 600.
Code:
var ellipse:Shape = new Shape();
ellipse.graphics.beginFill(0x6CCDF4, 0.5);
ellipse.graphics.lineStyle(4,0x186B87);
[code]....
If I check the coordinates of that ellipse from it's transform property, I see that the top left is at 400, 300.
Code:
ellipse.transform.pixelBounds.topLeft.x
ellipse.transform.pixelBounds.topLeft.y
This seems fine to me as this position is in relation to the stage, yes? If I convert this to a position local to the container I get values ~0,0.
Code:
var stagePoint:Point = new Point(ellipse.transform.pixelBounds.topLeft.x, ellipse.transform.pixelBounds.topLeft.y);
var localPoint:Point = join.canvas.globalToLocal(stagePoint);
When the flash player window is resized, the coordinates change entirely. Instead of being at 400,300 the transform property indicates that it is at 640, 510. I assume this is because the viewport has changed, but the stageWidth and width properties of the stage do not change.
I have to adjust to a new size and my objects have to adjust accordingly. Is there a way to select multiple objects on separate frames and resize as a group?
View 1 RepliesI was wondering if it was possible to dynamically resize the Stage with AS..
View 1 RepliesThere is a flash with stage size 800 x 600. I need to add a button on the flash. When the user clicks the button one time, it will resize to be 600 x 450 and all MC, texstbox, button insides the flash would be resized on scale.
When the user clicks the button 2nd time, it will resize to be 400 x 300 and all components resize on scale as well.
When the user clicks the button 3rd time, it will resize to 800 x 600 again.
Is there any AS3 source code for it?
I have a file in which I use this stage resize function. However if I resize really fast (like maximize button) it doesn't resize the Timeline.
Code:
stage.addEventListener(Event.RESIZE,resizeStage);
private function resizeStage(e:Event):void{
resetVideo();
_controlbar.resetControlBar(stage.stageWidth);
_barlength = _clickbar.width;
_levelstart = _level.x;
[Code] .....
Why the mc's are staying where I want them when you resize the stage?
View 2 Replies