Click here to Skip to main content
13,346,843 members (24,946 online)
Click here to Skip to main content
Add your own
alternative version


10 bookmarked
Posted 14 May 2011

Flex Development using Visual Studio and Amethyst

, 14 May 2011
Rate this:
Please Sign up or sign in to vote.
Demonstration of building Flex applications using Visual Studio 2008 and Amethyst
Sample Image - maximum width is 600 pixels

Sample Image - maximum width is 600 pixels


Flex is an open source development framework for creating a variety of rich applications like desktop applications, web applications and mobile applications.

Even though the Flex SDK itself is free, it lacks a free development environment or IDE which can accelerate development using features like intelligent code editing, debugging, profiling, etc.

Still there are a few options, most notably Flash Builder and Flash Develop. Flash Builder is a non-free alternative with a heavy price tag attached to it. Flash Develop is a good free alternative with excellent features like code completion and code generation but it does not have a Graphical User Interface(GUI).


A lesser known free alternative to Flex development is Amethyst, a free Flex IDE by Sapphire Steel. Amethyst Personal is a free Flex IDE which provides development environment for Flex/ActionScript. Amethyst gets installed into the free Visual Studio shell edition and provides a professional environment for flex development like code completion, GUI support, debugging, etc.

To get started with Amethyst, you must first obtain and install the free Visual Studio shell edition from Microsoft.

You also need to download Adobe Flex SDK from the following site:

You can download Amethyst from the following link:

While installing Amethyst, you also need to specify the path where you have downloaded and unzipped Adobe Flex SDK.

Using the Code

You can create your flex application using the familiar drag and drop approach of Visual Studio.

As shown in the output screenshot above, I have placed a Label, a TextInput and two Button controls on the screen.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application height="600" layout="absolute" width="800" 

		<![CDATA[<span class="code-SummaryComment">
<mx:Label height="18" text="Enter your name: " 

		width="112" x="87" y="96"/>	// Label Control
<mx:TextInput height="22" id="txtName" text="" 

		width="160" x="204" y="92"/>	// TextInput Control
<mx:Button click="button_click(event)" height="22" id="btnOK" label="OK" 

name="btnOK" width="65" x="126" y="133"/>	// Button Control
<mx:Button click="btnClear_click(event)" height="22" id="btnClear" label="Clear" 

	name="btnClear" width="65" x="204" y="133"/>	// Button Control

When we double click on the button controls in the design window, the code window opens:

	<![CDATA[<span class="code-SummaryComment">
		import mx.controls.Alert;		// importing the Alert control
		private function button_click( 
		{		// Event handler for button
			var username:String=txtName.text;	// Getting name entered 
							//by user"Hello " + username, 
			"Welcome to Flex using VS2008");	// Showing message
	<![CDATA[<span class="code-SummaryComment">
		private function btnClear_click( 
	{		// Event handler for button
			txtName.text="";			// Clearing the TextInput

Points of Interest

Flex is an extremely interesting framework and quite easy to learn and Amethyst with Visual Studio provides a very simple yet productive environment for Flex development.

I hope that this article will help a novice start developing Flex applications in quite a short period.


  • 14th May, 2011: Initial version


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Azim Zahir
Instructor / Trainer NIIT, India
India India
I am a trainer by profession. Currently I am working with NIIT (Mumbai, India) as a Senior Faculty. I enjoy programming as a hobby. My favorite technologies are Flash, Flex and Silverlight.

Of late I have developed keen interest in WPF and Windows Mobile programming.

Apart from computers, my favorite pastime is bicycling.

You may also be interested in...


Comments and Discussions

QuestionCelebrate Mother’s Day with flora wishes Pin
Member 106472213-May-14 0:20
memberMember 106472213-May-14 0:20 
GeneralMy vote of 5 Pin
VitorHugoGarcia5-Sep-13 0:15
memberVitorHugoGarcia5-Sep-13 0:15 
GeneralRe: My vote of 5 Pin
Azim Zahir7-Sep-13 1:21
memberAzim Zahir7-Sep-13 1:21 

Thanks for your interest in this article.

If you have VS 2010 Professional, you do not need the Shell Edition, since Amethyst works with commercial (Professional or above) OR free (shell) copy of Visual Studio 2012 or 2010. It does not work with Express Editions.

GeneralRe: My vote of 5 Pin
VitorHugoGarcia9-Sep-13 23:37
memberVitorHugoGarcia9-Sep-13 23:37 
QuestionExciting stuff! Pin
Patrick Harris28-Jun-12 18:47
memberPatrick Harris28-Jun-12 18:47 
AnswerRe: Exciting stuff! Pin
Azim Zahir29-Jun-12 21:34
memberAzim Zahir29-Jun-12 21:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.180111.1 | Last Updated 14 May 2011
Article Copyright 2011 by Azim Zahir
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid