import mx.transitions.Tween; import mx.transitions.easing.*; String.prototype.replace = function(searchStr, replaceStr):String { var arr:Array = this.split(searchStr); return arr.join(replaceStr); }; ASSetPropFlags(String.prototype, "replace", 1); //GENEL TANIMLAMALAR var Genislik = 106; var Yukseklik = 92; var Opacity = 30; var OpacitySon = 100; var y0 = y0; // TIKLANINCA GELEN ORTADAKİ DETAY FOTOĞRAFININ BOYUTUNU var BuyukHalw = 286; var BuyukHalh = 288; var Ortax = 345; var Ortay = -35; var currMC = null; class ProductMC extends MovieClip { function ProductMC(x,y,a){ super(); this._alpha = a; this._x = x; this._y = y; this.tweenX = new Tween(this, "_x", Regular.easeIn, this._x, Ortax, 1, true); this.tweenY = new Tween(this, "_y", Regular.easeIn, this._y, Ortay, 1, true); this.tweenSX = new Tween(this, "_xscale", Regular.easeIn, Genislik, BuyukHalw, 1, true); this.tweenSY = new Tween(this, "_yscale", Regular.easeIn, Yukseklik, BuyukHalh, 1, true); this.tweenA = new Tween(this, "_alpha", Regular.easeIn, Opacity, OpacitySon, 1, true); this.tweenA.onMotionStopped = this.onReached; } function onRelease(){ if(currMC != this){ currMC.goBack(); currMC = this; this.tweenX.start(); this.tweenY.start(); this.tweenSX.start(); this.tweenSY.start(); this.tweenA.start(); } } function onReach(){ } function goBack(){ this.tweenX.rewind(); this.tweenY.rewind(); this.tweenSX.rewind(); this.tweenSY.rewind(); this.tweenA.rewind(); } } /* Tanımlı ürün movicliplerimiz urun1,urun2,urun3,urun4,urun5,urun6, */ // BOYUT TANIMLAMASI ve BAŞLANGIÇ ALPHA TANIMLAMASI YAPALIM var p1 = new ProductMC(urun1, 4, y0); var p2 = new ProductMC(urun2, 119, y0); var p3 = new ProductMC(urun3, 229, y0); var p4 = new ProductMC(urun4,660, y0); var p5 = new ProductMC(urun5, 769, y0); var p6 = new ProductMC(urun6, 881, y0);