Süper ise yariyan mükemmel kodlar

--------------------------------------
İŞTE ÇIKMIŞ OLAN EN İYİ KOD; çünkü çok fazla işe yarıyor. Oyunlar için bir numaralı kod!

******İF**********KODU************* -----ERMANSOFT farkıyla-------

onClipEvent (enterFrame) {
if (this.hitTest(_root.cisim)) {
_root.gotoAndPlay("frame");
}
}


animasoyonda bir cimin üstüne bir cisim gelince
istediğiniz kareye gitmesini istiyorsanız. bunu kullanın.

*kodu üstüne gelinecek cisme ekleyin.
*'cisim' kısmı yerine üzerine gelicek olan cismin örnek adını yazın.
*'frame' kısmı yerine frame i yazın

-----------------------------------
-----------------------------------
**********PROPERTİES***************
-----------------------------------
-----------------------------------

----------------------------------------------------------
movie clipin belirli eksen yönünde gitmesi
------------------------------------------------------
AÇIKLAMA:
* _y += (_root.y=0)/speed; yerlerindeki; y=0 ve x=0 kısımlarına gidecekleri hız ve ekseni belirleyin. *
* _x += (_root.x=0)/speed; Örneğin; y=10 , x=15 , y+20 , x-40 gibi. y=0 ve x=0 iken cisim hareket etmez. *

onClipEvent (load) {
speed = 10;
}
onClipEvent (enterFrame) {
_y += (_root.y=0)/speed;
_x += (_root.x=0)/speed;
}

-----------------------------------------------------------
MOVİECLİPi döndürme 2.0
-----------------------------------------------------------
açılama:
hızını arttırmak için; speed kısmını azaltın.
yönünüdeğiştirmek için; _rotation+= (_root.rotation+50)/speed; kısmını
_rotation+= (_root.rotation-50)/speed; yapın.

onClipEvent (load) {
speed = 10;
}
onClipEvent (enterFrame) {
_rotation+= (_root.rotation+50)/speed;
}

------------------------------------------------------------------------------------------
NOT: Yukarıdaki kodları kendiniz; FLASHMX in properties kodları ile değiştirebilirsiniz.
----

,

onClipEvent (load) { movieclipi döndüren bu kodu; onClipEvent (load) {
speed = 10; şu biçimde----------------) speed = 10;
} değiştiriseniz, }
onClipEvent (enterFrame) { movie clip in yüksekliği onClipEvent (enterFrame) {
_rotation+= (_root.rotation+50)/speed; ile oynarsınız. _height+= (_root.height+50)/speed;;
} }

------------------------------
------------------------------
*********SON******************
------------------------------
------------------------------

--------------------------------------------------------------
üzerine gelince el işareti çıkmayan buton
---------------------------------------------------
AÇIKLAMA:
aşağıdaki kodu butona ekleyin ama butonununuzun instance name (örnek adı) mybutton olsun.


on (release, rollOver, rollOut, dragOver, dragOut) {
mybutton.useHandCursor = false;
}

-------------------------------------------------------------
animasyon sırasında kalemle çizim yapabilme (kareye ekleyin)
-------------------------------------------------------------

_root.onMouseMove = function() {
if (draw) {
_root.lineStyle(0, 0x000000, 100);
_root.lineTo(_root._xmouse, _root._ymouse);
}
};
_root.onMouseDown = function() {
draw = true;
_root.moveTo(_root._xmouse, _root._ymouse);
};
_root.onMouseUp = function() {
draw = false;
};

--------------------------------------------------------------------
EN BAŞTAKI KOD AYARLARIYLA İSTEĞE GÖRE; ---EN--İYİ--KOD---
1-Tiklenen yere istenilen hızla giden,
2-Tiklenen yere istenilen hızla hemen dönerek gitmekyerine kendi dönerek giden,
3-Mouseun peşinden giden ama önünü giderken mousea döndüren,
4-Mouseun peşinden giden ama önünü kendi çevresinde dönerekmose döndüren,
MOVİE CLİP.

Ayarları ilk '}' a kadar olan yerden yapılıyor.
1. seçenek için: clickmode =true turnmode = false
2. seçenek için: clickmode =true turnmode = true
3. seçenek için: clickmode =false turnmode = false
4. seçenek için: clickmode =false turnmode = true
olarak ayarlayın.
-------------------------------------------------------------------------

onClipEvent (load) {
// declare and set initial variables and properties
clickSpot_x = _x;
clickSpot_y = _y;
speed = 10;
clickMode = false;
turnMode = false;
}
onClipEvent (mouseDown) {
//
// set position of target spot when mouse is clicked
if (clickMode && _root._xmouse>125 && _root._xmouse<465) {
clickSpot_x = _root._xmouse;
clickSpot_y = _root._ymouse;
}
}
onClipEvent (enterFrame) {
// toggle button icon visibility
_root.curve._visible=turnMode;
_root.pointer._visible=!clickMode;
//
// deterimine whether target spot is the clicked spot or the mouse pointer
if (clickMode) {
gotoSpotX = clickSpot_x;
gotoSpotY = clickSpot_y;
} else{
gotoSpotX = _root._xmouse;
gotoSpotY = _root._ymouse;
}
//
// calculate angle of current position to target position
delta_x = _x-gotoSpotX;
delta_y = _y-gotoSpotY;
targetRotation = -Math.atan2(delta_x, delta_y)/(Math.PI/180);
//
// calculate the two methods of rotation
if (turnMode) {
if (_rotation<targetRotation) {
_rotation += 10;
}
if (_rotation>targetRotation) {
_rotation -= 10;
}
} else{
_rotation = targetRotation;
}
//
// move beetle toward the target and stop when it gets there
if (Math.sqrt((delta_x*delta_x)+(delta_y*delta_y))>speed) {
_y -= speed*Math.cos(_rotation*(Math.PI/180));
_x += speed*Math.sin(_rotation*(Math.PI/180));
}


}


