AS3 :: IDE - Changing .swf Width And Height
Dec 13, 2009Is there any possibility to change screen width and height not in Flash ( in Properties ), but in Code [ any AS3 line? ].
View 1 RepliesIs there any possibility to change screen width and height not in Flash ( in Properties ), but in Code [ any AS3 line? ].
View 1 RepliesI want to change the height and width of an object (specifically doubling it) after an interval of 2 seconds until the height and width of the object reach over 100. I've made two different scripts to try to make this possible.
[Code]...
I have a movieclip that has a 1px wide line by 10px high. Im trying to resize that line with tweenlite, however when i change the height it makes it wider too... How can i do this and keep the line 1px?
View 2 RepliesHere is some code I have.
[code]
_buttonUnderline = new Sprite();
with(_buttonUnderline.graphics) {
[/code].....
When the Tween takes place though it not only changes the width, it changes the height as if it were scaling it up in both directions. Why does this behavior take place? And how can I get it so that only the width changes? I have also tried using scaleX as the property but it does the same thing.
how can I change the height and width of stage dynamically. I tried it with the following code:
Stage.height = 250;
Stage.width = 250;
during the run time. Initially the Stage is at a height and width of 370 and 450 respectively. Also when I tried to trace the height and width of Stage after resizing the stage width and height, its showing the old value of width and height. That means the width and height not chnaging.
I am trying to change the width and height of instances of a symbol programmatically. Basically, the symbol contains a few colored rectangles, a bitmap, and some text. I want to change the height and width of each instance of the symbol based on how low the text string is that is in the instance's text field, but the bitmap's size should always stay the same, 24x24 pixels.[code]The problem is that using this code seems to scale everything up, including the bitmap. I have tried to programmatically add the 24x24 pixel bitmap to the symbol programmatically after I changed the height, but it still seems to be scaled..
View 1 RepliesI thought I had a handle on AS3, DisplayObjectContainers, etc. but this basic thing is really confusing me: changing the width/height of a sprite does not affect it's visual contents - either graphics drawn within it or any children it may have.[code]...
View 2 Replies[code]When the Tween takes place though it not only changes the width, it changes the height as if it were scaling it up in both directions. Why does this behavior take place? And how can I get it so that only the width changes? I have also tried using scaleX as the property but it does the same thing.
View 1 RepliesI develop some components where I use movie clips as skin. In the scene I have 2 movie clips with width 200px and height 100px, one of them I change the width to 200px and height to 100px, well, it should remain the size as nothing happens but it doesn't. The movie clip that I change the size through as3 it's actually getting smaller, and more strange, it only happens when the movie clip has an Outline. The file is attached. It's Flash CS4.
View 2 Repliesi have a movieclip (hairline stroke) and after changing its width or height it disappears...
View 1 Repliesa movie clip symbol is designed and subclassed in Flash, but get instanced and addChild-ed in AS3. It works well as long as I don't change it's width/height property (scaling works too), but if i do, it disappears
View 2 RepliesI am trying to reference to top level (stage) width and height of the main stage for the placement of something located inside a movieclip on the stage.
My code is:
Code:
my_loader.x = (stage.stageWidth - my_loader.width)/2;
my_loader.y = (stage.stageHeight - my_loader.height)/2;
But this seems to just relate to the width/height of the mc that my_loader is nested in...
I have tried the following and had no luck:
stage.stage.stageWidth
root.stage.stageWidth
parent.stage.stageWidth
MovieClip(root).stage.stageWidth
i want to load external images of different height and width into same height and width.
View 3 Repliesi want to load external images of different height and width into same height and width.
View 0 RepliesI have created a custom component - MyImage - that has two children including a Bitmap as well as a Sprite.My display object hierarchy is as follows -
mx:Canvas
view:MyImage
mx:Bitmap
[code].....
I would like to use a movieclip to load a flv video. The problem I have is that I want to change the video dimensions. I've tried several software to change the video dimensions but as far as it seems all of them keep the same height-width ratio than in the original video. Is there any software that would allow me to change the height and width without keeping the same height/width ratio as in the original video file?
View 1 RepliesI would like to use a movieclip to load a flv video. The problem I have is that I want to change the video dimensions. I've tried several software to change the video dimensions but as far as it seems all of them keep the same height-width ratio than in the original video. Is there any software that would allow me to change the height and width without keeping the same height/width ratio as in the original video file?
View 3 RepliesI am looking at the SimpleButton entirely wrong. Here's what I'm doing (inside of a MovieClip):
[Code]...
the close_btn.width and height remain 0. Am I supposed to just rely on the DisplayObject members of the SimpleButton completely and ignore width/height/x/y or what?
I have a flash banner graphic that I created at 1000px wide by 420px tall. I want this to be fluid and fill the browser width, so that when the browser is rescaled the swf fills the horizontal space. My problem is that there is content below it that needs to touch it, but the height is trying to fill 100% so it is creating vertical space between the flash content and the div below it.
I guess a better way to describe it is that I don't want to define the height I just want the width to be 100%. At 100% height there is unused space so I need to make the height maybe undefined or something smaller then 100%?Also, if you make the browser too small vertically the width will not fill. So I want 100% width regardless of the browser height.
How do I set the width and height of my swf in AS3?
This is my code so far:
package {
import flash.display.Sprite;
public class Game extends Sprite {
}
}
Right now, when loaded it is at some arbitrary default size.
If I can't change the size this way, is there any easy work around that will be consistent?
my .swf goes full screen and changes proportion if it is accessed directly at it's url
[URL]
is it possible to tell how big it currently is? i'd like to reposition some elements accordingly...
I'm trying to change the position of a movieclip I've added to the stage. When I try to access stage.width or stage.height I get 0. I've tried MovieClip(root).stage, DisplayObject(root).stage, root.stage, stage, and simply width and height. All of these are equal to zero.
View 1 RepliesI want to write a shell that creates instances of an app and scales it down for animating. Well, I created my shell class and instanced the app and set scales for x and y and then I traced the height and width because I wasn't sure what they'd be. I thought they'd be based on the stuff on the stage or whatever, but they both came up zero. So I'm not sure how that works, am I supposed to have set those values?
[Code]....
I have an empty movieclip in the stage that holds a backgroundbg._width = Stage.width;bg._height = Stage.height;the background is loaded from XML and works fine since I'm not set the width and heightbut if I set: bg._width = Stage.width and bg._height = Stage.height
View 1 RepliesI have two Canvas A and B, A is the child of B.A can be resized by some user actions like adding some UI components to its base.A is bounded by an other Parent canvas B which should show scolling handles if its child A gets too large.I would like A to have the same width and height of B (or really close) while the calculated width and height of A is smaller than those of B.If w or h of A get larger than those of B then A should grow and B will show scrolling.
View 2 RepliesI am using jPlayer library but i don't know how to set width and height[code]...
View 4 RepliesI'm a student for design and want to build myself a portfolio, showing pictures and being able to jump between fit_to_screen mode to actual_pixel_size mode. The following code is just the beginning.
I've wrote the code mixing some tutorials (sorry, but I didn't find a good way to clean it so it'll be more focused) - I'm a really new about action script.
myFile is a mc waiting for an external parameter run_url - a string contains something like "/projects/illustration/alice_in_wonderland.jpg"
You can see the trace command marked as red. I'd expect it to give me a number of the movie clip's width, yet i get "undefined"
import mx.utils.Delegate;
var streamingID:Number;
var fileLoaded:Boolean;
[Code].....
I was wondering if there was a way to set an air app to fill 100% width and 100% height of the screen?
I know how to do it on the web by setting swf address parameters to 100% and setting stage.scalemode and stage.align
I am using FDT to publish my air package with an ANT build. So it does not use mxml, just my document .as class.
How can I use the width and height that's set by the object's embed code within my Flash movie?
I've got items that position based on stage height/width. Problem is although the object appears re-sized when you adjust the values in the embed, the stage size obviously does not change.
Ideally I'd like to position and scale objects based on the dimensions provided in the embed.
i want to zoom the movie clip, for this i have set the movieclip width and height with the button. It is correct or anything els
View 2 Replies