Fireworks…daripada buang2 duit mending pake JAVA..:p

fireworks…on desktop not buy fireworks..:p



neh potongan code fireworks…

public void init()
  {
    String str = super.getParameter("para_bits"); if (str != null) this.bits = Integer.parseInt(str);
    str = super.getParameter("para_max"); if (str != null) this.bit_max = Integer.parseInt(str);
    str = super.getParameter("para_blendx"); if (str != null) this.ru = Integer.parseInt(str);
    str = super.getParameter("para_blendy"); if (str != null) this.rv = Integer.parseInt(str);
    str = super.getParameter("para_sound"); if (str != null) this.bit_sound = Integer.parseInt(str);

    this.m_nAppX = super.size().width;
    this.m_nAppY = super.size().height;
    this.m_centerX = (this.m_nAppX / 2);
    this.m_centerY = (this.m_nAppY / 2);
    this.m_mouseX = this.m_centerX;
    this.m_mouseY = this.m_centerY;
    super.resize(this.m_nAppX, this.m_nAppY);

    this.pixls = (this.m_nAppX * this.m_nAppY);
    this.pixls2 = (this.pixls - (this.m_nAppX * 2));
    this.pix0 = new int[this.pixls];
    this.offImage = new MemoryImageSource(this.m_nAppX, this.m_nAppY, this.pix0, 0, this.m_nAppX);
    this.offImage.setAnimated(true);
    this.dbImg = super.createImage(this.offImage);

    for (int i = 0; i < this.pixls; ++i) {
      this.pix0[i] = -16777216;
    }

    this.sound1 = super.getAudioClip(super.getDocumentBase(), "firework.au");
    this.sound2 = super.getAudioClip(super.getDocumentBase(), "syu.au");

    for (int j = 0; j < this.bits; ++j) {
      this.bit_f[j] = 0;
    }

    this.isInitialized = true;
    start();
  }

  public void run()
  {
    while (!(this.isInitialized)) try {
        Thread.sleep(200L);
      }
      catch (InterruptedException localInterruptedException1)
      {
      }
    while (true) {
      for (int j = 0; j < this.pixls2; ++j)
      {
        int k = this.pix0[j];
        int l = this.pix0[(j + 1)];
        int i1 = this.pix0[(j + this.m_nAppX)];
        int i2 = this.pix0[(j + this.m_nAppX + 1)];

        int i = (k & 0xFF0000) >> 16;
        int i3 = ((((l & 0xFF0000) >> 16) - i) * this.ru >> 8) + i;
        i = (k & 0xFF00) >> 8;
        int i4 = ((((l & 0xFF00) >> 8) - i) * this.ru >> 8) + i;
        i = k & 0xFF;
        int i5 = (((l & 0xFF) - i) * this.ru >> 8) + i;

        i = (i1 & 0xFF0000) >> 16;
        int i6 = ((((i2 & 0xFF0000) >> 16) - i) * this.ru >> 8) + i;
        i = (i1 & 0xFF00) >> 8;
        int i7 = ((((i2 & 0xFF00) >> 8) - i) * this.ru >> 8) + i;
        i = i1 & 0xFF;
        int i8 = (((i2 & 0xFF) - i) * this.ru >> 8) + i;

        int i9 = ((i6 - i3) * this.rv >> 8) + i3;
        int i10 = ((i7 - i4) * this.rv >> 8) + i4;
        int i11 = ((i8 - i5) * this.rv >> 8) + i5;
        this.pix0[j] = (i9 << 16 | i10 << 8 | i11 | 0xFF000000);
      }

      rend();
      this.offImage.newPixels(0, 0, this.m_nAppX, this.m_nAppY);
      try {
        Thread.sleep(this.m_sleepTime);
      }
      catch (InterruptedException localInterruptedException2) {
      }
    }
  }

Sedikit CURHAT…:p…
orang2 ooon main kembang api di daerah yang banyak orang tuanya….gak mikir ya..pake otak donk’s. disini di kota bukan di desa..dah gitu disini banyak orang tua bukan anak muda…OON…mending pake program aja kan malah lebih tenang..sekali lagi OON. JANGAN CUMAN MIKIRIN SENDIRI…TAPI LIHAT LINGKUNGAN SEKITAR…INI BUKAN LAPANGAN GAN

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s