|

· Lock objects (so they stay out of your way)


L ess o n 4 : B u tt o n s , Ac t i o n s a n d P a g es

This lesson is all about interactivity. Interactivity is important-it lifts your AutoPlay application above the limitations of mere pamphlets and traditional business cards that dwell in the lowly realm of paper. Interactivity makes your application seem alive and responsive, and lets it actually perform important tasks for the user, just like any other Windows program.Now let's change the text to something that better describes what this button does. (Or in this case, what the buttons going to do, once we add an action to it later in this lesson.)To change the text that is displayed on the button object, highlight the contents of the Text setting and type the new text in. (In this case type in the words Ted Sellers Online.)When you're done typing the new text in, press Enter.(Later in this lesson, well add an action to this button to make it open Teds website.)Double-click on the Buttons folder in the Project pane. This will show you a list of all the buttonWhen you click on the 0001-windows-7.btn file on the Project pane, a fully working preview of the button appears on the Preview pane. (If the Preview pane isn't visible, use the View > Panes > Resource Preview menu item to toggle it back on.)Move the mouse over the button in the preview area. See how it changes its appearance slightly? This is the buttons highlight state. (Buttons become highlighted when you move the mouse overTo add the button to the page, just drag the 0001-windows-7.btn file from the Project pane onto the page. A new button object will be placed at the spot where you drop the file. Move the new button object to just below the first one.To change the font family, just click on the Family setting, click the select button, and select Arial from the list.As you've probably guessed, this button will be used to exit the application.These places generally correspond to the events that the object can detect and that you can respond to. (The lone exception is the Quick Action, which is essentially a simpler version of the On Click event.)Right now, all six items have -- None -- next to them, which indicates that no actions will be performed when these events are triggered for this object.When you click the edit button in the properties pane, you're automatically taken to the corresponding tab on the script editor. For instance, since you clicked the edit button for the On Click setting, the script editor opened directly to the On Click tab. If you had clicked on the On Leave setting instead, and then clicked the edit button, the script editor would have opened to the On Leave tab.You can click on this blue text to get more information about the action from the online help. (GoThe other parameter, WindowMode, lets you specify how the users default web browser should open up - either normally, minimized, or maximized. Its set to SW_SHOWNORMAL by default, which is fine for our purposes.Once you've set the actions parameters, click Finish to close the New Action wizard. The File.OpenURL action will appear in the list on the script editor. Note that the parameters youHeres how its going to work: on Page1, were going to make the About Ted Sellers button (Button2) jump to the page named About Ted, and the Video Presentation button (Button3) jump to the page named Video.Since button objects can respond to five different events, there are five tabs on the script editor (or, depending on how you want to look at it, five tabs on the Script tab). Clicking on the On Click tab displays the action script for the objects On Click event, which at the moment is empty.Finally, click OK to finish editing the action, and then click OK to close the script editor andThat's it for this page. You don't even have to adjust the objects Page.Jump action, since its already configured to go to Page1, which is what we want the Back button on this page to do as well.When the application appears, try clicking on the About Ted Sellers button. The application jumps to the About Ted page, with the lonely little Back button on the left. Click on the Back button, and you're instantly taken back to Page1.Once you've changed the Cursor setting, click Ok to close the Properties dialog.· Match the width and height of several objects at onceAnother quick way to delete the text is to double-click on the object and switch to the Settings tab. (Double-clicking on the object opens the Paragraph Properties dialog and automatically highlights all of the text in the Text field for you.) Then press Delete to erase the highlighted text, and click OK to confirm the change and close the dialog.A quick way to add the Paragraph.SetText action is to click the Add Action button, and then type the letters par on the keyboard. As you type in these letters, the category drop-down will skip ahead to the first category that matches what you typed. Once the Paragraph category is shown, click on the Paragraph.SetText action in the list, and click Next to advance to the second page of the New Action wizard.When you move the mouse off the button, the text remains. This is because there's nothing telling AutoPlay to change the text when the mouse moves off the object.Use an empty string ("") for all of the On Leave events.Once you have the whole line selected, press Ctrl+X to cut the text. It will be removed from the script editor, and placed in the Windows clipboard.To paste the action, just click on the On Preload tab, and then press Ctrl+V. The text will be copied from the Windows clipboard and inserted into the script editor.That's it! Job well done.The Gallery pane lets you browse the library of files that came with AutoPlay. This library is organized into different sections, each one accessible with a button at the top of the pane. Clicking on the Images button at the top of the pane displays the gallery's image collection.This kind of image file containing different interface parts is usually referred to as a skin file.

|