//Niet werkend
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);
};
///Werkend
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;
boekenkast_mc.onPressClick = function() {
boekenkast_mc.enabled = false;
var xTween:Tween = new Tween(boekenkast_mc, "_x", Regular.easeIn, boekenkast_mc._x, 300, 20);
new Tween(boekenkast_mc, "_y", Regular.easeIn, boekenkast_mc._y, 300, 20);
new Tween(boekenkast_mc, "_xscale", Regular.easeIn, boekenkast_mc._xscale, 150, 20);
new Tween(boekenkast_mc, "_yscale", Regular.easeIn, boekenkast_mc._yscale, 150, 20);
xTween.onMotionFinished = function (){
boekenkast_mc.enabled = true;
}
};
boekenkast_mc.onRollOverClick = function() {
new Tween(boekenkast_mc, "_x", Regular.easeOut, boekenkast_mc._x, startposx, 20);
new Tween(boekenkast_mc, "_y", Regular.easeOut, boekenkast_mc._y, startposy, 20);
new Tween(boekenkast_mc, "_xscale", Regular.easeOut, boekenkast_mc._xscale, startscale, 20);
new Tween(boekenkast_mc, "_yscale", Regular.easeOut, boekenkast_mc._yscale, startscale, 20);
};
boekenkast_mc.onPress = Delegate.create(boekenkast_mc, boekenkast_mc.onPressClick);
boekenkast_mc.onRollOut = Delegate.create(boekenkast_mc, boekenkast_mc.onRollOverClick);