nikel
nikel

Reputation: 653

Trace and String Not Working

I'm trying to test some strings but trace outputs nothing. I was using Flash CS6, then I installed Flash CC then everything was fine. But then I created another loop now the same thing. Here's my code:

for (tempNum = lastCharNum; tempNum <= 7; tempNum++) {
    trace(tempNum); // this outputs nothing
    if (arr[tempNum] != String.fromCharCode(9)) {
        firstCharNum = tempNum;
        trace(firstCharNum); // this outputs nothing
    }
}

I tried:

for (tempNum = lastCharNum; tempNum <= 7; tempNum++) {
    txt.text = String(tempNum); // this doesn't make change to the textfield
    if (arr[tempNum] != String.fromCharCode(9)) {
        firstCharNum = tempNum;
        txt.text = String(firstCharNum); // this doesn't make change to the textfield
    }
}

Same thing, nothing happens.

Upvotes: 0

Views: 65

Answers (1)

Dave
Dave

Reputation: 169

Make sure "Omit Trace Statements" is not checked in the the publish settings. If its not checked, try File>Publish and Control>Test Movie>In Flash Professional to see if you get different results.

Upvotes: 1

Related Questions