ActionScript 2.0 :: Changing MovieClip Height - Smoothly Like Tweening
May 7, 2005I would like to make a movie clip's height change when it is clicked. However, I can't figure out how to do it so that it smooth like a tweening.
View 4 RepliesI would like to make a movie clip's height change when it is clicked. However, I can't figure out how to do it so that it smooth like a tweening.
View 4 RepliesI have a movieclip in the library that contains a RadioButton component and a TextField; it serves as a container. I pull the clip out of the library at runtime and populate the text into the TextField. I don't know what height the TextField within the movieclip will be but I want the movieclip's height to be the same as the height of the text in the TextField so I can position it appropriately. However, the container movieclip always wants to be some other default height (I think 100px) and when I try to change it thru code after the text is set, it scales the whole thing (TextField & RadioButton) and looks like garbage! I need to set the height dynamically without the stupid scaling.
You would think the movieclip would resize based on it's content but it doesn't! I've tried pulling it from the Library, I've tried doing everything thru code, but neither changes the height vs. scaling issue.
I 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 RepliesTask of my code that movieclip added on stage, change its size - height when change size of browsers (player) window thus height movieclip = height browsers(player) window.
That is my code:
package {import flash.display.*;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
[Code] .....
In the issue MovieClip menubg added on stage but when I change size of window I get error:
TypeError: Error #1009: It is not possible to cause property or a method referring to object "null".at ZhMenu/onResize()
And menubg dont change its size of course.
i 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 RepliesAnwyay, what I want is for the user to hover over an object, then there is this a rectangle to the left that I want to change size. Is there an easy way to do this? I want the rectangle to become greater in width but maintain the same hieght/stroke and everything.Also I don't want it to just "pop" to the new size I want it to ease to the new size. Does that make sense? Like I want the user to see the rectangle grow in size depending on what object they hover over.
View 3 Replieshow i would go about scaling&(tweening) my MC to the height of another MC which will sit on top of it???
View 3 RepliesI have small popup box which expands from size zero to some size when clicked on the expand button.
The location of this expand button is dynamic.Hence I want to change the the direction in which this expansion happens depending on the position of the expand button.
For example if the expand button is at the bottom right corner of the stage i want the popup box to expand upwards and leftwards.
If the expand button is at the top left then i want the popup box to expand downwards and rightwards.
I have only one movieclip for the popup box with the registration point at the top left corner.
I tried to achieve this by dynamically changing the registration point of the popup box movieclip using the DynamicMovie class. But no luck.
If I manually change the registration point it is working.
I have a movieclip (mstone) depicting a signpost, which is within another movieclip (graphic1). I am trying to scale mstone to increase by about 44%, and it needs to move along the screen in such as manner that it is moving towards the user. Some how the scale and the x,y coordinates I am providing don't seem to reflect the same way as it normally would, when I see the website live.
Is there a smooth way to move the clip, without specifying particular x,y co-ordinates?? I am using the _xscale, _yscale, _x and _y properties. Not producing the desired effect.
I have been using TweenLite for all of my easing. I was wondering what the code is for having a button inside a movieclip not active while the movieclip is tweening.Then when the movieclip does finish tweening the button then becomes active.
View 2 RepliesI'm using myship.height =+=1 to change objects height but it changes height from top of picture rather than the center. How do I change it so its origin is central and grows outwards rather than downwards if that makes sense.
View 3 RepliesIs there any possibility to change screen width and height not in Flash ( in Properties ), but in Code [ any AS3 line? ].
View 1 RepliesI have just come up with this idea of passing in strings into a textbox. The problem is having the height automatically adjust depending on how long the string is. So I have set width for my textbox, but I want the height to change if the string is long enough to wrap.
View 2 Replieshow to change the height of the stage dynamically, with ActionScript. Is there a way to change the height of the stage with a pixel value? I don't want to scale down the whole movie just make the stage bigger, just like when you change it manually in Modify-Document.
View 9 Repliesis it possible to dynamically change the height of the stage?I am using 'dimensions: pixels', and 'noscale' as publish settings. What I would like to do is, when the height of a movieclip gets bigger (because of its dynamically loaded content), to make the 'stage.height' bigger too, so you can scroll more downwards.
I know stage.height is read-only, but it would be nice to have just the right amount of space at the bottom of the page, depending on how high the movieclips are. Reading back, I wonder if i state my question clear, hopefully I use the right terminology.so if stage.height would work i would like to do something like:
Code:
stage.height= MC._y+ MC._height +30;
I 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 RepliesI'd like to know if anyone knows how to change the height of the stage dynamically, with ActionScript.Is there a way to change the height of the stage with a pixel value?I don't want to scale down the whole movie just make the stage bigger, just like when you change it manually in Modify-Document.
View 9 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'm making a flash website that sits on a div. However, I have a jQuery fucntion that changes the size of this div, which I call within my flash movie. Then, the flash movie adapts to the div change, for bigger or smaller pages. It is all working just fine on Firefox and IE. Not so lucky in Safari. After many tests, it seems the simple act of changing the div height, in which my flash movie sits, makes the movie flicker.
View 0 RepliesI am trying to resize a line within a movie clip. I am resizing the mc horizontally, but when I do this the height of the line also changes. I can of course resize the line itself, but this can't be used for tweening. How can I resize/tween a 1px high line horizontally without changing the height as well?
View 1 RepliesI'm trying to make a fish controlled by direction keys catch some random color shapes thats falling on screen... i made the fish move and the shapes fall but when now i cant do it catch the shapes.. looks like it doesn't make the hitTestObject
there is my code:
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
[Code].....
I have a main.fla and few movieclips inside it.Lets take t1_mc for instance which has a button called next inside it
Code:
next_btn.addEventListener(MouseEvent.CLICK, goNext);
function goNext(event:MouseEvent){
[code].....
I'm filling arrays from a XML. These arrays have dynamic textFields inside them, and these textFields are childs of a movieclip.
I tween this movieclip, therefore making the array of textFields animate on the stage one by one. There are two sources of XML, one from an actual site, and another from a XML stored in the hdd. First i fill the arrays of textFields, and then animate the movieclip. I do this for the first one, then animate it, do it again for the 2nd one, animate it, again for the 1st one, animate it, so on so on.
myTween = new Tween(mc,"x",None.easeNone,sizeOfStage,0 - mc.width,mcSpeedAuto,true);
my tween ends at 0 - mc.width, the problem is, if i tween first the
"bigger" XML, when the next one which is smaller gets tweened, there's loads of empty space before it tweens the big one again (tweening whitespace?).
myTween.addEventListener(TweenEvent.MOTION_FINISH, onFinish);
onFinish i clear all the arrays (otherwise the tweening of the 2nd one would still have information of the 1st one e.g: 1st has 25 fields, second has 10, 1st shows it's 25 fields, 2nd shows 10, and the 15 that were left from from the 1st one) and call the tween on the 2nd one. I thought that by doing this i'd be clearing all that white space too, apparently not. I think the mc.width just keeps the "bigger" value and always tweens with that, taking longer to end in the 2nd case. I've tried setting the mc.width as the sum of textfield width's everytime i fill the arrays, but this hasn't worked either
First of all: this is my first post at actionscript.org *happysound*. I'm working on this flash gallery since a couple of days and something is drinving me crazy in actionscript.
The concept: in this part of the flashfile i'm loading thumbnails in dynamicly created movieclips on stage (1.jpg, 2.jpg, 3.jpg). Everything is working fine, but now I wanted to add some fancy fading when the loading of a single thumb completes. For some reason I can not get the tweening class working and I'm sure it's a problem with the referencing to the clip. I know this cause when I change "thumb"+i to thumb1 it is working. Googled for hours without result..
[Code]...