|

Trying It Out

Now that we have everything set up the way we want, let's see some scrolling text in action.To set the object's background color, double-click on the BackgroundColor setting, type #5987c0, and press Enter.Experiment with these settings to see some of the different control configurations you can come up with.If you'd rather just set the object's position directly, set Left to 268, and Top to 93.Note that the video starts playing automatically as soon as the page is shown. This is because the video object's AutoStart setting is set to "True." (The same thing will happen each time the users navigate to this page in the full application.)Once you've gotten rid of the old action, you can click the Add Action button to add a new Video.Play action in its place. (When the New Action wizard appears, select the Video category, then select the Video.Play action, and then click Next to advance to the wizard's second page where you can customize the action.)As you type the first few letters of the word "Video" into the script editor, a black tooltip will appear nearby with the word "Video" on it. This is the script editor's autocomplete feature at work. Whenever you type something that the script editor recognizes as a keyword, it will display its best guess at what you are typing in one of those little black tooltips.Once you've typed something that the script editor recognizes as the name of an action, a little bit of Quick Help appears near the bottom of the window.Once you've typed that text onto the script editor, you can click OK to confirm the changes that you've made to the object's On Click event.Ogg Vorbis files end in .ogg.Once a song has been added, you can change its position or remove it by using the buttons beneath the list.The On Show event is triggered whenever the page opens. The background music will still be playing when the user leaves Page1, so this action should pause the music when the user arrives at the Video page.Setting PlayAutomatic to true tells the action to begin playing the file automatically as soon as it's loaded. Since we don't know how long the user will remain on this page, we want the file to keep playing in the background until the page closes. This means that we need the file to loop when it reaches the end, so make sure Loop is set to true as well.Once you select an audio file, AutoPlay will copy it to your project's Audio folder and put the appropriate path into the Filename parameter for you. It also automatically escapes all of the backslashes in the path.We need the Audio.Stop action to stop playing the song that we loaded with the Audio.Load action on the On Show event. We need the Audio.Play action to start playing the "normal" background music that we paused with the Audio.Pause action on the On Show event. The whole progression will go something like this:You can also select an output folder by clicking the browse button.The Progress Window settings on this dialog let you configure the small popup "Loading"Your AutoPlay application should start up automatically. (If it doesn't, then the autorun feature is disabled on your computer. You will need to either re-enable it, or open the CD in My Computer and then double-click on the autorun.exe file yourself.)

|