Unsolved Dynamic list of children for NumberAnimation
-
Hi there,
I want to create a NumberAnimation which targets are not known at compile time. So how is it possible to pass a list with all the items (which have a certain int property "animID") to the NumberAnimation target? -
you can write a method which takes the argument as target.
PropertyAnimation{ id : anim } function startAnimation(targ) { anim.target = targ anim.start() }
-
Thanks for replying, but that's not exactly what I needed. Perhaps I was unclear, but I thought of a function which iterates through the whole UI und generates a list of the children which have the property I mentioned. So in your example the targ elements are still unknown and have to be found out.
-
for(var i=0;i<topObject.children.length;i++) { startAnimation(topObject.children[i]); }
-
When I apply this to my window I get:
TypeError: Cannot read property 'length' of undefined
-
children is property of Item. Not the window. Show me the code.