0

I've narrowed down the code to this (ignore the colourization):

var theXML:XML = 
    <xml>
        word
    </xml>;

for each (var i:XML in theXML.*) {
    trace(i);
}

For some reason, this prints out "word" over and over indefinitely. Any thoughts as to why? I'm a bit out of practice and have a feeling it's something obvious, but I'm stumped.

Thanks, Cameron

1 Answer 1

2

Finding it interesting I just tested. The result is just one single "word", as expected.

Probably you have placed it into an ENTER_FRAME/TIMER event handler or eventually on a frame on the timeline that gets looped.

Sign up to request clarification or add additional context in comments.

2 Comments

Argh, you're right, the function it's in is being called over and over for some reason. I feel so silly! Thanks a lot!
No P, it's always the most obvious things you don't see.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.