612__________________Часть V. Разработка программ и написание скрипгов
*have been loaded before we attempt to use them.
*/ MediaTracker tracker= new MediaTracker(this);
tr {
imagel= getlmage(getDocumentBase(), pici);
tracker.addlmage(imagel, 0);
image2= getlmage(getDocumentBase(), pic2);
tracker.addlmage(image2, 0);
}catch (Exception e)( )
try (
tracker.waitForID(O);
}catch (Exception e){ }
current= imagel;
/*
* This routine is called each time the mouse enters the
* applet area. It plays a sound and changes the displayed
* image.
*/ public boolean mouseEnter(Event evt, int x, int y){
/*
* Try to play the sound
*/ try (
play(getDocumentBase(), sound);
}catch (Exception e)(
System.out.printin("Unable to play Sound");
}
/*
* Change "current"to the alternate image and force a repaint
*/