# first way with tags, all outer balls will be bound # to same callback my $refitem = $zinc->add('arc',$centergroup2, [ [10,20], [20,30] ], -filled => 1, -fillcolor => $refgrad, ## $refgrad -linewidth => 0, -priority => 100 -tags => ['outerring'], ); # make/clone 11/12 more of the above for (1..11){ my $relement = $zinc->clone($refitem); $zinc->rotate($relement,.53*$_); } $zinc->bind( 'outerring', '<1>', \&ro6); #### my %refitems; my $refitem = $zinc->add('arc',$centergroup2, [ [10,20], [20,30] ], -filled => 1, -fillcolor => $refgrad, ## $refgrad -linewidth => 0, -priority => 100 ); # make/clone 11/12 more of the above for (1..11){ $refitem{$_} = $zinc->clone($refitem); $zinc->rotate($refitem{$_},.53*$_); #here you bind each one separately, and/or #pass extra info to the callback $zinc->bind( $refitem{$_}, '<1>', [ \&ro6, $_ ] ) ; } #### my $refitem = $zinc->add('arc',$centergroup2, [ [10,20], [20,30] ], -filled => 1, -fillcolor => $refgrad, ## $refgrad -linewidth => 0, -priority => 100 -tags => ['outerring'], ); my %refitems; # make/clone 11/12 more of the above for (1..11){ $refitem{$_} = $zinc->clone($refitem); $zinc->addtag($refitem{$_}, $refitem{$_}); $zinc->rotate($refitem{$_},.53*$_); #here you bind each one separately, and/or #pass extra info to the callback $zinc->bind( $refitem{$_}, '<1>', [ \&ro6, $_ ] ) ; }