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
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 PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Burvill
Sent: Tuesday, May 02,
You can do this:
myButton_btn.onRelease = myButton_btn.onPress = myButton_btn.onRollOver =
function(){
doStuff();
}
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Burvill
Sent: Tuesday, May 02, 2006 11:17 AM
To: Flashcoders@chattyfig.figleaf.com
Sub
5 matches
Mail list logo