ActionScript 3.0 :: Tweenlite - Scale Up In Both Width And Height?
Jul 23, 2009
I have a strange and extremely annoying problem.I have a simple would-be navigation bar that works perfectly with this code:
Code:
import gs.TweenLite;
var buttons:Array = new Array();
var btnProps:Array = new Array();[code].....
It takes the 5 items in the menu and when they are individually moused-over, they simple move 10 points to the left, then when the mouse is off they move back to their original position.Now I want to change it so that they scale up a tiny bit in both width and height. I've been trying to do this for some time and I have no idea why this code does not work:
Code:
var _rect:Rectangle = new Rectangle(_btn.x, _btn.y, _btn.width, _btn.height);
btnProps.push(_rect);
}[code]...
Everything in these two versions is EXACTLY the same except for this part I've posted.
View 1 Replies
Similar Posts:
Oct 10, 2009
If I have a rectangular shape under some angle, 45 or similar, how could I tween its width or height so that it scales with that angle?
View 0 Replies
Jul 11, 2011
Does anyone know how I can retrieve the "ORIGINAL" stage height and width that was set during compile of an Air/Flash ApplicationI have set the Application to compile to 1920x1080;I have stage.scaleMode = StageScaleMode.SHOW_ALL;and stage.nativeWindow.maximize();But when I trace stage.stageWidth I get 1280 which is the resolution of the screen.I was hoping to get the 1920.I cannot use stage.width or stage.getBounds(stage) because this returns 6000. Due to items being masked off screen.
With the stage.stageWidth being the screen resolution, I was hoping I could use that and mathematically work out the original using stage.scaleX. but even with SHOW_ALL scaling the entire application, stage.scaleX returns 1EDIT: I know what "Show all" does, you do not need to tell me about it.I also know what stage.width and stage.stageWidth do, but stage.stageWidth is returning what I believe is incorrect in this example and need an alternative.
View 2 Replies
Jun 10, 2011
How does flash scale for fullscreen?For example, if I draw a shape and give it a width and height of 100px (square)...does that scale up proportionally when the flash is made full screen? Or does that object stay 100px x 100px?
View 2 Replies
Nov 5, 2008
Is there anyway (with action scripting) when having a Flash Video set to Expand to 100% Width and Height to have certain elements within that video maintain their inherent size and not scale ?URL...Notice how the BG Scales, but the video in the center does not nor does the footer. Is this performed with CSS and using multiple DIVs with varying Z Indices.
View 4 Replies
Jul 29, 2010
I 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
View 8 Replies
Jun 12, 2009
i want to load external images of different height and width into same height and width.
View 3 Replies
Feb 24, 2010
i want to load external images of different height and width into same height and width.
View 0 Replies
Mar 25, 2011
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 Replies
Mar 25, 2011
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 3 Replies
Jun 1, 2010
I 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?
View 2 Replies
Jul 29, 2007
Propably a stupid question but how do I scale a MC to be 50 pixels in height (width should be scaled proportionally).
View 5 Replies
Nov 2, 2009
I'm creating a tabbed UI and using this tut for the nav of it (but with only 3 tabs):
[URL]
..when one of the tabs is clicked..it will show the appropriate content below when it jumps to that frame. However, each tabs associated content varies in height. Is there a way for me to dynamically scale the height of the stage according to which tab is clicked?
View 4 Replies
Aug 13, 2009
I have built a very simple Flash gallery in CS4 using AS2. It calls the images from an XML file and works great. The problem is that the captions underneath the images are in a fixed width text box. They look fine underneath horizontal images, but I want to have the text shift in when a vertical image is loaded, and is narrower.
View 3 Replies
Dec 17, 2009
How do I scale text like this? [URL]
(the blog post titles)
View 1 Replies
Oct 28, 2010
http:[url]....In my opinion, the way in which the photographs on this website scale, is perfect.I know how to load an image, dynamically, and add it as a child and in fact scale it.What I don't know, is how to scale it in the way the designer has in the example above.
The code I use to scale the Child (the image) at the moment is this:
//IMAGE WIDTH OVER HEIGHT
var ratio:Number = (1052/700);
//SET HEIGHT OF CHILD[code]......
The designer appears to have used minHeight and minWidth commands to ensure the image doesn't scale beyond certain height and widths.
View 3 Replies
Sep 10, 2009
if i was to make a flash website is there a way that i could have it scale the width to fit the browser, and scale the height so that it keeps the same aspect ratio and doesn't stretch the contents out of proportion?
View 3 Replies
Oct 24, 2011
I have a sprite in as3 code, I want to enter its height to resize it, how can I scale the width accordingly?
sprite.height = 200;
sprite.width = ??
View 2 Replies
Aug 23, 2009
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.
View 2 Replies
Jun 15, 2010
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?
View 3 Replies
Jun 1, 2011
Its pretty simple what im trying to achieve.I have a MC on Stage, which im trying to tween to different X coordinates.I've set up four TweenLite.to sequences, however for some weird reason only one is being triggered - what am I doing wrong?
TweenLite.to(slider.mc_slider,1,{x:_returnXPos(95), ease:menuEasing});
TweenLite.to(slider.mc_slider,1,{delay: 1, x:_returnXPos(35), ease:menuEasing});
TweenLite.to(slider.mc_slider,1,{delay: 2, x:_returnXPos(50), ease:menuEasing});
[code].....
View 3 Replies
Nov 13, 2009
I have a dynamic layout, where an image is loaded into an HBox:
<mx:HBox ...>
<mx:Image height="100%" .../>
</mx:HBox>
[code].....
View 3 Replies
Dec 22, 2004
I managed to scale a movie clip's width with easing.With this code:
onClipEvent (enterFrame) {
endWidth = 50;
_width += (endWidth-_width)/speed;
[code].....
View 11 Replies
Dec 2, 2009
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...
View 2 Replies
Oct 11, 2010
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 Replies
Feb 22, 2010
I 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]....
View 5 Replies
Dec 26, 2010
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 Replies
May 21, 2009
I 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 Replies
Feb 12, 2012
I am using jPlayer library but i don't know how to set width and height[code]...
View 4 Replies
Oct 5, 2006
I'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].....
View 12 Replies