tompo yes i was thinking of something like that but pan_create
takes only bmap and layer like in example:
Splash = pan_create("bmap = splash.pcx;",1);
but i want the panel to have an on_click option to.
Oh never mind i just figured it out that i can do this...
icon1=pan_create("bmap=i_enemy; on_click=summon_enemy;",11);

tnx for your help tompo