|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Actionscript for smooth resizing
Hi
Can someone please help me with this actionscript. If I have a simple square on the screen, how do I resize it using actionscript. I dont want the resize to just jump to the new shape, I want it to animate. It should start changing size quickly but then its almost finished resizing, it should slow down. Please have a look at the following website to see the type of effect I am trying to get: www.evb.com Thanks in advance |
|
#2
|
|||
|
|||
|
I think its best to start off simple.
If I have a square on the screen and a button, how to I change the size of this square by pressing the button. I dont know how to get the button to set the values of the square. Please help |
|
#3
|
||||
|
||||
|
The effect is called easing. Here is a simple example.
__________________
No problem is so complex that it cannot be resolved with the proper use of explosives. |
|
#4
|
|||
|
|||
|
thats excellent!
Thanks. What about the color change effect. When it blends from 1 color to another. Do you know what the effect is called, and how to do it. Thanks again ![]() EDIT..................... Please have a look at the .fla file I have attached. I have added another shape. The movie starts off by displaying and setting the sizes of the 2 shapes. I then try to resize the two shapes with the buttons but it does not work. It only resizes the top most shape. How do you resize both shapes at the same time? Last edited by JEN2 : February 24th, 2004 at 05:30 AM. Reason: Added the .fla |
|
#5
|
||||
|
||||
|
As for as the sizing for two different mc's, you just need to do the math and add it to the function as per one of the .fla's I uploaded.
The color change you speak of is an interesting issue. You certainly can do the math on it by using the colorTransform, but this is where the math and actionscript starts to get complicated and if you are new to actionscript, it's already got complicated. The other .fla I uploaded shows you what I mean. I think you might want to get away with using a tween for the color fade, but it's up to you. |
|
#6
|
|||
|
|||
|
rynoe - Thank you very much, you have helped me out a lot.
Yes you are right, I just about understand the actionscript for the "easing" .fla, but that colortransforming fla is way way way, beyond the beginners level ![]() Thanks again |
|
#7
|
|||
|
|||
|
Hi again
![]() Really sorry about this, but I just have 1 more question regarding this easing thing. How do I get the buttons to move up and down when the 2 boxed resize after a button click? I only want the buttons to move up and down (always staying a few pixels below the 2 rectangles), but dont want them to move left or right it the boxes change there width. Thanks a lot ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Actionscript for smooth resizing |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|