At 09:26 PM 4/18/2009, you wrote:
On Sat, Apr 18, 2009 at 9:12 PM, Laurence MacNeill <<mailto:[email protected]>[email protected]> wrote: Being a total flex-newb, I have no idea how to do that. :-) I do understand the concept of what you said, but I have no idea how to implement that into real code.

Do you think you could give me a snippet of code that will show a button and the event listener? Or point me somewhere on the Internet.


<http://www.google.com/search?q=flex+button+event+listener>http://www.google.com/search?q=flex+button+event+listener is a good place to start. Google is your friend.

You might also try <http://www.adobe.com/devnet/flex/quickstart/handling_events/>http://www.adobe.com/devnet/flex/quickstart/handling_events/

There's a lot of code on the Adobe website for getting you started in Flex. I highly recommend that you try the "Flex in a week" (<http://www.adobe.com/devnet/flex/videotraining/>http://www.adobe.com/devnet/flex/videotraining/).



Ok, I've written the following. It should pop up an Alert window when you press a key. But it doesn't. Why?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">

  <mx:Script>
    <![CDATA[
      import mx.controls.Alert;
      import flash.events.KeyboardEvent;

      private function keyHandler(event:Event):void {
        Alert.show ("You pressed a key");
      }

    ]]>
  </mx:Script>

<mx:Form x="10" y="10" width="100%" height="100%" keyDown="keyHandler(event)"/>

</mx:Application>



-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------


Reply via email to