|
-
button to send variable??
Hi all
not sure what I am doing wrong..
want a button to send a variable, but can't seem to get it working.
In a simple test, I set up a dynamic text box to display the variable sent by different buttons.
What wrong with my code here?
-------------------AS3
btn1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent):void {
var idv:int=('1');
}
btn2.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2);
function mouseDownHandler2(event:MouseEvent):void {
var idv:int=('2');
}
txt1.text = idv.toString();
-----------------------
cheers
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|