Question
same trace,two results,why?
//.....................
trace(channelbtn[channellistnum+channelshownum]);//line1
programtween_y.onMotionStopped = function(){
trace(channelbtn[channellistnum+channelshownum]);//line2
}
//....................
//line1,trace right result,but line2 trace undefined,why???
"channelbtn[channellistnum+channelshownum]" is a button object, "channellistnum" and "channelshownum" are two numbers,they've been defined above line1,so line1 trace right result,but why line2 trace undefined?what's the different between these two function ways below:
1. function a(){}
2. a = function(){}
Thank you for reply.......
trace(channelbtn[channellistnum+channelshownum]);//line1
programtween_y.onMotionStopped = function(){
trace(channelbtn[channellistnum+channelshownum]);//line2
}
//....................
//line1,trace right result,but line2 trace undefined,why???
"channelbtn[channellistnum+channelshownum]" is a button object, "channellistnum" and "channelshownum" are two numbers,they've been defined above line1,so line1 trace right result,but why line2 trace undefined?what's the different between these two function ways below:
1. function a(){}
2. a = function(){}
Thank you for reply.......