NOTE: This Technical Note has been
retired. Please see the Technical Notes
page for current documentation.|
In the Apple Media Tool, vertical and horizontal scrollbars can be added to picture media, vertical scrollbars can be added to text media, and (horizontal) movie controllers can be added to QuickTime media. (Since the various controllers share much of the same behavior, the rest of this Note uses the term scroller for movie controllers and horizontal and vertical scroll bars).
Developers often will want to add a custom scroller to their title. Adding a custom scroller to an AMT 1.2 title is documented in Appendix A of the Apple Media Tool Programming Environment User's Guide .
For AMT 2.0 (and greater) titles, the instructions to add a scroller as described in Appendix A of the Apple Media Tool Programming Environment User's Guide have changed (though all the information describing scroller graphic images and scroller parts is still valid). For example, the 'KVSD', 'KHSD' and 'KHCD' resources are no longer created for each scroller. Because of the changes made to AMT 2.0, there are new ways to add a scroller. This Note describes new techniques for adding scrollers to AMT 2.0 titles.
Defining A Scroller
Each scroller is defined by:
The following is a description of each of these scrollers:
Scroller Graphic Image
Each scroller's graphic image is stored as a 'PICT' resource. This graphic consists of adjacent drawings of the normal and highlighted versions of the scroller (see Figure 1. To view any of the scroller resources you need to use a resource-editing application such as ResEdit.
Scroller Format Information
Each scroller consists of different parts: for example, a scroll bar consists of four parts: a left arrow: the body of the scroll bar; a right arrow; and a thumb or scroll box. Each part also has a size and location within the scroller:
The format information for each scroller specifies the separation point between the normal and highlighted images and the location of all the scroller's parts. The format information for a scroll bar is stored by the AMT as an object of class cScrollBar (see the Apple Media Tool Programming Envirnoment 2.0 Reference pg. 4-40 for a description of the cScrollBar class). In addition, this information can be found in Appendix A of the Apple Media Tool Programming Environment User's Guide .
Format information for movie controller scrollers is stored by the AMT as an object of class cControlBar (see the Apple Media Tool Programming Envirnoment 2.0 Reference pg. 4-31 for a description of the cControlBar class). In addition, this information can be found in Appendix A of the Apple Media Tool Programming Environment User's Guide .
As an example, here is the AMT default definition for the "Funny" horizontal scrollbar object referenced on pg 5-180 of the AMTPE 2.0 Reference:
For either the AMT Standard or Minimal Engine (Note that AMT 2.1 only has one engine, called simply "AMT Engine"), these object definitions can be found in the file ResourceUser.k in the KEY: ENGINE folder. For an AMT title produced by either AMT or AMTPE, these object definitions can be found in the Hierarchy.k file in the SOURCES folder of your project.
AMT Runtime Setup Dialog Scroller Display AMT also displays each available scroller style when the Runtime Setup menu item of the File menu is selected. The graphic for this display is another 'PICT' resource. This graphic shows each available scroller in a column format. Currently, AMT provides space for only 3 scroller graphics in the display. Here is what this graphic looks like:
The 'PICT' resource for this graphic can be found in the file
Engine.rsrc in the KEY: ENGINE folder.
There are two ways to add new scrollers to a title:
If you replace an existing scroller in an AMT runtime, the new scroller, of course, won't be available to any other title you create just the title it was added to. If you add a scroller to either the Minimal or Standard Engine and Runtime Maker, the scroller will be available to any title created with that engine and Runtime Maker.
Replacing an Existing Scroller for a Macintosh AMT Runtime
Here are the steps necessary to add a custom scroller to an existing AMT runtime. The following instructions are ResEdit-specific, but the general ideas can be applied to any resource-editing program, like Resorcerer.
Note: the new scroller must have the exact format as the one being replaced (refer to the Scroller Format Information section above). If they are different, the format definitions must be changed and the title re-compiled (refer to the next section on Adding A Scroller to the AMT ):
Now launch your title. The new scroller will replace all occurrences of the old scroller.
Replacing an Existing Scroller for a Windows AMT Runtime
Adding a scroller to a Windows AMT Runtime is different from adding a scroller to a Macintosh AMT runtime. You can only change the scroller resources of a title built using AMTPE. If you build your titles using only AMT, you will need to change the Windows files in the Runtime Maker CODES folder, as described later in this document (note that this operation requires AMTPE).
Windows Titles Produced With AMTPE
Adding a Scroller to the AMT
Adding a scroller to the AMT requires you do the following:
Adding a Scroller to the Standard or Minimal Engine
Here are the necessary steps to add a custom scroller to the AMT Standard or Minimal Engine:
You must now re-build the engine for the new scroller definition to take effect. The following is a description of how this is accomplished:
Re-building the Standard or Minimal Engine
Here are the necessary step to re-build an engine, as described on pg. 6-4 of the Apple Media Tool Programming Environment User's Guide :
This will build a new engine file called AMTE, which will be left in the Release folder of your AMT Engine (or Minimal Engine or Standard Engine) folder. To use this new engine with AMT, simply copy the new engine file to the same folder as the AMT (there is no need to rename it as stated on pg. 6-4 of the Apple Media Tool Programming Environment User's Guide ). Make sure that you remove the old engine from the folder containing AMT. The old engine will be called Minimal Engine, Standard Engine or AMT Engine.
Next, you need to add the scroller as a display item for the AMT Runtime Setup dialog (from the AMT File menu). The following is a description of how this is accomplished.
Adding a Scroller to the AMT Runtime Setup Dialog
To add the scroller as a display item in the AMT Runtime Setup dialog, you must copy the normal scroller from the scroller graphic image created above and paste it over one of the existing scrollers in the display. Here are the necessary steps:
Your new scroller will now show up in the AMT Runtime Setup dialog. You may now create titles containing the new scroller with AMT. However, if you were to create a runtime version of your title with RunTime Maker, RunTime Maker would not know about the new scroller. You must also add the new scroller to RunTime Maker. The following section describes the necessary steps.
Adding a Scroller to RunTime Maker
Adding a custom scroller to RunTime Maker requires you re-build the Engine Sample project (look in the folder Standard Engine: Sample, or Minimal Engine: Sample: or AMT Engine: Sample if you are using AMT 2.1). The resulting output files from the Sample project build must be copied to the RunTime Maker Codes folder. Here are the necessary steps:
Building the Engine Sample Project
NOTE: This describes the process for rebuilding the Windows components of the CODES folder in AMT 2.1. If you are using AMT 2.0, you must rebuild two CODES folders, one for the Minimal Engine and one for the Standard Engine.
The Windows components for the Minimal Engine are generated by rebuilding the KEY/SAMPLE/PROGRAM.MAK project. The Windows components for the Standard Engine are generated by rebuilding the project KEY/STNDSAMP/PROGRAM.MAK.
Your scroller is now available for use by RunTime Maker.
AMT and AMTPE developers may want to add custom scrollers to their multimedia titles. However, starting with AMT 2.0, the process for adding custom scrollers changed. This Technote describes new techniques for adding custom scrollers to AMT 2.0 and AMT 2.1 titles.
Apple Media Tool Reference Guide
Apple Media Tool Programming Environment User's Guide , Apple Computer.
Apple Media Tool Programming Environment 2.0 Reference , Apple Computer
Contact ADC | ADC Site Map | ADC Advanced Search
|For information about Apple Products, please visit Apple.com.|
Contact Apple | Privacy Notice
Copyright © 2002 Apple Computer, Inc. All rights reserved.