Example 14, Messages with Resources


This description will add some more resources to
   -  Doc Example.ADsrc  (source,  "W" in the icon).
   -  Doc Example.ADcomp  (compiled, "P" in the icon)
established before. 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
 

FIRST PART

Let's go back to this question. The established the Evaluation table of the Write Text Box like this. We prepared the message for the good answer (first 4 lines in table) like this. In this FIRST PART we want to add two pictures on the message, the message will become this. Do these steps:
- Open that message on the tab Properties of the Message Manager. That is
   1) Evaluation table of the Write Text Box . See Result
   2) Click in first line in column message
   3) Choose Properties on appearing menu
See result of these three steps and find the 6 buttons Insert/Delete Resource at level –3, -2, -1, + 1, +2, +3
Note:
Up to six resources may be added to complement the text of the message text. The 6 resources have levels. The level numbers are  –3, -2, -1, + 1, +2 and +3. The resource level is used to manage the visibility of the resource when they overlap. The message’s text is located at level zero. Some picture added at a positive level, overlapping the text, will hide the text on the overlapping region. The text will hide the picture if it is added at a negative level.
The level has no influence if resources text do not overlap.
Finally: Sounds entered at level –3 have a special feature in the case of Static Picture. These sounds make the Static Picture emit sounds according to the clicked spot of the Static Picture. An example will be given under Static Picture.
- Click on +1 button. This will open the Resource Dialog we have encountered already several times. Use this dialog to add the a picture of WashingtonPic, found on the CD at Samples\Try This\Example Folder\Example Resources\Washington. Choose DIRECT as display mode (the picture is quite small).  OK for the Resource Dialog will give this result.
- Click on +1 button. Do the same to add the WhitehousePic, found at the same place on the CD. See Result. Observe that the White House is behind  :).
We are ready for a temporary jump to ADPlayer to test the modified message. See Illustration.


SECOND PART, Discussion

1) The result looks like this if we
    a) transform the Display Mode to INDIRECT for the picture at level +1.
    b) delete the WhitehousePic  from level -1 (Resource Dialog)
    c) add the WhitehousePic  at level +2
    d) adapt the text using é(editor)
    Transformation on CD saved as Ex14bis.ADsrc
2) Resources of type sound, video, text etc. can be added the same way.
THIRD PART, tricky things
It is almost straightforward how we add a solution message to the anthem / flag question. We could use the 6 levels to add the 5 flags and give some explanations in the text of the message. I prefer to use a picture that will hide completely the text of the message. The picture AnthemFlagSolution, found on the CD at   \Samples\Try This\Example Folder\Example Resources\Divers   was created the following way:
1) Screenshot of ADPlayer
2) Paste the Screenshot into a document the program PAINT.
3) Add the text to the document of program PAINT.
    (Using the transfer to grid and paste, see earlier example)
4) Save it as AnthemFlagSolution.
Few steps remain:
- Open the Evaluation Dialog of the Validater to do add the solution message. See Illustration.
- Add AnthemFlagSolution at Level +1. See Illustration.
- Guide the Resource Dialog  to the picture AnthemFlagSolution locatred at  \Samples\Try This\Example Folder\Example Resources\Divers. Be sure to use DIRECT Display mode. Arrange Size and Position and leave all dialogs with OK.
We are ready for a temporary jump to ADPlayer to test the solution message. See Illustration.
It is almost straightforward how we can modify the BINGO message to this.
The files ClapsSound and ClapsPict are found on the CD at
 \Samples\Try This\Example Folder\Example Resources\Divers.
- Use Edit/ Message Editor, select the BINGO message (ID 5501) and go to the Properties tab.
- Give the yellow color to the background and to the window.
- Add  ClapsSound at level +1, DIRECT.
- Add  ClapsPict at level +2, DIRECT. See Illustration.

We are ready for a temporary jump to ADPlayer to test the solution message. 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)


Back to try this