wmaraci reklam

Flash Action Script 3.0 Hesap Makinesi

6 Mesajlar 4.907 Okunma
pst.net
wmaraci reklam

fatihcan fatihcan www.ktubotekulubu.com Kullanıcı
  • Üyelik 28.08.2012
  • Yaş/Cinsiyet 31 / E
  • Meslek Öğrenci
  • Konum Trabzon
  • Ad Soyad ** **
  • Mesajlar 478
  • Beğeniler 212 / 75
  • Ticaret 2, (%100)



Flash AS 3.0 ile hazırlamış olduğum hesap makinesi aşağıda kodları bulunmaktadır ancak açıklama satırları koymadım anlamadığınız kısımlar da sorular sorabilirsiniz açıklamasını yapabilirim.

Kodlar


var sayibir:Number=0;
var sayiiki:Number=0;
var sondeger:Number=0;
var islem:Number=0;
var sayac:Number=1;

bir_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_18);

function fl_MouseClickHandler_18(event:MouseEvent):void
{

if(sondeger==Number(sonuc_txt.text)){
sonuc_txt.text="";
}
sonuc_txt.text=String(sonuc_txt.text+1);
}

iki_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_19);

function fl_MouseClickHandler_19(event:MouseEvent):void
{
if(sondeger==Number(sonuc_txt.text)){

sonuc_txt.text="";
}
sonuc_txt.text=String(sonuc_txt.text+2);

}

uc_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_20);

function fl_MouseClickHandler_20(event:MouseEvent):void
{
if(sondeger==Number(sonuc_txt.text)){
//sayibir=Number(sonuc_txt.text);
sonuc_txt.text="";
}
sonuc_txt.text=String(sonuc_txt.text+3);

}

dort_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_21);

function fl_MouseClickHandler_21(event:MouseEvent):void
{
if(sondeger==Number(sonuc_txt.text)){
//sayibir=Number(sonuc_txt.text);
sonuc_txt.text="";
}
sonuc_txt.text=String(sonuc_txt.text+4);

}

bes_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_22);

function fl_MouseClickHandler_22(event:MouseEvent):void
{
if(sondeger==Number(sonuc_txt.text)){
//sayibir=Number(sonuc_txt.text);
sonuc_txt.text="";
}
sonuc_txt.text=String(sonuc_txt.text+5);

}

alti_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_23);

function fl_MouseClickHandler_23(event:MouseEvent):void
{
if(sondeger==Number(sonuc_txt.text)){
//sayibir=Number(sonuc_txt.text);
sonuc_txt.text="";
}
sonuc_txt.text=String(sonuc_txt.text+6);

}

yedi_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_24);

function fl_MouseClickHandler_24(event:MouseEvent):void
{
if(sondeger==Number(sonuc_txt.text)){
//sayibir=Number(sonuc_txt.text);
sonuc_txt.text="";
}
sonuc_txt.text=String(sonuc_txt.text+7);

}

sekiz_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_25);

function fl_MouseClickHandler_25(event:MouseEvent):void
{
if(sondeger==Number(sonuc_txt.text)){
//sayibir=Number(sonuc_txt.text);
sonuc_txt.text="";
}
sonuc_txt.text=String(sonuc_txt.text+8);

}

dokuz_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_26);

function fl_MouseClickHandler_26(event:MouseEvent):void
{
if(sondeger==Number(sonuc_txt.text)){
//sayibir=Number(sonuc_txt.text);
sonuc_txt.text="";
}
sonuc_txt.text=String(sonuc_txt.text+9);

}

sifir_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_27);

function fl_MouseClickHandler_27(event:MouseEvent):void
{
if(sondeger==Number(sonuc_txt.text)){
//sayibir=Number(sonuc_txt.text);
sonuc_txt.text="";
}
sonuc_txt.text=String(sonuc_txt.text+0);

}

arti_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_28);

function fl_MouseClickHandler_28(event:MouseEvent):void
{
islem=1;
if(sayac==1){
sondeger=Number(sonuc_txt.text);

sonuc_txt.text="";
}
if(sayac > =2){
sayiiki=Number(sonuc_txt.text);
sondeger=sondeger+sayiiki;
sonuc_txt.text=String(sondeger);
}
sayac=sayac+1;

}

esit_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_29);

function fl_MouseClickHandler_29(event:MouseEvent):void
{
sayiiki=Number(sonuc_txt.text);
if(islem==1){
sondeger=sayibir+sayiiki;
sonuc_txt.text=String(sondeger);
}
if(islem==2){
sondeger=sayibir-sayiiki;
sonuc_txt.text=String(sondeger);
}
if(islem==3){
sondeger=sayibir*sayiiki;
sonuc_txt.text=String(sondeger);
}
if(islem==4){
sondeger=sayibir/sayiiki;
sonuc_txt.text=String(sondeger);
}
}

eksi_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_30);

function fl_MouseClickHandler_30(event:MouseEvent):void
{
islem=2;
if(sayac==1){
sondeger=Number(sonuc_txt.text);

sonuc_txt.text="";
}
if(sayac > =2){
sayiiki=Number(sonuc_txt.text);
sondeger=sondeger-sayiiki;
sonuc_txt.text=String(sondeger);
}
sayac=sayac+1;
}

carpi_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_31);

function fl_MouseClickHandler_31(event:MouseEvent):void
{
islem=3;
if(sayac==1){
sondeger=Number(sonuc_txt.text);

sonuc_txt.text="";
}
if(sayac > =2){
sayiiki=Number(sonuc_txt.text);
sondeger=sondeger*sayiiki;
sonuc_txt.text=String(sondeger);
}
sayac=sayac+1;
}

