Basic Tutorial
In the following tutorial we will go through the basic usage of the BJC Scroll Menu. Follow the steps for easy understanding of the component.
1. Open Flash MX2004 and create a blank file.
2. Drag the BJC Scroll Menu component from the components panel on your stage.
3. Set the frame rate to 20-30 fps for smooth effects.
4. Resize the menu. A higher menu may show more items simultaneously. The size of 150x100 px is fit for this example.
5. Set the Callback parameter to 'myCallback'. You can add the following code to the main timeline of your application:
function myCallback( index, link ) {
trace( "The item: " + index + "has been clicked. Item link: " + link ); // this code will run when the user clicks on a menu item
}
6. Set the Title parameter to 'My menu'.
7. Click on the Static titles parameter. In the dialog box add the titles 'Frame 2' and 'Flashloaded'.
8. Create a movieclip from a drawed box and set the Linkage id to 'myIcon'.
9. Click on the Static icons parameter. In the dialog box add the icons 'myIcon' and ''.
10. Click on the Static links parameter. In the dialog box add the links '$2' and 'http://www.flashloaded.com'.
11. Create a new font in the library by clicking on the menu icon on the right side of the library window. Select the font you want to use, and set the linkage id to Font1.
12. Set the Font parameter to Font1.
13. Set the text alignment and the component colors as you wish.
14. Test the menu by pressing Ctrl+Enter.
15. Play with the effect parameters for different results and test again. If you add plenty of items, you may scroll the menu by moving the mouse cursor up and down on the menu.