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: 'center'});
5
6
// Listens event once.
7
blueText.listenOnce('click', function (e) {
8
blueText.text('You can\'t click here anymore');
9
});