Evo jednog od mogucih resenja...
Moras da pokupis _x i _y od duplikata na pocetku u var koja je na _level0,
jer se onda nece menjati tweenom.
Code:
// make the original invisible first so it wont get in the way
this.kvadrat._visible = false
for(i=0; i<5; i++) {
duplicateMovieClip(kvadrat, "kvadrat"+i, i)
// make the copy visible
this["kvadrat"+i]._visible = true
this["kvadrat"+i]._x = i*55;
// add the id to the duplicate, you will need it later
this["kvadrat"+i].id = i
// put the x and y of the duplicate in the _level0 var
// you will use this to anchor the duplicate to its original position
_level0["origXPos"+i] = this["kvadrat"+i]._x
_level0["origYPos"+i] = this["kvadrat"+i]._y
this["kvadrat"+i].onRollOver = function() {
XPOS = this._x;
YPOS = this._y;
WPOS = this._width;
HPOS = this._height;
var easeType = mx.transitions.easing.Regular.easeOut;
var kraj = 200;
var vreme = .4;
Tween_xscale = new mx.transitions.Tween(this, "_xscale", easeType, this._xscale, kraj, vreme, true);
Tween_yscale = new mx.transitions.Tween(this, "_yscale", easeType, this._yscale, kraj, vreme, true);
var krajX = XPOS-WPOS/2;
var vreme = .4;
Tween_x = new mx.transitions.Tween(this, "_x", easeType, this._x, krajX, vreme, true);
var krajY = YPOS-HPOS/2;
Tween_y = new mx.transitions.Tween(this, "_y", easeType, this._y, krajY, vreme, true);
}
this["kvadrat"+i].onRollOut = function() {
var easeType = mx.transitions.easing.Regular.easeOut;
var kraj = 100;
var vreme = .4;
Tween_xscale = new mx.transitions.Tween(this, "_xscale", easeType, this._xscale, kraj, vreme, true);
Tween_yscale = new mx.transitions.Tween(this, "_yscale", easeType, this._yscale, kraj, vreme, true);
// use the _level0 x and y vars for this copy to set the ending position of the duplicate
// _level0["origXPos"+this.id]
var vreme = .4;
Tween_x = new mx.transitions.Tween(this, "_x", easeType, this._x, _level0["origXPos"+this.id], vreme, true);
Tween_y = new mx.transitions.Tween(this, "_y", easeType, this._y, _level0["origYPos"+this.id], vreme, true);
}
}
[Ovu poruku je menjao Vranac dana 14.04.2006. u 09:13 GMT+1]
Idle mind is the devils playground, in my case it turned out to be an amusement park.
Sustina problema ove zemlje:
Legeonar_: Sto pre treba da shvatite da je EU propast i da se tamo mora raditi,a ne samo biti zaposlen.
http://www.elitemadzone.org/p1864861
Nobody Remains Virgin, Life Fucks Everyone