HOWTO: Create a Project Template

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Support
    Forum Member
    • Jan 2000
    • 204

    HOWTO: Create a Project Template

    HOWTO: Create a Project Template

    HOWTO: Create a Project Template

    Document ID: IR04039
    The information in this article applies to:
    • AutoPlay Media Studio 4.0

    SUMMARY

    This article explains how to create a project template for AutoPlay Media Studio 4.0.

    DISCUSSION

    Creating a project template that displays in AutoPlay Media Studio's Start Project dialog is an easy process that involves seven steps. The seven steps are as follows:

    1. Create Your Project

      The first step is to design the AutoPlay project that you wish to use as your project template. Create this project as you would any other AutoPlay project.

    2. Create Your Zip Archive

      Once you have created your AutoPlay project, the next step is to create a ZIP archive of your project. This option can be found in the menu under: Tools | Create Zip Archive, selecting this will bring up the Export Project to Zip Archive dialog. You must save your project before you can create a Zip archive.

      Press the Browse button to bring up a Save As dialog. In this dialog browse to the ...\AutoPlay Media Studio 4.0\Addins\Project Wizards\ directory and press the Create New Folder button to create a new folder in this directory. Name the new folder the same name that you will use for your project template. In this article we will call our project template "MyProjectTemplate" so we will name the new folder "MyProjectTemplate".

      Now browse into the folder that you have just created and type the name that you want to use for your Zip archive in the File name field. For this example you would type: "MyProjectTemplate.Zip" and press the Save button. This will bring you back to the Export Project to Zip Archive dialog.

      The Archive filename will read as follows: ...\AutoPlay Media Studio 4.0\Addins\Project Wizards\MyProjectTemplate\MyProjectTemplate.Zip. Generally the External reference checkbox should be checked and the Distribution folder checkbox should be unchecked, however this is not a hard and fast rule. These two checkboxes control which files are included in your Zip archive. Once everything is setup properly press the Create button to create your Zip archive.

    3. Create Your Icon

      Create an icon for your project template that will represent it in the Projects list on the Start Project dialog. This is an optional step and is not necessary when creating a project template. If you do decide to create an icon, save it in the same directory you created your Zip Archive in. Save your icon using the same name as your Zip archive. So in this example we would save our icon as "MyProjectTemplate.ico".

    4. Create a Screenshot

      The next step is to create a screenshot of your project template while it is running. The screenshot is an optional step and will usually only be used for visual display in the Description area of the Start Project dialog. If you do decide to create a screenshot, save it in the same directory that you created your Zip archive in. You should also save your screen shot using the same name as your Zip archive. So in this example we would save our screen shot as: "MyProjectTemplate.jpg".

    5. Create an HTML Description File

      Step five is the creation of an HTML description file for your project template, this step is also optional. The HTML file that we will create will provide description information that will appear in the Description field on the Start Project dialog. This information is for the users of your project template only.

      Use the HTML description files for the other project templates as a base for the HTML file that you create. To do this, simply copy the "Blank.HTML" file from: ...\AutoPlay Media Studio 4.0\Addins\Project Wizards\blank_project\ to the directory that you created your Zip archive in. Now rename the file so that it has the same name as your Zip Archive. In this example our HTML description file would have the following path: ...\AutoPlay Media Studio 4.0\Addins\Project Wizards\MyProjectTemplate\MyProjectTemplate.HTML

      Here is an example of what the HTML file might look like:

      < body bgcolor="#FFFFFF" >




      < font size="1" face="Verdana, Arial, Helvetica, sans-serif" >




      < img src="MyProjectTemplate.jpg" >




      < p >

      < b > MyProjectTemplate (640x480)< /b >

      < br > This is a description of my project template.

      < /p >

      < /font >

      < /body >
    6. Create a Project Template Basic File

      In this step we will create a project template basic file that will tell AutoPlay Media Studio 4.0 what do when a user selects our project file. To do this we will have to use the Macro editor in AutoPlay Media Studio.

      First open the Macro editor from the menu under: Tools | Macros. Once the Macro editor has loaded, open one of the project template basic files that ship with AutoPlay Media Studio 4.0. In this example we will open the file: ...\AutoPlay Media Studio 4.0\Addins\Project Wizards\flash_text_browser_shiny\flash_text_browse r_shiny.bas.

      Once you have opened "flash_text_browser_shiny.bas" select File | Save As from the menu and save the file in the directory that you created your Zip archive in. Give it the same name that you gave your Zip archive. In this example, the file would have the following full path: ...\AutoPlay Media Studio 4.0\Addins\Project Wizards\MyProjectTemplate\MyProjectTemplate.bas

      Now edit the bas file so that it refers to your project template. According to the current example this is what the bas file would look like:

      Sub Main

      'strDocName is the full path to the currently loaded project.
      Dim strProjectFile As String
      strProjectFile = DocumentName


      'strTemplateDir is the path to the Project Wizard Template Folder
      'Default is C:\Program Files\AutoPlay Media Studio 4.0\Addins\Project Wizards
      Dim strTemplateDir As String
      strTemplateDir = GetProjectTemplatesFolder()

      'strZipFile is the full path to the Project Template
      Dim strZipFile As String
      strZipFile = strTemplateDir + "\MyProjectTemplate\MyProjectTemplate.Zip"

      'ImportProjectFile(strProjectFile, strZipFile, strInternalProjName) takes three Parameters
      'strProjectFile = The full path to the currently loaded Project
      'strZipFile = The full path to the Project Template Zip file
      'strInternalProjName = The name of the AutoPlay project file contained in the Project Template Zip file
      'If strInternalProjName is an empty string, the function will default to using the same name as strZipFile
      ImportProjectFile(strProjectFile, strZipFile, "MyProjectTemplate.am4")
      End Sub
    7. Create an XML Description File

      Step seven is the creation of your XML description file. In step five we created an HTML description file that provided information to anyone who might want to select our project template. The XML description file does the same thing except it provides information to AutoPlay Media Studio 4.0. Our XML description file will tell AutoPlay Media Studio 4.0 that our project template exists, where it exists, where its icon is located, and more.

      The easiest way to create your XML description file is to use the XML description files that are used for the project templates that ship with AutoPlay Media Studio 4.0. To do this make a copy "blank_project.xml" from ...\AutoPlay Media Studio 4.0\Addins\Project Wizards\ and save it in the same directory. Now rename the file so that its name matches the name of your Zip Archive. In our example we would end up with an XML description file with the following full path: ...\AutoPlay Media Studio 4.0\Addins\Project Wizards\MyProjectTemplate.xml

      Here is an example of what the XML file might look like:

      < AMSProjectWizard >
      < Name > MyProjectTemplate < /Name >
      < CreatedBy > Indigo Rose Corporation < /CreatedBy >
      < Description format="HTMLFile">MyProjectTemplate\MyProjectTemplate.HTML < /Description >
      < File > MyProjectTemplate\MyProjectTemplate.bas < /File >
      < IconFile > MyProjectTemplate\MyProjectTemplate.HTML < /IconFile >
      < InAllCategories > 0 < /InAllCategories >
      < Categories >
      < Category > MyCategory < /Category >
      < /Categories >
      < /AMSProjectWizard >

    Note: Indigo Rose Software has a Template builder available for download: http://www.indigorose.com/ubbthreads/uploads/13502-TBuilder.exe

    MORE INFORMATION

    For more information please see the following topics in the AutoPlay Media Studio 4.0 help document:

  • Command Reference | Program Menus | Tools menu
  • Command Reference | Start Project Dialog
  • More information on the Macro support can be found in the .../AutoPlay Media Studio 4.0/AMS40COM.chm help file.

    KEYWORDS: AutoPlay Media Studio 4.0, Project Template


    Last reviewed: November 1, 2002
    Copyright © 2002 Indigo Rose Corporation. All rights reserved.
Working...
X