Authorware Help Icon Properties

All properties of the DirectMediaXtra icon can be easily set in the Properties Dialog box, which is displayed when the icon is created and also when you double-click the icon. These properties can also be set via scripting.

File - the complete pathname of the linked media file.
Example: result:=GetIconProperty(@"DirectMediaXtra", #file)
Trace(result)
-- "C:\myfile\file1.mpg"
SetIconProperty(@"DirectMediaXtra", #file,"C:\myfile2.mpg")

Title - the filename of the linked Media file. This property is used to resolve the pathname if the Media file is not found on the original location.
Example: result:=GetIconProperty(@"DirectMediaXtra", #title)
Trace(result)
-- "file.mpg"

Duration - the duration of the linked Media file in milliseconds.
Example: result:=GetIconProperty(@"DirectMediaXtra", #duration)
Trace(result)
-- 45200

Videowidth - the original encoded width of the linked Media file, in pixels. This is a read-only property.
Example: result:=GetIconProperty(@"DirectMediaXtra", #videowidth)
Trace(result)
-- 352

Videoheight - the original encoded height of the linked Media file, in pixels. This is a read-only property.
Example: result:=GetIconProperty(@"DirectMediaXtra", #videoheight)
Trace(result)
-- 240

Volume - The default audio volume to be used during playback of new Xtra sprites. Values range from -100 to 0, expressed in dB. The sprite function SetVolume may be used when you want to modify the volume of a sprite that is already on the stage.
Example: result:=GetIconProperty(@"DirectMediaXtra", #volume)
Trace(result)
-- -10
SetIconProperty(@"DirectMediaXtra", #volume,0)

Balance - The default audio balance to be used during playback of new Xtra sprites. Values range from -100 to 100, expressed in dB. The sprite function SetBalance may be used when you want to modify the balance of audio of a sprite that is already on the stage.
Example: result:=GetIconProperty(@"DirectMediaXtra", #balance)
Trace(result)
-- -100
SetIconProperty(@"DirectMediaXtra", #balance,0)

Rate - The default playback rate to be used during playback. Values range from 0 to 200, expressed in percentage of the original playback rate. The sprite function SetRate may be used when you want to modify the rate of playback of a sprite that is already on the stage. IMPORTANT: Windos Media files do not support the rate property. Playback will fail if the rate is set to any value but the default of 100.
Example: result:=GetIconProperty(@"DirectMediaXtra", #rate)
Trace(result)
-- 100
SetIconProperty(@"DirectMediaXtra", #rate,80)

Cpuboost - DirectMediaXtra can slow down Director to allow more CPU time for the DirectShow driver. This can be useful if you are experiencing poor or stuttering playback. Legal values are in the range of 0 to 95 percent, although values over 80 may result in problems with the performance of your Director animation and/or Lingo event detection.
Example: SetIconProperty(@"DirectMediaXtra", #cpuboost,60)

AdjustDurationBeforePlayback - If this property is TRUE, the Xtra will scan the media file and adjust the duration of member property as soon as the sprite starts playing. This is necessary because different DirectShow filters may report different durations for the same clip. If this happens when you take your finished product to a machine with a different DirectShow filter, the Xtra may not reach certain cuepoints or it may consider that the end of the file was not reached. Depending on your scripting this can prevent your movie from operating correctly, so this setting should be enabled in the majority of cases.
Example: SetIconProperty(@"DirectMediaXtra",#adjustdurationbeforeplayback,1)

ShowLocateFileDialog - the Xtra will try to locate the linked media files at runtime if you move them from the original location. The mechanism is described in the CREATING PROJECTORS section of the documentation. If the linked file can not be found, this property is used to specify if a dialog box is displayed asking the user to locate the file, or if the Xtra fails silently.
Example: SetIconProperty(@"DirectMediaXtra", #showlocatefiledialog,TRUE)

LinkedMediaLocated - This is a property that is set automatically by the Xtra, and indicates if the linked media file for this member was located when the movie loaded (either automatically by the Xtra, or using the Locate File dialog box.) The Xtra will not attempt to initialize playback of a linked file if this property is FALSE.
Example: result:=GetIconProperty(@"DirectMediaXtra", #linkedmedialocated)
Trace(result)
-- 1

HasToolbar - Indicates whether a toolbar is attached to the video window. Possible values are 0 (FALSE) or 1 (TRUE).
Example: SetIconProperty(@"DirectMediaXtra", #hastoolbar,1)

Loop - Indicates whether the linked Media file will loop automatically. Possible values are 0 (FALSE) or 1 (TRUE).
Example: SetIconProperty(@"DirectMediaXtra", #loop,1)

PlaySegment - Indicates whether only a segment of the Media file is to be played. Possible values are 0 (FALSE) and 1 (TRUE).
Example: SetIconProperty(@"DirectMediaXtra", #playsegment,1)

SegmentStart - Specifies the start time of the Media file to be played, in milliseconds. Only active if "the playsegment of the member" is TRUE.
Example: SetIconProperty(@"DirectMediaXtra", #segmentstart,10700)

SegmentEnd - Specifies the end time of the Media file to be played, in milliseconds. Only active if "the playsegment of the member" is TRUE.
Example: SetIconProperty(@"DirectMediaXtra", #segmentend,45800)

PausedAtStart - Indicates whether the Media file should be opened in "paused" state. Possible values are 0 (FALSE) and 1 (TRUE).
Example: SetIconProperty(@"DirectMediaXtra", #pausedatstart,1)

CuePointTimes - Contains a list of the cue point times associated with this member.
Example: result:=GetIconProperty(@"DirectMediaXtra", #cuepointtimes)
Trace(result)
-- [4500,12300,34650,67321]

CuePointNames - Contains a list of the cue point names associated with this member.
Example: result:=GetIconProperty(@"DirectMediaXtra", #cuepointnames)
Trace(result)
-- ["Cue 1","NewCuePoint","Start Point","Second part"]

DirectMediaXtra Help