• Home
  • Free Tutorials
  • Free Video Tutorials
Your Ad Here
Adobe Photoshop
Autodesk 3ds Max
CSS
Flash
Help Center Live
iPhone
Joomla
Make Money Online!
Mambo
mIRC
Outlook Express
SEO / SEM
Simple Machine Forum
Target Explorer

XML Image Gallery with Falling Pictures (Snow Effect)

Category : Flash Views : 37218
Version : 8 Rating : 
3.7/5 (64 votes)
  • Currently 3.73/5
  • 1
  • 2
  • 3
  • 4
  • 5
Type : Text Source File: xml-image-gallery-with-falling-pictures.zip
Result: See the result


Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Next

listener.onLoadInit = function(target) {
onClipEvent(load) { import mx.transitions.Tween; import mx.transitions.easing.*;
The Tween library is needed for the animation, and the easing for the movement of the animation.

function reset() {
We created a function for this because we will reuse the code inside when the MC needs new properties.

this._xscale = this._yscale = Math.random() * 6 + 3; this._alpha = Math.random() * 50 + 50; this._rotation = Math.random() * 360;
Get random values for the scale, alpha and rotation of the MC.

this._y = Math.random() * 100 - 200; this._x = Math.random() * Stage.width;
Get a random position for the MC.

yspeed = (Math.random() * 5 + 2); xspeed = (Math.random() * 4 + 1) * _root.dir; select = false; }
Get random speeds, the variable "dir" determinates whether the MC will go left or right.
Set the variable "select" to false.

reset(); }
Call the function "reset()"

onClipEvent(enterFrame) { if ((!select) && (_root.ready)) { this._x += xspeed; this._y += yspeed;
Move the MC if it's not selected and the images are loaded.

} if(this._y > Stage.height) { reset(); } if(this._x < -50) { reset(); } if(this._x > Stage.width + 50) { reset(); } }
If the MC leaves the screen in any direction we call "reset()" to make the MC fall again.


del.icio.us digg it Reddit Stumble Upon Technorati

Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Next
How to Video Tutorials on software by Helpvids.com

Video tutorial: Forex trading



Sponsors



Advertisement







Your Ad Here

Studio | Advertisement | About Webzo | Contact Webzo | Terms of Use | Free Video Tutorials by Helpivds

Copyright © 2007 NR Concepts Ltd. All rights reserved.