Fabi135
#1
Hello,
First: I am new to OpenFL and Haxe.
I have imported a XML in my code.
This is my XML Code:
![image](https://community.openfl.org/uploads/default/original/2X/d/dbb3c72674f3bc9c3dfae5688500287073713216.png)
and this is my Main class:
![image](https://community.openfl.org/uploads/default/original/2X/2/247e7d9f74528255680a480f36accb232a4ef1b5.png)
Now I want to
- Display the content from the first node (image “0.png” and text “Welcome”) .
- Wait that the user clicks on a sprite.
- Display the content of the next node.
- Wait that the user clicks on a sprite.
…
Thanks for all answers!
gonzos
#2
add inner loop through attributes
for (page in intro.nodes.page)
{
for (attr in page.attributes())
{
var attValue = page.get(attr);
}
}
Thanks for your answer, but it always gives me an exception.
![image](https://community.openfl.org/uploads/default/original/2X/5/53a99d2fffd7cce1c32e4204ade751fa2c12ea86.png)
pozirk
#5
intro.nodes.page
is an array, you can do
var n:Int = 0;
…
function show():Void
{
trace(intro.nodes.page[n].att.text);
trace(intro.nodes.page[n].att.image);
}
…
function onClick(…):Void
{
n++;
show();
}