Ah, the joys of programming. I created a dynamic text box called "hector" and three instances of a button called susi, mary and jocylen. Three functions to handle when the user clicks on each button.
hector.text = "Hello";
susi.addEventListener(MouseEvent.MOUSE_DOWN,sue);
mary.addEventListener(MouseEvent.MOUSE_DOWN,mair);
jocylen.addEventListener(MouseEvent.MOUSE_DOWN,joy);
function sue(event:MouseEvent):void
{
hector.text = "susie";
}
function mair(event:MouseEvent):void
{
hector.text = "mary";
}
function joy(event:MouseEvent):void
{
hector.text = "jocylen";
}
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment