Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > General > Best Practices

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-17-2007, 07:51 PM   #1
peterpedr0
Registered User
 
Join Date: Jun 2007
Posts: 5
Default Animating Button Class - How would you make one using Design Patterns?

I am trying to wrap my head around the use of design patterns. To do this I'm attempting to come up with the best structure of design patterns to create buttons which contain more functionality than the built in class SimpleButton.

For example, I want to create a structure for making buttons with animations between states (each of the states would be classes containing animations).

Code:
var button:AnimButton = new AnimButton();
button.upState = new UpState( button );
button.overState = new OverState( button );
button.downState = new DownState( button );
		
addChild( button );
Now I thought the best pattern for implementing this structure would be a State Machine Pattern, but I just can't get it working (without being extremely convoluted).

What design pattern's would you use to make a useful animating button structure?
Has anyone developed their own button class (or any UI element) for easily implementing animations and additional behaviors?
peterpedr0 is offline   Reply With Quote
Reply


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash Remoting with Perl dopefries Flash Remoting 3 02-17-2007 02:42 PM
Help!How to make a design page for T-shirt design website lanny Other Flash General Questions 14 03-26-2006 06:10 AM
Need help making this run faster MAYAaddict ActionScript 2.0 3 11-17-2005 11:09 PM
How would I design this? - reacting to button events kracko ActionScript 2.0 8 08-09-2005 03:51 AM
when button is clicked, make sure MC is at certain frame before playing next section livingeachday ActionScript 2.0 3 04-27-2004 10:39 AM


All times are GMT. The time now is 02:55 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.