ActionScript 3.0 :: Resize Not Working For MovieClips On Stage?
Feb 18, 2009Why the mc's are staying where I want them when you resize the stage?
View 2 RepliesWhy the mc's are staying where I want them when you resize the stage?
View 2 RepliesI'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]......
how do I code stage resize with scaling movieclips? I can do stage resize and position/scale movieclips relative to stage size..but i don't how to have a scalable movieclip retain its scale relative to stage size. how do I code this? for example, i have a movieclip originally 50px wide, and the stage 100px wide..when i click the mc, it scales up to 80px wide. and when I resize the stage to 50px,(50% of stage size) i want the mc to scale to 40px too(50% of mc size).. and when I click it again to restore to it's original size, i want it to scale to 25px(50% of original size). then finally when i scale the stage back to 100px, the mc again is 50px wide.
View 2 RepliesI'm making an animation with movie clips inside the stage but if i put action in the end of these for go to another frame in the stage, dosnt let me because AS3.0 doesn't allow script inside buttons and MC's. The new code from AS3.0 is so different to AS2.
View 3 Repliesis it possible with AS3 to see the list of the movieclips that are on stage?
View 13 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 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 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].....
Looking for a way to stop all movieclips both are the stage and that are children of the ones on the stage.
I toyed with looping thru stage's children so I can first target clips on the stage. But I am getting error.
for (var i:int = 0; i < this.numChildren; i++) if (this.getChildAt(i) is MovieClip)
{
this.getChildAt(i).stop
}}
I am adding MovieClips in columns and rows according to the main container with static width and height now if user wants to enter for more rows and columns
How I should change the Moviclips size that can adjust within main container ( Blue Box as in image )
Image 1 : I am adding small white movieClips with default width and height
Image 2 : its required , small movieClips resized according to main container, when Rows and Cloumns are increased
Alright I have two Movie Clips on 2 different layers...One has the instance name panel and the other has the instance name panel2. Now, on the timeline panel is suppose to grow to 210x480 and then stop. A few frames later panel2 is supposed to resize to 150x480 but when panel2 resizes the other MC (panel) resizes to panel2's size...
Here is the code for panel:
onClipEvent(load){
// Define initial height
_root.high = 210;
// Define initial width
_root.wide = 480;
[Code] .....
I am adding MovieClips in columns and rows according to the main container with static width and heightnow if user wants to enter for more rows and columnsHow I should change the Moviclips size that can adjust within main container ( Blue Box as in image )Image 1 : I am adding small white movieClips with default width and heightImage 2 : its required , small movieClips resized according to main container, when Rows and Cloumns are increased
View 4 RepliesI've got a resize listener where I change my movieclips' dimensions and positions.[code]But how I set the minimum allowed resize of the stage?I don't want the stage to be smaller than 1024x600 for example.
View 3 RepliesURL...Its a dynamic positioning template, basically.I'm importing docked_icons.swf onto the stage via the holder movie clip (at the end). However, the position is messed up until I resize the window. From there, it's perfect. How do I set the initial position to be correct?[code]
View 1 RepliesI have recently created a game in Flash CS3 with AS3 which displays a random picture (this is a pretty integral part of the game).I have written a small procedure to resize the picture to an appropriate size for the flash application. This is as follows:
ActionScript Code:
function onComplete(ev:Event):void {
var maxheight = 240;
var maxwidth = 400;
[code]....
Here is where it is called, please just take for granted that d_arr[1] contains the correct URL of the image I want to load :-)
ActionScript Code:
var url = d_arr[1];
var urlRequest:URLRequest = new URLRequest(url);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
[code]...
This resizes the picture when it is fully loaded. This seems to work fine on my own site, but on the sites to which mochi ads has distributed it, it doesn't resize the image at all, even if it is left to fully load.
I 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 RepliesWell I have now managed to trace down the problem. It seems as the microphone stops working if I resize my flash application. In other words if I resize my flash application from its original size, the allow microphone dialogue is no longer displayed at the start of the application and the microphone remains muted.
View 2 RepliesThe floating elements stop floating on the y axis when javascript resizes the scrollbars.
It seems that when externalinterface calls the resize function that after that then flash uses that value as the Stage.height value.
I need a way for the scrollbars to be forced to accomodate 2000 px worth of content. But still have the elements float within the actual open browser window which could be much smaller than 2000.
The 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 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'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 Replies