Categories

Partners
  • Website Templates

  • Design Feeds

  • Adobe Photoshop Tutorials

  • Website Templates, WordPress Themes

  • Website Templates

  • Flash Web Sites

  • Photoshop Templates

  • Photo Contests

  • Photo Tips
  • Search


    Advanced Search


    Partner Links
  • Adobe Photoshop Tutorials

  • Free Stock Photos and Images



  • Website Templates

    Playing the Movie from the TOC Page
    Published  06/19/2006 | Macromedia RoboHelp Office
       




    Playing the Movie from the TOC Page

    While you cannot insert a call to a custom JavaScript function in the TOC page itself (because the HTML Help viewer, which is based on a specialized subset of the Internet Explorer browser, has no way of loading an external JavaScript file), you can accomplish the same result using one of two different methods:

    • Link the TOC page to a topic that contains an onLoad event handler that calls your custom JavaScript function for opening a window and displaying the HTML file containing the SWF code. The window that is displayed when this topic is viewed shows an HTML file and SWF movie that are both compiled into the CHM file through their inclusion in the RoboHelp HTML Baggage Files folder. The JavaScript window.open() function is the same one used in the above section on playing the movie in a custom window. Here is an example of how such an "onLoad" event handler would look:
      <body onLoad="javascript:showSwf2('notepad.html')">  
    • Link the TOC page to a line of JavaScript code that calls the native JavaScript method window.open(), which takes three parameters: the name of the HTML file to be shown in the new window, the name of the new window (optional), and attributes for the window (dimensions, position, scrollbar, status bar, toolbar, and so on). The following snippet provides an example of the type of code you can enter in the Link to text box of the TOC Page Properties dialog box (Figure 2) to open a new window and display a RoboDemo movie in its accompanying HTML page directly from a mouse click:
      javascript:window.open('notepad.html','', 'width=320, height=276')  

      The TOC Page Properties dialog box

      Figure 2: The TOC Page Properties dialog box

    The only strange thing about this way of directly linking a movie to a TOC page is that the topic pane displays a blank "topic" that consists only of the word "[object]". As a workaround, you can specify "left" and "top" values for the new window that will place it above the topic pane, which only works as long as the user does not drag the HTML Help window to a different spot on the desktop. While this is admittedly a bit unusual, I include this method here as a way of illustrating how inventive one can be with HTML Help.

    Article Series
    This article is part 7 of a 8 part series. Other articles in this series are shown below:
    1. Incorporating RoboDemo Movies into Online Help with RoboHelp
    2. Why Use RoboDemo Flash Movies in Help Files?
    3. Including a RoboDemo Movie in a Topic
    4. Importing the RoboDemo SWF and HTML File as a Topic
    5. Playing the Movie as an EXE
    6. Playing the Movie in a Custom Window
    7. Playing the Movie from the TOC Page
    8. Conclusion