Or even:
var doStuff:Function=function (){
// code...
}
myButton_btn.onRelease = doStuff;
myButton_btn.onPress = doStuff;
myButton_btn.onRollOver = doStuff;
or
import mx.utils.Delegate;
function doStuff(){
// code...
}
var delDoStuff:Function=Delegate.create(this,doStuff);
myButton_btn.
You can do this:
myButton_btn.onRelease = myButton_btn.onPress = myButton_btn.onRollOver =
function(){
doStuff();
}
In my experience that doesn't work. It *should*, but for some reason,
the function never gets assigned to most or all of the events. Better is to
use Delegate.
import mx.uti
: [Flashcoders] quick question about buttons
That's what I'm after.
Thanks :o)
Ash Warren wrote:
> You can do this:
>
> myButton_btn.onRelease = myButton_btn.onPress = myButton_btn.onRollOver =
> function(){
> doStuff();
> }
> -Original Message-
> From: [EMAIL PRO
ay, May 02, 2006 11:17 AM
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] quick question about buttons
Hi list,
Is there a way to condense several button handler commands into one line?
ie instead of writing:
myButton_btn.onRelease = function(){
doStuff();
}
myButton_btn.onPress
Subject: [Flashcoders] quick question about buttons
Hi list,
Is there a way to condense several button handler commands into one line?
ie instead of writing:
myButton_btn.onRelease = function(){
doStuff();
}
myButton_btn.onPress = function(){
doStuff();
}
myButton_btn.onRollOver = function
Hi list,
Is there a way to condense several button handler commands into one line?
ie instead of writing:
myButton_btn.onRelease = function(){
doStuff();
}
myButton_btn.onPress = function(){
doStuff();
}
myButton_btn.onRollOver = function(){
doStuff();
}
Can I do something like:
myButton_btn.o
6 matches
Mail list logo