Scrolling Image Gallery - Page 4
Posted by : webzo on Mar 12, 2008
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!

no comment
Add comment