Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 114192

Re: Re: TypeError: Error #1009

$
0
0

Forget the error #1009; that's not an issue for me anymore. I just want to know why a trace from a different scene is tracing output code from the scene before; that's all I want to know for now. Could you please look a the "Trace Output" I provided, and see if you can figure out why a scene is tracing code from another scene?

 

SCENE 1 CODE:

 

this.stop();

 

stage.addEventListener(KeyboardEvent.KEY_DOWN, groupNum);

 

function groupNum(event:KeyboardEvent):void

{

     var input:Textfield = GroupNum;

    

    if(event.keyCode < 49 || event.keyCode > 57 && event.keyCode < 97 || event.keyCode > 105)

    {

        trace("Group #: " + input); //Output would be "Group #: (some number)"

        gotoAndPlay(1, "Scene 2");

    }

}

 

SCENE 2 CODE:

 

this.stop();

 

stage.addEventListener(KeyboardEvent.KEY_DOWN, conditionNum);

 

function conditionNum(event:KeyboardEvent):void

{

    var input2:TextField = Condition;

  

    if(event.keyCode < 49 || event.keyCode > 57 && event.keyCode < 97 || event.keyCode > 105)

    {

        trace("Condition #: " + input2); //Output would be "Condition #: (some number)"

        gotoAndPlay(1, "Scene 3");

    }

}

 

TRACE OUTPUT:

 

Group #: [object TextField]

Group #: null <---------------------------- THAT'S NOT SUPPOSED TO BE THERE, BUT I DON'T KNOW WHY IT POPS UP ALL THE TIME.

Condition #: [object TextField]


Viewing all articles
Browse latest Browse all 114192

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>