import mx.transitions.Tween;
import mx.transitions.easing.*;
import mx.utils.Delegate;
var startposx:Number = boekenkast_mc._x;
var startposy:Number = boekenkast_mc._y;
var startscale:Number = boekenkast_mc._xscale;
var startscale:Number = boekenkast_mc._yscale;
// RollOver plaatje naar nwe plek
boekenkast_mc.onRollOver= function() {
new Tween(this, "_x", Regular.easeIn, this._x, 100, 20);
new Tween(this, "_y", Regular.easeIn, this._y, 150, 20);
new Tween(this, "_xscale", Regular.easeIn, this._xscale, 325, 20);
new Tween(this, "_yscale", Regular.easeIn, this._yscale, 50, 20);
this.enabled=false;
boekenkast_mc.onMotionFinished = Delegate.create(boekenkast_mc ,doRollOut);
}
function doRollOut()
{
boekenkast_mc.enabled=true;
};
//-------------- RollOut plaatje terug naar oude plek
boekenkast_mc.onRollOut = boekenkast_mc.onReleaseOutside=function () {
new Tween(this, "_x", Regular.easeOut, this._x, startpos_inv_x, 20);
new Tween(this, "_y", Regular.easeOut, this._y, startpos_inv_y, 20);
new Tween(this, "_xscale", Regular.easeOut, this._xscale, startscale_inv, 20);
new Tween(this, "_yscale", Regular.easeOut, this._yscale, startscale_inv, 20);
};
|