If it is not already visible, open the Property inspector (Window > Properties).From the Library panel, drag an instance of the item named Button to the lower-right area of the Stage.If it is not already visible, open the Library panel (Window > Library).With the lesson01_start.fla file open and the Stage and Timeline visible, select the first frame in the buttons layer.
To see how code snippets work, you will add some code that will link to the Flash support page at when a button is clicked. After the code snippet is placed in the Actions panel, it is fully editable, allowing you to customize and modify that code. When you add a code snippet to your project, the code snippet is written in the Actions panel, saving you the trouble of typing it yourself. The Code Snippets panel is found on the Window menu in Flash CS5. Adding a code snippet to navigate to a URL Code snippets provide a wonderful way to begin working with ActionScript and can be very useful for increasing the range of tasks that you can accomplish. Code snippets, as their name implies, are prebuilt chunks of ActionScript 3.0 code that can easily be added to your projects and modified to suit your purposes. In addition to typing code directly in the Actions panel, you can add code to this panel using the new Code Snippets panel.
Later, you will see that you can also write ActionScript in external ActionScript files, but for now, you will create code exclusively in the Actions panel.