Re: [Flashcoders] quick question about buttons

2006-05-02 Thread Ian Thomas
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.

Re: [Flashcoders] quick question about buttons

2006-05-02 Thread ryanm
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

RE: [Flashcoders] quick question about buttons

2006-05-02 Thread Ash Warren
: [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

Re: [Flashcoders] quick question about buttons

2006-05-02 Thread Mark Burvill
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

RE: [Flashcoders] quick question about buttons

2006-05-02 Thread Ash Warren
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

[Flashcoders] quick question about buttons

2006-05-02 Thread Mark Burvill
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