bolu_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_32);

function fl_MouseClickHandler_32(event:MouseEvent):void
{
islem=4;
if(sayac==1){
sondeger=Number(sonuc_txt.text);

sonuc_txt.text="";
}
if(sayac > =2){
sayiiki=Number(sonuc_txt.text);
sondeger=sondeger/sayiiki;
sonuc_txt.text=String(sondeger);
}
sayac=sayac+1;
}

sil_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_33);

function fl_MouseClickHandler_33(event:MouseEvent):void
{
sonuc_txt.text="";
islem=0;
sayibir=0;
sayiiki=0;
sondeger=0;
}

sin_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_34);

function fl_MouseClickHandler_34(event:MouseEvent):void
{
sonuc_txt.text=String(Number(Math.sin(Number(sonuc_txt.text)*Math.PI/180)));
}

kare_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_35);

function fl_MouseClickHandler_35(event:MouseEvent):void
{
sonuc_txt.text=String(Number(Math.pow(Number(sonuc_txt.text),2)));

}


Kaynak: http://www.tekno-logy.com/flash-action-script-3-0-hesap-makinesi.html
.FLA Olarak indir : http://www.tekno-logy.com/wp-content/uploads/2012/11/hesaplamalar.zip
blogac

kişi bu mesajı beğendi.

wmaraci
reklam

senolsenolx senolsenolx WM Aracı Kullanıcı
  • Üyelik 16.10.2012
  • Yaş/Cinsiyet 41 / E
  • Meslek Bilgisayarci
  • Konum Azerbeycan
  • Ad Soyad ** **
  • Mesajlar 53
  • Beğeniler 2 / 6
  • Ticaret 0, (%0)
cok tatli olmus
fatihcan

kişi bu mesajı beğendi.

blogac blogac WM Aracı Kullanıcı
  • Üyelik 14.01.2012
  • Yaş/Cinsiyet 34 / E
  • Meslek Webmaster
  • Konum Konya
  • Ad Soyad ** **
  • Mesajlar 91
  • Beğeniler 17 / 15
  • Ticaret 7, (%100)
hocam bu tür çalışmaları action script 3 ile yapabiliyoruz sadece değil mi, yani as2 de yok galiba böyle bir şey, ayrıca bu kodları kopyala yapıştır şeklinde kullanabiliyor muyuz? kesin kullanırız ben bu kodları alıp Action Script 'te nereye yapıştırıp çalışmayı devam ettirebilirim?

Bilgilendirirseniz çok sevinirim.
 

 

fatihcan fatihcan www.ktubotekulubu.com Kullanıcı
  • Üyelik 28.08.2012
  • Yaş/Cinsiyet 31 / E
  • Meslek Öğrenci
  • Konum Trabzon
  • Ad Soyad ** **
  • Mesajlar 478
  • Beğeniler 212 / 75
  • Ticaret 2, (%100)

blogac adlı üyeden alıntı

hocam bu tür çalışmaları action script 3 ile yapabiliyoruz sadece değil mi, yani as2 de yok galiba böyle bir şey, ayrıca bu kodları kopyala yapıştır şeklinde kullanabiliyor muyuz? kesin kullanırız ben bu kodları alıp Action Script 'te nereye yapıştırıp çalışmayı devam ettirebilirim?

Bilgilendirirseniz çok sevinirim.


Hocam 2.0 ile de yaparsın neden yapamayasın ancak çalışır mı bilmiyorum çünkü 2.0 ile hiç çalışmadım. konu sonunda proje dosyası var onu indirip öyle inceleyebilirsin.
blogac

kişi bu mesajı beğendi.

wmaraci
Mersin evden eve nakliyat

blogac blogac WM Aracı Kullanıcı
  • Üyelik 14.01.2012
  • Yaş/Cinsiyet 34 / E
  • Meslek Webmaster
  • Konum Konya
  • Ad Soyad ** **
  • Mesajlar 91
  • Beğeniler 17 / 15
  • Ticaret 7, (%100)
Yanid emek istediğim hocam :) sizin çıkartmış olduğunuz kodu Adobe Flash üzerinde 2.0 ya da 3.0 ile kullanabilir miyiz, kodu alıp adobe 3 üzerinde yapıştırabileceğimiz ve görünürdeki hesap makinesini daha da geliştirmek için çalışma yapabilir miyiz?
 

 

fatihcan fatihcan www.ktubotekulubu.com Kullanıcı
  • Üyelik 28.08.2012
  • Yaş/Cinsiyet 31 / E
  • Meslek Öğrenci
  • Konum Trabzon
  • Ad Soyad ** **
  • Mesajlar 478
  • Beğeniler 212 / 75
  • Ticaret 2, (%100)

blogac adlı üyeden alıntı

Yanid emek istediğim hocam :) sizin çıkartmış olduğunuz kodu Adobe Flash üzerinde 2.0 ya da 3.0 ile kullanabilir miyiz, kodu alıp adobe 3 üzerinde yapıştırabileceğimiz ve görünürdeki hesap makinesini daha da geliştirmek için çalışma yapabilir miyiz?


Kullanın hocam sizindir proje :) Sorun değil
 

 

wmaraci
Konuyu toplam 1 kişi okuyor. (0 kullanıcı ve 1 misafir)
Site Ayarları
  • Tema Seçeneği
  • Site Sesleri
  • Bildirimler
  • Özel Mesaj Al