HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
var stage = acgraph.create("container");
2
3
var blueText = stage.text(70, 55, "Click on this TEXT.");
4
blueText.style({fontStyle: "italic", fontSize: "18px", color: "#2196F3", hAlign: "middle"});
5
6
// Sets event type on click.
7
acgraph.events.listen(blueText, "click", function (e) {
8
blueText.text("You clicked on text.");
9
});