View Full Version : growing a bar from one of its sides
Iammontoya
May 19th, 2002, 06:43 PM
I was goofing around with more a/s and was trying to grow a bar using _height and a random value. However, it seems to grow from the center, and I'd like it's x or y value to be fixed.
It is basically a vertical bar. I want the bottom to stay fixed, so the bar will grow up.
While we're at it.. I'd also like to figure how to show it "growing" progressively.. I tried a while(condition){
but I must have constructed it wrong. Any thoughts?
ilyaslamasse
May 19th, 2002, 07:23 PM
Edit your bar, and set the point that you want to remain fixed where is the littel crosshair.
Try the code :
onClipEvent (enterFrame) {
(this._height < 200) ? this._height += 5 : trace ("Finished" ) ;
}pom 0]
ilyaslamasse
May 19th, 2002, 07:25 PM
By the way, you can't use a while loop, because it will execute in one frame, so you won't see the bar grow.
pom 0]
Iammontoya
May 20th, 2002, 07:06 AM
I figured out the registration point, thanks. I was able to draw on the power of the Kirupa Oracle and the answer came to me as soon as I posted the question.
I do have a question. It would appear there is no way of truly changing the registration point of an object (crosshairs) after it has been created. I did try the transform, and moving the circle, but this doesnt actually move the crosshairs. Any input on this one?
Pom, I did try your code for showing the bar growing.. I will apply and see how it looks. Thanks.
Iammontoya
May 20th, 2002, 07:17 AM
Well, it turns out that Kirupa provided the answer in the MX forum (the answer on registration point). Just so this post is complete..
I had to click on Edit in Place and move the object in relation to the crosshairs. That changed the registration point.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.