static var flag:boolean = false;

在text2.js中接受静态变量:

if(text1.flag)