The file content.xml
represents a piece of content that your application should accept and render. The accepted nodes and their given attributes are as follows
This is the root node used to represent a single activity and will only appear once in the XML file.
Represents an AS3 TextField class and accepts the following attributes
- @x - The x coordinate for the TextField. Maps directly to the
TextField.x
attribute - @y - The y coordinate for the TextField. Maps directly to the
TextField.y
attribute - @text - The text string that is displayed in the TextField. Maps directly to the
TextField.text
attribute - @ID - A unique identifier for the specific instance on the element, which is used to reference it within
<function>
tags.
*All TextField elements are to be single line height and use the TextFieldAutoSize.LEFT
autosizing attribute
Represents a basic button which you can create through whatever means you feel appropriate, but it should extend DisplayObject
, have a way of displaying text on it and accept the following attributes:
- @x - The x coordinate for the Button. Maps directly to the
DisplayObject.x
attribute - @y - The y coordinate for the Button. Maps directly to the
DisplayObject.y
attribute - @text - The text to display on the Button.
The <button>
can also accept a single <function>
node as described below.
Represents a simple function that can be evaluated by your application and have access to the standard AS3 Math
library and also a custom function getElementByID
that accepts a single parameter which is the ID
of the element and returns the element or null
if no element is found. The <function>
element also needs to accept the following attribute:
- @name - The name of the given function, if the name uses the keyword
ONCLICK
the function should be called when the parent element receives a standardMouseEvent.CLICK
event.
Your application should accept the content.xml
file and render the following:
Initial State
Clicking the button should then display something similar to the following (with a random number):
Clicked State