Scrolling Image Gallery

Category : Flash Views : 31033
Version : 8 Rating
3.1/5 (47 votes)
Type : Text Source File: scrolling-image-gallery.zip
Result: See the result


Previous | 1 | 2 | 3 | 4 | Next

Code Explanation

function showBig(obj, path) { point = new Object(); point.x = obj._x; point.y = obj._y; localToGlobal(point);
Translate the coordinates of the "obj" to global coordinates.

_root.attachMovie("big_image", "bigImg", 33, {_x: point.x, _y: point.y});
Attach the movie.
Inside the curly braces in the forth parameter you can set any property belonging to the Movie Clip you just attached, so I set the _x and _y coordinates there.

_root.bigImg.path = path;
Set the variable path inside the bigImg Movie Clip.

btn1.onRollOver = function() { //call function showBig(this, "1.jpg"); }
Call "showBig(obj, path)" when the user moves the mouse over the button.

That's all for Scrolling Image Gallery. Hope this tutorial will help you dig down more about Flash Actionscript and you will have more understanding about it. Happy coding!

del.icio.us digg it Reddit Stumble Upon Technorati

Previous | 1 | 2 | 3 | 4 | Next




Supporters

Reseller Web Hosting