import java.applet.*; import java.awt.*; public class hedge extends Applet{ public void init(){ } public void paint(Graphics g){ Image ezh=getImage(getDocumentBase(),"ezh.jpg"); Image fon=getImage(getDocumentBase(),"fon.gif"); AudioClip zvuk=getAudioClip(getCodeBase(),"ezh.wav"); do{ try{ Thread.sleep(1000); } catch(Exception e){e.printStackTrace();} int j=(int)(5*Math.random()); if (j>3){ zvuk.loop(); for(int t=1;t<800;t=t+5){ g.drawImage(fon, 1, 1, this); g.drawImage(ezh,t,0,this); try{ Thread.sleep(50); } catch(Exception e){e.printStackTrace();} } }zvuk.stop(); }while(1==1); } }