[Vorbis-dev] file

abot saleh saleh_bu_19 at yahoo.com
Tue Aug 9 16:55:15 PDT 2005


hi 
im saleh
please help me
 
 
I WANT SOURSE CODE SIMILAR THIS CODE
 
package asl;

import java.awt.*;
import java.awt.event.*
;
import java.applet.*;

public class animat1 extends Applet implements Runnable{
    int c = 290, d = 300;
    int x = 20, k = 20, o = 0, m = 10, n = 0, y = 0;
 
   Thread t = new Thread(this);
    Image img1, img2, img3;
 //   AudioClip a1;
 
    public void init() {
  
      //  x = (int) (Math.random() * 420 - 100);
        //  y = (int) (Math.random() * 310 - 100);
        //  n = (int) (Math.random() * 660 - 100);
  
      //  o = (int) (Math.random() * 540 - 100);
        //  m = (int) (Math.random() * 350 - 100);
        //  k = (int) (Math.random() * 530 - 100);
     //   a1 = getAudioClip(getDocumentBase(), "4.au");
        t.start();
        this.setSize(600, 670);
        this.setBackground(Color.CYAN);
        img1 = this.getImage(this.getCodeBase(), "4.jpg");
 
       img2 = this.getImage(this.getCodeBase(), "7.jpg");
        img3 = this.getImage(this.getCodeBase(), "8.jpg");
    }
    public void paint(Graphics g) {
 
       super.paint(g);
        y = (int) (Math.random() * 210 - 100);
        n = (int) (Math.random() * 260 - 100);
        o = (int) (Math.random() * 240 - 100);
        // g.drawImage(img1, x, y, 120, 150, this);
        g.drawImage(img2, m, n, 60, 40, this);
        // g.drawImage(img3, k, o, 140, 170, this);
        g.fillOval(225, 620, 150, 150);
        g.setColor(Color.red);
 
       g.fillOval(c, d, 20, 20);
        g.setColor(Color.BLACK);
        g.fillRoundRect(293, 530, 15, 150, 10, 10);
    }

    public void run() {

        while (true) {
          //  a1.play();

            m += 10;
            d -= 10;
            if (d == 0) {
                d = 300;
     }
  
          if(m==600)
 
               m=0;
            try {
                t.sleep(10);
 
           }
 catch (InterruptedException ex) {
            }
            repaint();

            if (c == m && d == n) {

                img2 = null;
            }
 
           //  repaint();
            try {
 
               t.sleep(50);
            }
 catch (InterruptedException ex) {
            }
 
           repaint();
        }
 
   }
}
 
*****************************************************************
package asl;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class animat extends JApplet implements Runnable{
  Thread t = new Thread(this);
  Image picture[]=new Image[6];
  int totalpic=0;
  int current=0;
  int pause=500;
  String imgText;
  //*********************************
  public void init(){
    t.start();
    String pauseText=null;
    pause=Integer.parseInt(pauseText);
    for(int i=0;i<6;i++){
    imgText=getParameter("image"+i);
    if(imgText!=null){
      totalpic++;
    picture[i] = this.getImage(this.getCodeBase(), imgText);
    }
    else
     totalpic++;
    }
   }
   //********************************
   public void paint(Graphics screen){
     Graphics2D screen2D=(Graphics2D) screen;
     if(picture[current]!=null){
       screen2D.drawImage(picture[current],0,0,this);
       //  g.drawImage(img2, m, n, 60, 40, this);
     }
   }
   //*********************************
 /*  public void start(){
     if(runner==null){
       runner=new Thread(this);
       runner.start();
     }
   }*/
  //**********************************
  public void run() {
    Thread thisTread=Thread.currentThread();
    while (t == thisTread){
      repaint();
      current++;
       if (current >= totalpic)
        current=0;
        try{
          Thread.sleep(pause);
        }
        catch (InterruptedException e){
        }
    }
  }
  //*********************************
  public void update(Graphics screen){
    paint(screen);
  }
}

 
 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20050809/a98ef99b/attachment.html


More information about the Vorbis-dev mailing list