Question
Respond To Mouse Clicks In ActionScript
Hi,
Can anyone help me with this actionscript coding I want to perform both operations, any ideas:
-------------------------------------------------------
Patient1.buttonMode = true;
Patient1.addEventListener(MouseEvent.CLICK,onClick);
function onClick(event:MouseEvent):void {
var Patient_correct:Patient_correct = new Patient_correct();
Patient_correct1.x = 560.8;
Patient_correct.y = 287.9;
addChild(Patient_correct);
---**I need to add a variable or code here for the both parts to work**-------
button1.buttonMode = true;
button1.addEventListener(MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void {
var circle1:Circle = new Circle();
circle1.x = 617.5;
circle1.y = 224.9;
addChild(circle1);
}
Please help, thanks
Can anyone help me with this actionscript coding I want to perform both operations, any ideas:
-------------------------------------------------------
Patient1.buttonMode = true;
Patient1.addEventListener(MouseEvent.CLICK,onClick);
function onClick(event:MouseEvent):void {
var Patient_correct:Patient_correct = new Patient_correct();
Patient_correct1.x = 560.8;
Patient_correct.y = 287.9;
addChild(Patient_correct);
---**I need to add a variable or code here for the both parts to work**-------
button1.buttonMode = true;
button1.addEventListener(MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void {
var circle1:Circle = new Circle();
circle1.x = 617.5;
circle1.y = 224.9;
addChild(circle1);
}
Please help, thanks