Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 23rd, 2004, 05:31 AM
JEN2 JEN2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 11 JEN2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old February 23rd, 2004, 06:24 AM
JEN2 JEN2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 11 JEN2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #3  
Old February 24th, 2004, 12:12 AM
rynoe's Avatar
rynoe rynoe is offline
_root.troubleMaker
Dev Shed Novice (500 - 999 posts)
 
Join Date: Dec 2003
Location: Florida, USA
Posts: 638 rynoe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 8 m 30 sec
Reputation Power: 5
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.

Reply With Quote
  #4  
Old February 24th, 2004, 03:18 AM
JEN2 JEN2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 11 JEN2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?
Attached Files
File Type: zip easing2.zip (4.8 KB, 213 views)

Last edited by JEN2 : February 24th, 2004 at 05:30 AM. Reason: Added the .fla

Reply With Quote
  #5  
Old February 24th, 2004, 02:24 PM
rynoe's Avatar
rynoe rynoe is offline
_root.troubleMaker
Dev Shed Novice (500 - 999 posts)
 
Join Date: Dec 2003
Location: Florida, USA
Posts: 638 rynoe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 8 m 30 sec
Reputation Power: 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.

Reply With Quote
  #6  
Old February 24th, 2004, 06:25 PM
JEN2 JEN2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 11 JEN2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #7  
Old February 25th, 2004, 06:18 AM
JEN2 JEN2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 11 JEN2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Actionscript for smooth resizing


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT