Here is a demo of using ASWing and AnimationPackage to create the below application file. This demo shows you how you can create and animate GUI elements using these two projects.

The Adobe Flash Plugin is needed to display this content.

ASWingAnimate.as


 /**
* @author firdosh
*/
import de.alex_uhlmann.animationpackage. *;
import de.alex_uhlmann.animationpackage.animation. *;
import com.robertpenner.easing. *;
import org.aswing. *;
import org.aswing.utils. *;
class ASWingAnimate 
{
	private var mainWindow : JFrame;
	private var newWindow : JFrame;
	private var createWindow : JButton;
	private var _container : MovieClip;
	private var _newWindowContainer : MovieClip;
	public function ASWingAnimate (Void)
	{
		APCore.initialize ();
		_container = _root.createEmptyMovieClip ("_container", 2);
		_newWindowContainer = _root.createEmptyMovieClip ("_newWindowContainer", 1);
		createWindow = new JButton ("New Window");
		createWindow.addEventListener (JButton.ON_PRESS, Delegate.create (this, createNewWindow));
		mainWindow = new JFrame (_container, false);
		mainWindow.setLocation (10, 10);
		mainWindow.setSize (150, 400);
		mainWindow.setResizable (false);
		mainWindow.setTitle ("Create Tool");
		mainWindow.getContentPane ().append (createWindow, BorderLayout.NORTH);
		mainWindow.show ();
	}
	private function createNewWindow (eventObj : Event) : Void
	{
		_newWindowContainer = _root.createEmptyMovieClip ("_newWindowContainer", 1);
		newWindow = new JFrame (_newWindowContainer, true);
		newWindow.setSize (400, 300);
		_newWindowContainer._x = - 400;
		_newWindowContainer._y = 10;
		newWindow.setTitle ("New Window");
		var myMove : Move = new Move (_newWindowContainer);
		myMove.animationStyle (1000, Circ.easeOut);
		myMove.run (250, _newWindowContainer._y);
		newWindow.show ();
	}
	public static function main (Void) : Void
	{
		var test : ASWingAnimate = new ASWingAnimate ();
	}
}

Discussion

Enter your comment
 
 
projects/aswing/demos/aswing_using_animationpackage_to_create_ria.txt · Last modified: 2007/02/20 11:05 (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki