
Coding conventions
105
In this case, the
counter
variable on the main timeline is overwritten by the
counter
variable
within the function. The following is the corrected code, which uses the keyword
counter
to
declare both of the variables:
var counter = 7;
function loopTest(){
trace(counter);
for(var counter = 0; counter < 5; +){
trace(counter);
}
}
trace(counter);
loopTest();
trace(counter);
Содержание FLASH MEDIA SERVER 2-DEVELOPING MEDIA
Страница 1: ...Developing Media Applications ...
Страница 6: ...6 ...
Страница 10: ...10 About This Manual ...
Страница 36: ...36 Flash Media Server Architecture ...
Страница 80: ...80 Debugging and Monitoring Applications ...
Страница 106: ...106 Application Development Tips and Tricks ...
Страница 114: ...114 ...