more traditional event listener stuff
This commit is contained in:
parent
be31565c47
commit
a1f814a294
@ -1,17 +1,14 @@
|
|||||||
package
|
package
|
||||||
{
|
{
|
||||||
import mx.core.Application;
|
import mx.core.Application;
|
||||||
import mx.controls.Button;
|
|
||||||
import flash.events.MouseEvent;
|
import flash.events.MouseEvent;
|
||||||
|
|
||||||
|
|
||||||
public class CustomApp extends Application
|
public class CustomApp extends Application
|
||||||
{
|
{
|
||||||
public var mutton:Button;
|
|
||||||
|
|
||||||
function CustomApp()
|
function CustomApp()
|
||||||
{
|
{
|
||||||
mutton.addEventListener(MouseEvent.CLICK, butterCup);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function butterCup(event:MouseEvent):void
|
public function butterCup(event:MouseEvent):void
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<me:CustomApp xmlns:mx="http://www.adobe.com/2006/mxml"
|
<me:CustomApp xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||||
xmlns:me="*" layout="absolute">
|
xmlns:me="*" layout="absolute">
|
||||||
<mx:Button id="mutton" label="howdy" />
|
<mx:Button id="mutton" label="howdy" click="butterCup(event)" />
|
||||||
</me:CustomApp>
|
</me:CustomApp>
|
||||||
|
Loading…
Reference in New Issue
Block a user