What I'm wanting to happen is that when the "body" movie clip changes size, I want the objects within it to be scaled proportionally (keeping the x:y ratio the same). The result that I'm wanting will result in the contents (as a whole) being proportionally scaled to the height (because it will always be the smaller dimension in my case) of the current size of the body mc.
I've uploaded my .fla so you can see what im working with. The red square is the body that i've managed to scale but I have not yet added anything within it. (I have tried but it's contents distort when the body is resized)
I'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.
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.
Basically, I have two movie clips; Square_mc, which is the object I want to scale and scaleTransform_mc which acts as my free transform edit point. What I'd like to happen, is when you click on and drag Transform_mc (The edit point), the correpsonding Square_mc movie clip's _xscale and _yscale change in proportion. I.e. Similar to the free transform tool in Flash.
So I am working on a full screen website, and background_mc I want to be centered and scaled 100% to the stage. But I also do not want the image to loose it's proportions. Here is my code so far, it is only seeming to center the movieclip:
Click on one of the menu options - "corporatecommunications" or "events&entertainment"
I fixed the earlier progressBar problem, but when you click on an image thumbnail to load it, it pops up regular size for maybe 1/30th of a second before being scaled to the proper size.
Here's my code:
Code:
// set a variable to hold image name var imageNow:String; // scale empty movie clip that will hold the image function iHoldSize() {
'i am doing a game for children where users can drag and drop resize and scale movie clips on stage! The drag and drop is not an issue...however im not quite sure how to do all the rest... is there a way or a tutorial to do this?
I'm building some navigation that extends all the way from left to right across my SWF. When the window resizes, I'd like the nav buttons to get wider but not have the text on the buttons get wider.
The buttons themselves are rectangles with a vertical gradient and a stroke around the outside. I'm using 9-slice scaling so the stroke doesn't scale, but the middle (gradient) gets wider or narrower.What'd be great is to be able to select an object or layer and say "don't scale, even if the rest of this movie clip scales". Is there a way to do that, or will I have to do it via actionscript?
i have a diagonal movieclip that I am trying to scale along with the background video. The background video scales perfect, I am attaching the diagonal movieclip (br in the code as bottomright) with addChild Instead of scaling with the window, it seems to repeat such as the image is displaying. this is the main section of the code that is doing the scaling
var br:mc_bottomright = new mc_bottomright(); addChild(br); //proportional scale if ((stage.stageWidth / stage.stageHeight)> (owidth/oheight))
I am trying to achieve an effect of scaling a movie clip on click...very similar to [URL] When the user clicks on See, Hear, Play and Shop boxes, the boxes expand. I have created a box movieclip that has a bar on top. This bar is a movie clip inside the box movieclip. When i try to scale the main box movieclip, the internal bar movie clip scales as well. How to stop this?
I am trying to scale external swfs to the window size that exists at the point when the button is clicked. The external swf is being loaded into a dynamically created mc in the main swf. I am using a resize handler and the issue i am having is that all external swfs only become veiwable when the window is resized. After the window is resized, they become viewable and scale on the resizing of the window. I call the resize handler to upate the scale base on the window size but to no avail.
The AS (3.0) that I am using can be seen below.
ActionScript Code: stop(); var Xpos:Number = 0; var Ypos:Number = 0;
Essentially I'm building an application in Flash, just for the fun of it really. Upon the initial design it was just a static size, now however I've been working on making it completely resizeable (with the original size as the minimum). I've done this on most of the screens correctly. However on the main screen I have several components. All custom built MovieClips basically, and inside these are more MovieClips, and inside those are even more movieclips.
For my question, I'm going to be using a button as my example. I created a button movieclip with a resize function to call after I change the size of it. So it works like this: ActionScript Code: buttonMC.width = 200; buttonMC.height = 150; buttonMC.resized();
Now this button is inside of another movieclip which is designed to just house a group of similar movieclips. (this structure is not changable; several hundreds of lines are code are specifically designed around it). How to get our button's width from the root timeline, we'd do this: ActionScript Code: trace(housingMC.buttonMC.width);
Now, when this frame gets resized, the resizing script changes the width height of the housingMC. Something like this: (not a working example) ActionScript Code: //resize listener { housingMC.width += stageWidth - oldStageWidth; //width difference housingMC.width += stageHeight - oldStageHeight; //height difference And the housingMC changes to the correct size in the correct position of the screen. [Code] .....
function aboutClick(e:MouseEvent):void { removeChild(loader); var about:URLRequest = new URLRequest("demo1.swf"); loader.load(about); addChild(loader);
really sorry to bring this one up again. I've managed to create quite good working gallery. What I'm trying to now is create a menu that is attached to the scaling part but does not scale it self - in other words just changes position. here's an example of what I mean: galleru #1
What I'm trying to now is create a menu that is attached to the scaling part but does not scale it self - in other words just changes position. here's an example of what I mean: galleru #1
i've been running into weird problems regarding Senocular's Layout Class. It's a nice little framework to align and scale objects in a fluid layout, though.Some images in the background (currentContainer) don't resize all the way to fit stage's height, and sometimes they get really small in a corner.[code]each time the currentContainer mc gets a different bitmap images (with varying dimensions) on it, it gets assigned to bgLayout , whis is added to the stageLayout.actually, do I need to do that ? Or maybe I should remove bgLayout from stageLayout before assigning it again?[code]
I have developed the entire module with 800x600 Resolution.But Now I got an issue that i need to reduce the content area (Shrink the contents instead of changing the resolution). Because some one had developed the custom player that will affect some of the margins of the content.Is there any AS2 script is avail for scaling the entire stage to 80 % of its original size for the entire module...
I have a flash project that I published to an .exe so it can run on the desktop. I also used the code:
Quote:
fscommand("fullscreen", true);
This is to make it launch in fullscreen. However the stage dimensions are 1100 * 800px and when you lunch this on certain computers with lower res monitors, some of the stage area is cut off. I found that you can always right click and select the "show all" option and it will scale down to fit the monitors screen. How can I make this do that automatically without having to right click and selecting the "show all" button.
I'm having a little trouble getting my swf file to fully scale in fullscreen mode. It doesn't look like the stage is scaling and my picture gets cut off. Attached is an image and the code also. It goes full screen at its native resolution fine but gets cut off when i try to scale.
i have a following problem with displaying a scaled and moved image. cliffs:
1. create movieclip
2. draw a square inside, with a starting point (top left corner) in (75000, 75000)
3. move the movie clip so that the square is visible on stage. its important that the movieclip for each iteration is the same.we reapeat this procedure, each time doubling the x/y of starting point, and its width and height. each time we also scale down the movie clip (so its two times smaller than the previos one). we position the movie clip.basic math suggest that all squares should appear one over another. this is what i get:zoomed:
while looking over the spring AS tutorial, i had an idea to adapt the spring motion to a moveclip that would grow / shrink to a given size with the same sort of elasticity. however im having a bit of trouble using the forumla in the right places (using _height, _width or scaling)
How do you do this in AS 3.0?I did it in AS 2.0 with the following code:this.onLoad = function () { this._xscale = 133.33; this._yscale = 166.70;can get it working for AS 3.0.
how to proportionally scale multiple movieClips relative to the stage size.
I understand movieclip placement relative to the stage, and I have been using a code to scale MovieClips as a fullscreen background (also proportionally)
But
I can not figure out for the life of me how to scale other movieclips in relation to the stage size.
for example I have a background_mc that proportionally scales with the stage to fill without distortion.
HOW do I then place another MC say center aligned (I know how to do that) that will scale with the background without distortion?
Ideally I would like to place several MC's on my stage all scaling in proportion with the stage yet independently.
I have not been able to find any documentation on this. lots of tutorials on backgrounds and color fills and the like but nothing on proportional scaling of independent mc's
this is the code I use for my background_mc (can it be modified or should it be thrown out the window to achieve independent scaling?)
I have an swf in which objects go outside the boundaries of the stage (but are properly masked). Whenever I externally load this swf into a container it scales down to fit in the objects located off stage. EX:I have tried removing the objects outside the boundaries and the stage does not shrink the image. The container is the same dimensions as the external swf.
Code: function open_puzzle(openSWF:String) { //Load SWF container = new MovieClip();