>>Is it possible for multiple buttons to be tied to one 
>>Listener Object then within the function of this listener 
>>object be table to know which button the user has clicked.If 
>>this is possible, does anyone have code samples that I can 
>>take a look at.

There are many ways to do that I believe. One way, probably best
practices, is I think you could listen for the event.target with the
dispatched event, or one way I do it that involves Delegate (not
necessarily a listener) in AS1 or AS2 is like this:

var del0:Object = button0_mc.onRelease = Delegate.create(this, traceMe)
var del2:Object = button2_mc.onRelease = Delegate.create(this, traceMe)
var del1:Object = button1_mc.onRelease = Delegate.create(this, traceMe)
del0.clip = button0_mc
del1.clip = button1_mc
del2.clip = button2_mc

function traceMe():Void
{
        trace("called from: "+arguments.caller.clip)
}

Jason Merrill
Bank of America  
GT&O Learning & Leadership Development
eTools & Multimedia Team


 
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to