Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Actionscript classes in mxml

    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.

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    http://livedocs.adobe.com/flex/2/lan...ls/Button.html

    Code:
    <mx:Button label="Button" click="NewNativeWindow();"/>
    Learning Flex myself, mostly by helping others haha.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •