Question
adEventListener
I am trying to learn something about the codes in
actionscript 3. And a friend of my had a book about it so I start
trying some actions and somewhere in the book stood the following
thing:
var vierkant:Object = new Object()
var box:Object = new Object()
vierkant.addEventListener(MouseEvent.MOUSE_UP,
onRotateRight);
function onRotateRight(evt:MouseEvent):void {
box.rotation += 20;
}
So I made an object and gave it the name vierkant and another object with the name box
but when I write this in the action window and then click (enter+ctrl)
it gives a error in output, but I have no idea what I'm doing wrong.
var vierkant:Object = new Object()
var box:Object = new Object()
vierkant.addEventListener(MouseEvent.MOUSE_UP,
onRotateRight);
function onRotateRight(evt:MouseEvent):void {
box.rotation += 20;
}
So I made an object and gave it the name vierkant and another object with the name box
but when I write this in the action window and then click (enter+ctrl)
it gives a error in output, but I have no idea what I'm doing wrong.