|

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.)


The Video.Play action takes a single parameter, called ObjectName, which tells the action which video object to play. Since there is only one video object on the page, the ObjectName parameter should already be set to "Video1" for you.


image


Once you have the action configured, click Finish to add it to the script. Then click OK to close the script editor and accept these changes that you've made to the object's On Click event.


Tip: Since actions are just text, you could also add this action by typing Video.Play("Video1");

directly into the script editor.


image

4 ) D oubl e - c li ck on t h e P AU SE bu tt on, a nd c li ck on t h e S cr ip t t a b.

AutoPlay actually remembers the tab that you were on the last time you double-clicked on an object, but it does so on a per-object basis. When you double-click on an object for the first time (like this PAUSE button), it always defaults to showing you the Settings tab.


Once you've visited another tab on the Properties dialog for any particular object, though, the next time you double-click on that object you'll be taken right to that tab.


Of course, that doesn't help us when we're double-clicking on a "fresh" object like the PAUSE button. Since this particular object hasn't been double-clicked before, you still need to click on the Script tab to switch to the PAUSE button's script editor.


5 ) I n t h e s cr ip t e di t o r , c li ck on t h e On C li ck t a b, a nd re pl ace t h e P a g e . J u m p ac t ion wi t h a V id e o. P a u s e ac t ion. S e t t h e Obj ec t Name p arame t er t o " V id e o 1 " .

This object also has a Page.Jump action on its On Click event. Once again, simply delete the existing action's text, and then click the Add Action button to insert a Video.Pause action in its place.


6 ) D oubl e - c li ck on t h e S TO P bu tt on, a nd c li ck on t h e S cr ip t t a b. I n t h e s cr ip t e di t o r , c li ck on t h e On C li ck t a b, a nd d e l e t e t h e ex i s t ing

ac t ion ' s t ex t . Th e n t y p e :


V id e o. St op ("V id e o 1 " ) ;


...in t o t h e s cr ip t e di t o r , r igh t wh ere t h e old ac t ion u s e d t o b e .

Since actions are just text, you can also add an action by typing it directly into the script editor.


image

Note: This is what most people generally think of as "programming," but it really isn't that difficult. In fact, as you're about to see, AutoPlay makes programming a lot easier than you might think.


|