• Home
  • Free Tutorials
  • Free Video Tutorials

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 World Style

Category : Flash Views : 48679
Version : 8 Rating : 
3.0/5 (61 votes)
  • Currently 3.00/5
  • 1
  • 2
  • 3
  • 4
  • 5
Type : Text Source File: xml-image-gallery-with-world-style.zip
Result: See the result


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

this._x -= difX * this._xscale / 100 this._y -= difY * this._yscale / 100
Move the MCs according with their scales so MCs that are smaller move slower and vise-versa.

if(this.hitTest(_root._xmouse, _root._ymouse, true)) {
Run this code if the mouse is over this MC.

this._xscale = this._yscale += (100 - this._xscale) / 15; this._rotation += (0 - this._rotation) / 5; this._alpha += (100 - this._alpha) / 5;
Ease the scale, rotation and alpha to their default values. Alpha and the rotation change faster than the scale because we only divide them by 5.
This is how the calculation for the easing effect works:
variable to ease += (end variable – current variable) / speed

The bigger the speed is the slower the easing will be and vise-versa.
this.swapDepths(_root.getNextHighestDepth());
Bring this MC to the top so the smaller ones don't appear over it.

} if(this._x < 0) { this._x += Stage.width; this._xscale = this._yscale = Math.random() * 5 + 2 this._rotation = Math.random() * 360; this._alpha = this._xscale * 20 } else if(this._x > Stage.width) { this._x -= Stage.width; this._xscale = this._yscale = Math.random() * 5 + 2 this._rotation = Math.random() * 360; this._alpha = this._xscale * 20 } if(this._y < 0) { this._y += Stage.height; this._xscale = this._yscale = Math.random() * 5 + 2 this._rotation = Math.random() * 360; t his._alpha = this._xscale * 20 } else if(this._y > Stage.height) { this._y -= Stage.height; this._xscale = this._yscale = Math.random() * 5 + 2 this._rotation = Math.random() * 360; this._alpha = this._xscale * 20 }
If this MC is off the screen in any direction we just put it on the other side of the screen and we get new values for the scale, rotation and alpha.

} _root.frames++
Increase variable that we use for unique names for the duplicates.

} target.removeMovieClip(); }
Remove the MC that we used to load the image as we don't need it anymore.


More cool tech articles from other blogs.

Place your ad here
Loading...


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

Sponsors





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

Copyright © 2007 NR Concepts Ltd. All rights reserved.