onMouseUp is a global function
If you have the following:
class MyButton extends MovieClip {
function onMouseUp() {
trace(onMouseUp);
}
}
And put 100 instances on stage.
Each time you click and release *anywhere* in you application, you'll get 100
traces.
If you want to use mouse events
You don't need to use hitTest - you can just assign a function to the
onRelease event within the constructor:
class com.blurredistinction.Mtest extends MovieClip {
function Mtest(){
this.onRelease = function(){
trace(this);
}
}
}
Dave -
Head Developer
www.blurredistinction.com
Adobe
Thanks for the replies!
My apologies for not checking how the mouseup event is handled.
Coming from many, many years of Director/Lingo work, I simply assumed
mouseup to work in a similar manner :)
Cheers,
Dan
On 20 okt 2006, at 17.02, Dave Mennenoh wrote:
You don't need to use
Also, you don't need to say this.onRelease inside another function.
Just put the following in your class:
class MyClass extends MovieClip {
function MyClass() {}
function onRelease():Void {
// do something
}
}
4 matches
Mail list logo