Yes, actually it should work with a DynImage. Thats the whole point of
the widgets is that they inherit from the DynLayer. So eventlisteners
will work on them as well.
--
Robert Rainwater
On 4/9/2001, 3:37:21 PM EST, Gregor wrote about "[Dynapi-Help] Using a single
eventlistener for multiple layers":
> The answer is no.
> Gregor Brandt wrote:
>>
>> Does this work with DynImage as well?
>>
>> Gregor
>>
>> Robert Rainwater wrote:
>> >
>> > Just say:
>> > listener = new EventListener()
>> > listener.onclick = function(e) {
>> > var o = e.getSource();
>> > // o is the dynlayer reference
>> > }}
>> > layer1.addEventListener(listener)
>> > layer2.addEventListener(listener)
>> > layer3.addEventListener(listener)
>> >
>> > When you get the source of the event, you will have the dynlayer
>> > reference.
>> >
>> > --
>> > Robert Rainwater
>> >
>> > On 4/9/2001, 2:09:33 AM EST, Gregor wrote about "[Dynapi-Help] Using a single
>eventlistener for multiple layers":
>> >
>> > > I have multiple layers that react identically to a mouse click. I would
>> > > like to write a generic EventListener to handle the clicks for all the
>> > > layers. I can't seem to find a way to do this, is it possible?
>> >
>> > > Gregor
>> >
>> > > _______________________________________________
>> > > Dynapi-Help mailing list
>> > > [EMAIL PROTECTED]
>> > > http://lists.sourceforge.net/lists/listinfo/dynapi-help
>> >
>> > _______________________________________________
>> > Dynapi-Help mailing list
>> > [EMAIL PROTECTED]
>> > http://lists.sourceforge.net/lists/listinfo/dynapi-help
>>
>> _______________________________________________
>> Dynapi-Help mailing list
>> [EMAIL PROTECTED]
>> http://lists.sourceforge.net/lists/listinfo/dynapi-help
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help