Turbine
Media Markup Language is a simple XML language that can express all
the rich media capabilities contained in Turbine. With MML you can
display text and images, draw shapes, movie clips, buttons, video
and audio, and control all of these with scripting. MML elements can
be explicitly placed on a certain position or they assume sequential
positions across the movie (this feature is called AutoLayout). For
example the following tags display a text label above a shape and
an image:
Movie
Clips can be used to organize or animate elements like text, images
or shapes. For example the example below displays a series of text
blocks across 4 frames, and also a Flash movie from an external .swf
file (either from the local disk or a remote http location):
Powerful
scripting is also included in Turbine 7, which includes an on-the-fly
ECMA Script compiler. ECMA Script is known in the Flash scene as Action
Script and has a simple JavaScript-like syntax. Action Script can
freely interact with all the MML elements. The following example causes
an image to be attached to the mouse cursor:
<Script>
onEnterFrame = function (){
flower._x=_xmouse;
flower._y=_ymouse;
}
</Script>
This
displays in Flash as:
MML
inside .swf Movies
But MML
can also be integrated inside .swf movies, which allows for better,
simpler positioning of elements. On this example the tags that create
the above "Running..." movie clips are placed on a textfield inside
this .swf movie:
After
being loaded by Turbine, the MML tags on the above .swf will be executed
and produce the results below. Note how the resulting elements are
displayed on the position of the above Flash text field (where the
MML tags were issued):