Graphics Reference
In-Depth Information
done manually or through methods such as a CMS. This has two advantages:
first, this operation is not asynchronous, and thus is faster than querying the data
by a repeated request. Moreover, it is very easy to create reusable compositions
that can be adjusted to the actual usage scenario via the simple injection of data.
The procedure is quite simple. Use a simple script block to define a JSON
object within the composition's DIV container:
<div id="Stage« class="EDGE-189325992">
<script class="data« type="text/data">
{
url: "http://www.some-url.com",
user: {
firstname: "Simon",
lastname: "Widjaja"
}
</script>
</div>
Once the data has been injected, you can use this in the compositionReady
event or within a click action:
// Get the injected data.
var injectedData = EC.getInjectedData(sym);
// Do something with the data.
alter("Hello " + injectedData.firstname + " "
+ injectedData.lastname);
7.5 Gaming
Edge Animate supports only fixed animations in the first version. In other words,
the user can only use play and stop to move an element, such as a character.
The Edge Animate API simply does not offer any additional functions for this
purpose. It also lacks basic functions such as collision detection, without which
a game is hardly possible. Edge Animate is expected to be extended to include
these features at some point. However, the missing features do not prevent us
from taking a brief look at the topic in more detail. In an experiment, I wanted to
take a stand against a difficult situation and find out what might already be feasi-
ble with additional libraries under the current rudimentary technical conditions.
I now want to present the results in the following section.
Together with my favorite illustrator, Jacqueline Schepers, I dared to do my
first character design, the focus of our proof-of-concept project.
Figure 7.13
Jacqueline Schepers shows off the first
draft for the proof-of-concept game
 
Search WWH ::




Custom Search