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
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);
}
}
---------------------------------
Start your day with Yahoo! - make it your home page
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.xiph.org/pipermail/vorbis-dev/attachments/20050809/fb843a06/attachment.htm
hi i'm saleh i want it so imediatly please guid me my program shuld have a thread that the 4 or more ducky picture fly in sky then 1 gun exist in button of picture that it change place which time then with press the (space key) shut the bird then give him point and have a background from nature that move by the time thanks from your giving answer to me bye --------------------------------- Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20050809/a4a288bc/attachment.html
hi
i'm saleh
i want it so imediatly please guid me
my program shuld have a thread that
the 4 or more ducky picture fly in sky
then 1 gun exist in button of picture that
it change place which time then with
press the (space key) shut the bird
then give him point
and have a background from nature that move by the time
thanks from your giving answer to me
bye
Gun Pro
package tamrin;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class test2 extends Applet {
int c = 225, d = 260,v=620;
int a = 293, b = 530,bb=530;
int p = 220, q = 640;
int n, m, i;
public void init() {
n = (int) (Math.random() * 660 - 100);
m = (int) (Math.random() * 350 - 100);
this.setSize(600, 670);
this.setBackground(Color.CYAN);
}
public void paint(Graphics screen) {
Graphics2D screen2D = (Graphics2D) screen;
screen2D.setColor(Color.RED);
screen2D.fillOval(a, bb,15,15);
screen2D.setColor(Color.BLACK);
screen2D.fillRoundRect(a, b, 15, 150, 10, 10);
screen2D.fillRoundRect(p, q, 160, 160, 15, 15);
screen2D.fillOval(c,v,150,150);
}
public test2() {
try {
jbInit();
} catch (Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.addKeyListener(new test2_this_keyAdapter(this));
}
void this_keyPressed(KeyEvent e) {
if (e.getKeyCode() == e.VK_RIGHT) {
a += 10;
// b += 10;
c += 10;
// d += 10;
p += 10;
// q += 10;
}
if (e.getKeyCode() == e.VK_SPACE) {
while(bb==0){
bb -= 10;
}
}
if (e.getKeyCode() == e.VK_LEFT) {
// while (a == 2) {
a -= 10;
// b-=10;
c-=10;
// d-=10;
// q-=10;
p -= 10;
// }
}
repaint();
}
}
class test2_this_keyAdapter extends java.awt.event.KeyAdapter {
test2 adaptee;
test2_this_keyAdapter(test2 adaptee) {
this.adaptee = adaptee;
}
public void keyPressed(KeyEvent e) {
adaptee.this_keyPressed(e);
}
}
************************************************************************************************************
Main pro
package tamrin;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
public class asl extends Applet implements Runnable {
int c = 290, d = 300;
AudioClip a1;
int n, m, i;
Thread t = new Thread(this);
Image picture[] = new Image[5];
int totalpic = 0;
int current = 0;
int pause = 500;
String imgText;
//*************************************************
public void init() {
n = (int) (Math.random() * 660 - 100);
m = (int) (Math.random() * 350 - 100);
this.setSize(600, 670);
this.setBackground(Color.CYAN);
t.start();
a1 = getAudioClip(getDocumentBase(), "4.au");
// a loop for give the pictures
for (i = 1; i <= picture.length; i++) {
picture[i] = this.getImage(this.getCodeBase(), "i.jpg");
}
String pauseText = null;
pause = Integer.parseInt(pauseText);
for (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[i] != null) {
screen2D.drawImage(picture[current], 0, 0, this);
}
screen2D.fillOval(225, 620, 150, 150);
screen2D.setColor(Color.red);
screen2D.fillOval(c, d, 20, 20); // c=290 , d=300
screen2D.setColor(Color.BLACK);
screen2D.fillRoundRect(293, 530, 15, 150, 10, 10);
for (i = 0; i < 5; i++) {
screen2D.drawImage(picture[i], m, n, 60, 40, this);
}
}
//**********************************************
public void start() {
if (t == null) {
t = new Thread(this);
t.start();
}
}
//*********************************************
public void run() {
Thread thisTread = Thread.currentThread();
while (t == thisTread) {
current++;
if (current >= totalpic) {
current = 0;
}
a1.play();
m += 10;
d -= 10;
if (d == 0) {
d = 300;
}
if (m == 600) {
m = 0;
}
try {
t.sleep(pause);
} catch (InterruptedException ex) {
}
repaint();
if (c == m && d == n) {
picture[i] = null;
}
// repaint();
try {
t.sleep(50);
} catch (InterruptedException ex) {
}
repaint();
}
}
//*************************************************
/*
public asl() {
try {
jbInit();
} catch (Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.addKeyListener(new asl_this_keyAdapter(this));
}
void this_keyPressed(KeyEvent e) {
if (e.getKeyCode() == e.VK_RIGHT) {
a += 10;
// b += 10;
c += 10;
// d += 10;
p += 10;
// q += 10;
}
if (e.getKeyCode() == e.VK_SPACE) {
while(bb==0){
bb -= 10;
}
}
if (e.getKeyCode() == e.VK_LEFT) {
// while (a == 2) {
a -= 10;
// b-=10;
c-=10;
// d-=10;
// q-=10;
p -= 10;
// }
}
repaint();
}
}
class asl_this_keyAdapter extends java.awt.event.KeyAdapter {
asl adaptee;
asl_this_keyAdapter(asl adaptee) {
this.adaptee = adaptee;
}
public void keyPressed(KeyEvent e) {
adaptee.this_keyPressed(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/20050814/a3fe430a/attachment.htm