Webmaster

Flash : Creating a dialog box
Contents ]
David Einhorn

Creating the Window

Our movie is made up of four elements: a button for the Drag & Drop, another one for opening the window, a third for closing it, and, finally, the window body, a graphic element used as the display area for your information.

Let's take a look at the creation of these different elements, which concerns regular drawing with the help of Flash. Once your components are finished, store them in your movie library.



Figure 1: The four graphic elements in our window

We will now put the four objects we have just created into one interface. By combining the features of each object in a single element, we will be able to apply the Drag & Drop function to the whole window and not just to one object.

Do the following:

  1. Double-click on the window symbol in your Library.

  2. You should now see the grey rectangle displayed on the stage.

  3. Drag the Drag & Drop button and the Close button from the Library onto the stage.

  4. Position these two buttons so that they are exactly at the top of the grey rectangle. They will enable you to reproduce an operating system window redraw action.

  5. Have the Open button ready; we will be using it shortly.



    Figure 2: You should now see something that looks like this

That's it. The graphic elements are ready. Now we just need to incorporate some interactivity.



1   2   3   4