...

Actionscript classes in mxml

vertmonkee
02-22-2009, 08:58 PM
I am just learning Flex using Flex Builder 3.

I'm having problems with what I am sure is a simple part of developing applications.

If I create a new actionscript class such as this, in a file called NewNativeWindow.as

package
{
import mx.controls.Alert;

public class NewNativeWindow
{
public function NewNativeWindow()
{
Alert("Hello Ian");
}

}
}

In my mxml file how do I reference the NewNativeWindow function when I click on a button.

Thanks for any help with this.

gnomeontherun
02-22-2009, 09:42 PM
http://livedocs.adobe.com/flex/2/langref/mx/controls/Button.html

<mx:Button label="Button" click="NewNativeWindow();"/>


Learning Flex myself, mostly by helping others haha.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum