Download MPML-FLASH Demo(Bigger one 33M)
Download MPML-FLASH Demo(Zipped one 26M)
Attention: To view the demo, you need the Camtasia Studio software, which can be available from here.
mpml | root element of MPML |
---|
head | head information of MPML-FLASH document |
---|---|
meta | meta data description |
title | the title name |
spot | definition of a point on the screen |
agent | the configuration of the agent to be used |
body | the definition of presentation flow |
---|---|
page | the definition of one page for presentation |
scene | the definition of one scene for presentation |
seq | synchronous script |
---|---|
par | parallel script |
pause | pause script |
emotion | the configuration of agent emotion |
---|---|
move | move the agent |
play | agent play actions |
speak | agent speaks |
think | agent think something |
execute | execute a javascript command on the background page |
---|---|
consult | test a variable on the background page and choose what to do depending on its value. |
test | test the variable of the parent <consult> and contain the script to execute in case the corresponding match is found. |
wait | consult a javascript variable existing on the background page and wait until it is different from 0. |
txt | used to allow a variable speech. It eads a javascript variable from the background and includes it in the speech |
text | text object in Flash |
---|---|
img | image object in Flash |
button | button object in Flash |
MPML document root element
Element <mpml> is MPML document root element. When define the MPML-FLASH document, set version to "Flash". In MPML-FLASH document contents, all elements are the children of element <mpml> .
<?xml version="1.0" encoding="shift_jis" ?>
Because in MPML-FLASH system, we employ client-server model, which use DOMXML at the server side as the parser of the MPML-FLASH, the XSLT file is not necessary.
<?xml version="1.0" encoding="shift_jis" ?> <mpml version="flash"> <head> <!-- This is the head information. --> </head> <body> <!-- This is the presentation document body. --> </body> </mpml>
information of head element
element<head> is the information all about head of flash presentation. In the element <head> there are all the informations that are supplement of the MPML-FLASH document.
description of meta data.
In the element <meta> define the title, copyright and other properties of the presentation. In the element <meta> define the property name and correspond value respectively. name and content must be set as a group.
name properties are shown as follows:
attribute | explanation | example |
---|---|---|
titl | presentation Japanese title | MPML-FLASHについて |
tite | presentation English title | about MPML-FLASH in English |
aupk | presentation author name in Japanese | 楊 征路 |
aupe | presentation author name in English | Zhenglu Yang |
conf | name of Conference | MNSA 2004 |
cond | date of the presentation | 2004 |
kywd | Japanese keyword | MPML-FLASH エージェント |
kywe | English keyword | MPML-FLASH agent |
writer | author of the script | Zhenglu Yang |
wrid | date of written script | 20030901 |
pred | date of the presenation demo | 2004 |
vafd | valid deadline of the presentation(from) | 2003 |
vatd | valid deadline of the presentation(to) | 2004 |
<head> <meta name="titl" content="MPML-FLASH" /> <meta name="aupe" content="Zhenglu Yang" /> <meta name="wrid" content="20030901" /> </head>
set tilte name
element <title> is the definition of MPML-FLASH title.
<head> <title> about MPML-FLASH Ver1.0</title> </head>
define a point on the screen. This point can be used later as spatial reference.
Element <spot> defines a point on the screen. This point can be used later as spatial reference.
The default of this element is set to "0, 0".
<head> <spot id="spot1" name="middle" description="middle of the screen" x="400" y="300" /> </head>
configuration of the agent to be used in presentation
element <agent> is used to set the agent to be used in presentation
To control the agent in MPML-FLASH presentation, setting name of the agents can manage multiple agents.
In the element <agent> set id and then can use the profile of the agent by profile-url.
In the element <agent> the agent will appear at the place where location is set.
profile-url set the characteristic of every agent.
<head> <agent id="Agent" profile-url="andy.ap" location="StartPosition" /> </head>
definition of presentation script body
Element <body> defines the presentation flow. In <page> the script will be executed sequencely. <page> is appeared as the first child element in element <body>
definition of one presentation
Element <page> uses the reference which is defined by ref and is set id to become one page of the presentation. The page which is defined by ref can not change later.
In thecaption page title is set.
The child elements of <page> <scene> can be defined multiple. In one page, the block which is defined by scene can be called more than once. MPML-FLASH presentation script must defined in <scene>.
<body> <!-- Page1 --> <page id="Page1" caption="ページ1" ref="test.jpg"> <scene id="Scene1" caption="scene1"> <!-- Scene1 content --> </scene> ... </page> <!-- Page2 --> <page id="Page2" caption="scene1" ref="test.jpg"> <scene id="Scene1" caption="scene1"> <!-- Scene1 content --> </scene> </page> ... </body>
definition of one presentation scene
Element <scene> is referenced by defining id. In one page, the scene script is defined by seq.
<scene> <seq> ... </seq> </scene>
Scene script defines the presentation content. It must be written in <seq>
caption is used to define the scene title.
<body> <!-- Page1 (infinitely loop) --> <page id="Page1" ref="test.jpg"> <scene id="Scene1"> <!-- Scene1 content--> <seq> <jump to="Scene2" /> </seq> </scene> <scene id="Scene2"> <!-- Scene2 content --> <seq> <jump to="Scene1" /> </seq> </scene> </page> </body>
synchronous script
In element <seq> the script is executed sequentially.
The actions define in element <seq> are executed begin after the time[ms] begin assigns.
<!-- <seq> script is executed sequentially --> <seq> <play agent="Agent" act="greet" /> <speak agent="Agent"> Please say 'Left' or 'Right'. </speak> <listen agent="Agent" /> </seq>
parellel script
The actions in element <par> are executed in parallel. If <seq> is written, the actions in <seq> is executed sequentially.
Element <par> can define multiple actions that are executed in parellel but this can not always right.
Element <par> can support actions that are executed after some time[ms] begin describes.
<seq> <!-- speak as while as greet --> <par> <seq> <move agent="Agent" how="walk" location="Center" /> <play agent="Agent" act="greet" /> </seq> <speak agent="Agent">Welcome to the MPML-FLASH. </speak> </par> <!-- after <seq>と<speak> are executed, it will continue do next actions from here --> ... </seq>
pause script
In element <pause> the presentation will pause for the indicated duration.
Make the indicated pause before going on.
<pause id="pause1" name="Pause before asking" description="Wait 1s before asking to the student what he thought of the presentation." duration="1000" />
configuration of agent emotion
Element <emotion> is the emotion of agent. The emotion is set by type.
Element <emotion> begins after the time[ms] which is set by begin. The result of combining element <emotion> and <par> can not be confirmed rightly.
<seq> <!-- set agent emotion to sad --> <emotion agent="Agent" type="sad"> <speak agent="Agent"> I'm sorry. </speak> </emotion> <!-- after 0.5m the agent emotion will change to angry --> <emotion agent="Agent" type="angry" begin="500"> <think agent="Agent"> How rude! </think> </emotion> </seq>
move agent
Element <move> defines the move information of agent.
The move action of agent in MPML-FLASH are executed sequentially as follows:
First, agent will turn direction to the location defines. This angle is computed by the location at present and the destination described by location.
Next, agent will move to the destination. While moving, it will act the action how defines. By adding the action like walking how defines, the natural actions will appear.
At last, agent will turn the direction to location defines.
These three actions are executed sequentially to achieve moving action.
The time need to turn and move is computed automatically by agent profile configuration, moving length, and so on. Element speed is used to scale the time needed.
Element <move> is executed after the time[ms] which begin defines.
<seq> <!-- Agent will move the center of the presentation window --> <move agent="Agent" how="walk" location="center" /> </seq>
agent play some action
Element <play> defines the actions that agent will play. The action name is described by act. The multiple actions in element <par> can not be always executed right in parellel.
The action that element <play> defines will execute after the time[ms] begin describes.
<seq> <!-- Agent plays greet action --> <play agent="Agent" act="greet" /> <!-- Agent will play applaud after 1s --> <play agent="Agent" act="applaud" begin="1000" /> </seq>
agent speak
Element <speak> defines the contents that agent will speak. Element <speak> defines the action that will be executed after the time[ms] begin describes.
<seq> <!-- Speech content is described by text data --> <speak agent="Agent"> Hello, MPML-FLASH World. </speak> <!-- Agent will speak after 0.5s --> <speak agent="Agent" begin="500"> My name is Agent Richard. </speak> </seq>
agent thinks
Element <think> defines the thought content of the agent. Only the thought content is appear and there is no output audio. Element <think> will be executed after the time[ms] begin defines.
<seq> <!-- Text data describes the thought content --> <think agent="Agent"> I'm OK? </think> </seq>
execute a javascript command on the background page
Execute a javascript command on the background page. Can be used to synchronize the background events with the flow of the presentation.
<execute id="picture2" name="Picture change" description="Change the current picture to the next one." target="changepicture()" />
test a variable on the background page an dchoose what to do depending on its value.
Test a variable on the background page and choose what to do depending of its value.
<consult id="consult1" name="Response to user" description="Check the anser of the student and give the appropriate answer to it." target="choice" mode="pass" > <test value="1" > ... </test> <test value="2" > ... </test> </consult>
test the variable of the parent <consult> and contain the script to execute in case the corresponding match is found.
Test the variable of the parent <consult> and contain the script to execute in case the corresponding match is found.
<consult id="consult1" name="Response to user" description="Check the anser of the student and give the appropriate answer to it." target="choice" mode="pass" > <test value="1" > ... </test> <test value="2" > ... </test> </consult>
Used to allow a variable speech. It eads a javascript variable from the background and includes it in the speech.
Used to allow a variable speech. It eads a javascript variable from the background and includes it in the speech.
<speak id="intro" name="introduction" description="introduction from robot." agent="agent4" > Welcome to my presentation <txt target="name" />! My name is Robby. </speak>
text object in Flash
Element <text> defines the object text that display in Flash.
<!-- Show some text --> <text id="Title1" x="0" y="100" height="50" src="Multimodal Presentation Markup Language" />
image object in Flash
Element <img> defines the object image that display in Flash.
<!-- Show some image --> <img id="MPML_GUI" x="100" y="200" width="500" height="400" src="mpml3_gui.jpg" />
button object in Flash
Element <button> defines the object button that display in Flash.
<!-- Show some button --> <button id="Stop" x="780" y="680" value="Stop" act="Stop" />