Thursday

Flash Tutorial - Scrolling Image Gallery

Here are step by step instructions on how to create an image gallery's scrolling button bar in Flash.


*Don't forget to save your file after every so often so you don't lose any information.


Photo Gallery Instructions
-create rectangle frame or desired background for scrollbar
-make it a movie clip and write down its name (case sensitive)
-in properties panel click "export for actionscript"



-enter editing mode for the rectangle movie clip
-put image buttons on rectangle with desired actionscript
- extend the rectangle as far over from the registration point as the buttons need a background (make a note of the size)


-make rollovers for buttons in up, over, and down states
-exit editing mode
-delete movie clip from stage
-drag scrollpane component onto stage from components panel on right-hand toolbar.



-give it a unique instance name


-define its size with this action script:

scrollPane.setSize(x,y)

where "scrollPane" is the unique instance name, and (x,y) values are for width and height

-Define source with this actionscript:

scrollPane.source=content_mc

where "scrollPane" is the unique instance name for the scrollbar, and "content_mc" is the movie clip you wish to be contained within the scrollpane at runtime.

*Do not apply this AS to the ScrollPane itself, but to the layer it is on; same for actionscript for the buttons.

Actionscript for buttons is as follows:

function gotoframeLabel(e:MouseEvent):void{
MovieClip(root).gotoAndStop(60);
}

btn_frameLabel.addEventListener (MouseEvent.CLICK,gotoframeLabel);

where "frameLabel" is a frame label in the main timeline, "60" is the frame number, and "btn_funkLogo" is the button's instance name which corresponds to its frame label.

Your full size images for the gallery must be on the main timeline for this to work.

Hope this tutorial works for you!

No comments:

Post a Comment