Example 21, Multimedia Portion and Sound/Video


This description will add Multimedia Portion elements to
    -  Doc Example.ADsrc  (source,  "W" in the icon).
   -  Doc Example.ADcomp  (compiled, "P" in the icon)
Both files can be found on the CD in the folder
     Samples\Try This\Example Folder
The description presumes all resources (pictures, sounds available) found in
     Samples\Try This\Example Folder\Example Resources\SndVideoRes
There are several Multimedia Portion cases. The case "Picture" is the subject of example 18. "Text" is the subject of example 19. This example has Video and Sound as subject. Video and Sound are treated together because they work exactly the same way, we have seen it during the interlude, example 20.


FIRST  PART

With the knowledge of examples 18 to 20 it is almost straight forward how to achieve this result.
-  Choose Static Text from the menu Create Element of ADWorks and use its Definitions.
-  Choose Select Multimedia Portion from the menu Create Element of ADWorks.
-  Choose Validater from the menu Create Element of ADWorks. See Illustration.
-  Select the element Multimedia Portion and select the Validater to link them together.
-  Use the Definition of the Multimedia Portion to define his resource, the video TEASING found at the above indicated location. Define as well the color you wish for the element
-  Use the Evaluation of the Multimedia Portion to define the Possibility: Just select the portion and click OK, below the controllers. See Illustration 1 and see Illustration 2.
-  Define the Equality Criteria like this (Settings tab of Evaluation). It will be discussed below.
-  Use the Evaluation of the Static Text to define the portions of Referenced Text.
 
We are ready jump to ADPlayer to test the Multimedia Portion, case Text. See Illustration.
This document is saved saved with the name Doc Example.ADsrc  (with  a "W" in the icon).
The compiled file is Doc Example.ADcomp  (with a "P" in the icon)
SECOND  PART, Discussion

1) Equality Criteria

The controllers for the Equality Criteria are located on the Settings tab of the Evaluation Dialog. See Illustration . The two check boxes are checked, with a tolerance of 20 at left and 30 at right. This means for the Evaluation from 173 to 183 (see Illustration 1 and see Illustration 2) the following calculation:
The Length is 10, result from 183 minus 173
20% from 10 is 2. Therefore the left selection must be between 171 (173 minus 2) and 175 (173 plus 2).
30% from 10 is 3. Therefore the rigth selection must be between 179 (183 minus 3) and 186 (183 plus 3).
Both criteria must apply ss the two check boxes are checked.
Only one border must be selected correctly if only one check box is checked.
The following convention apply if none of them is checked: The middle of the selection must be inside.

2) Changing the video/music.

The possibilities in the Evaluation Table are the positions during the play. You will probably need to define the positions again when you replace the video / sound with anothervideo / sound, or even worse, with a resource of another kind. ADWorks emits a warning when he detects that kind of changing.
Note, Choose Box are "cool" : When the writing of an item in the list of a Choose Box is changed, then the Evaluation Table is automatically adapted.

3) Repeating fields.

Repeating fields are possible. It is strictly the same as example 18 and 19.



Back to try this