XML Image Gallery with Falling Pictures (Snow Effect)
| Category | : Flash | Views | : 37218 | ||
| Version | : 8 | Rating | : | ||
| Type | : Text | Source File | : xml-image-gallery-with-falling-pictures.zip | ||
| Result | : See the result | ||||
onClipEvent(mouseDown)
{
if ((this.hitTest(_root._xmouse, _root._ymouse, true)) && (!select))
{
If the MC is not selected and the mouse is over it when this event happens we run the code below.
this.swapDepths(_root.getNextHighestDepth());
Bring this MC to the top so we don't have the smaller ones in front of it.
select = true;
Now the MC is selected so set this variable to true.
xTw = new Tween(this, "_x", Regular.easeIn, this._x, 400, 2, true);
yTw = new Tween(this, "_y", Regular.easeIn, this._y, 250, 2, true);
xSTw = new Tween(this, "_xscale", Regular.easeIn, this._xscale, 100, 2, true);
ySTw = new Tween(this, "_yscale", Regular.easeIn, this._yscale, 100, 2, true);
alphaTw = new Tween(this, "_alpha", Regular.easeIn, this._alpha, 100, 2, true);
rotTw = new Tween(this, "_rotation", Regular.easeIn, this._rotation, 0, 1, true);
Create Tween objects for each property we need to animate: _x, _y, _xscale, _yscale, _alpha and _rotation.Parameters for the Tween object:
Tween(object, "property", easing effect, start value, end value, second or frames, true=seconds| false=frames);
} else if ((select) && (!(this.hitTest(_root._xmouse, _root._ymouse, true)))) {
Run this code instead if the MC is selected and the mouse is not clicking on it.
select = false;
The MC is not selected anymore.
xTw.yoyo();
yTw.yoyo();
xSTw.yoyo();
ySTw.yoyo();
alphaTw.yoyo();
rotTw.yoyo();
}
}
Call the function "yoyo()" of each Tween object to return this MC to its original properties.
![]() |
![]() |
![]() |
![]() |
![]() |