-------------------------------------------------
MERKEZİNE YAKLAŞTIKÇA BÜYÜYEN MOVİE CİP
--------------------------------------------



onClipEvent (enterFrame)
{
mouse = _xmouse;
if (mouse<0)
{
mouse = -1*mouse;
}
scale = 200-mouse;
if (scale<100)
{
scale = 100;
}
if (scale>200)
{
scale = 200;
}
setProperty ("", _xscale, scale);
setProperty ("", _yscale, scale);
}



---------------------------------------------------------
tutup fırlatıla bilen fizik motorlu movie clip
------------------------------------------------




on(press){
startDrag("");
dragging=true;
}
on(release, releaseOutside){
stopDrag();
dragging=false;
}
onClipEvent (load) {
_x = Math.random()*30;
_y = Math.random()*30;
xspeed = 20;
rightedge = 550;
leftedge = 0;
yspeed = 20;
topedge = 0;
bottomedge = 400;
drag = .98;
bounce = .9;
gravity = 2;
}
onClipEvent (enterFrame) {
if (!dragging) {
_x = _x+xspeed;
if (_x+_width/2>rightedge) {
_x = rightedge-_width/2;
xspeed = -xspeed*bounce;
}
if (_x-_width/2<leftedge) {
_x = leftedge+_width/2;
xspeed = -xspeed*bounce;
}
_y = _y+yspeed;
if (_y+_height/2>bottomedge) {
_y = bottomedge-_height/2;
yspeed = -yspeed*bounce;
}
if (_y-_height/2<topedge) {
_y = topedge+_height/2;
yspeed = -yspeed*bounce;
}
yspeed = yspeed*drag+gravity;
xspeed = xspeed*drag;
} else {
xspeed = _x-oldx;
yspeed = _y-oldy;
oldx = _x;
oldy = _y;
}
}




----------------------------------------------------------
Yön tuşlarıyla SÜRÜLEN HIZLANINCA SÜRÜKLENEN MOVİE CLİP
----------------------------------------------------------



onClipEvent (enterFrame) {
// sağ ve sol dönüş
if (Key.isDown(Key.RIGHT)) {
_rotation += 10;
}
if (Key.isDown(Key.LEFT)) {
_rotation -= 10;
}
//
//
if (Key.isDown(Key.UP)) {
// hız - dönüş ve yön hesap parmetreleri
xSpeed += thrust*Math.sin(_rotation*(Math.PI/180));
ySpeed += thrust*Math.cos(_rotation*(Math.PI/180));
flames._visible = 1;
}
if (Key.isDown(Key.DOWN)) {
// hız - dönüş ve yön hesap parametreleri
xSpeed -= thrust*Math.sin(_rotation*(Math.PI/180));
ySpeed -= thrust*Math.cos(_rotation*(Math.PI/180));
flames._visible = 1;
} else {
// yukarı ok tuşu ile ilgili ek parametreler
xSpeed *= decay;
ySpeed *= decay;
flames._visible = 0;
}
//
// hız limiti
speed = Math.sqrt((xSpeed*xSpeed)+(ySpeed*ySpeed));
if (speed>maxSpeed) {
xSpeed *= maxSpeed/speed;
ySpeed *= maxSpeed/speed;
}
//
// haraket hesapları
_y -= ySpeed;
_x += xSpeed;
//

}
onClipEvent (load) {
// hız hesapları
thrust = 1;
decay = .97;
maxSpeed = 10;
}





--------------------------------------------
Mouse doğru dönen movie clip
-----------------------------------------


onClipEvent(load){

X = this._x;
Y = this._y;

}
onClipEvent(mouseMove){

Xm = _root._xmouse;
Ym = _root._ymouse;

Xdiff = Xm - X;
Ydiff = -(Ym - Y);

radAngle = Math.atan(Ydiff/Xdiff);

if (Xdiff < 0){
corrFactor = 270;
}
else{
corrFactor = 90;
}

this._rotation = -radAngle*360/(2*Math.PI) + corrFactor;
updateAfterEvent();
}




------------------------------------------
sürükleyip bırakma
--------------------------------------------------

on (press) {
startDrag(getProperty(_x, _y));
}
on (release) {
stopDrag();
}








----------------------------------------------
mouse ı yatay düzlemde takip
------------------------------------------


onClipEvent (enterFrame) {
_x = _x+_xmouse/5;
}


-------------------------------------------------------
mouseyı bi hızlı bir yavaş takip
-----------------------------------------------


onClipEvent (enterFrame) {
_x = _x+_xmouse/50;
_y = _y+_ymouse/50;
}
 
Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol