private function addQuestion_must(xml:XML,array:Array,vb:VBox):void//动态创建checkbobox
{
var i_:int;
var allNum:int=xml.children().length();
for(i_=0;i_<allNum;i_++)
{
arr_signMust[i_]=-1;
var checkbobox:CheckBox=createCheckboBox(i_);
vb.addChild(checkbobox);
}
function createCheckboBox(_i:int):CheckBox
{
var checkbobox:CheckBox=new CheckBox;
checkbobox.label=array[_i];
checkbobox.addEventListener(MouseEvent.CLICK,clickCheckbobox1);
function clickCheckbobox1(event:MouseEvent):void
{
if(checkbobox.selected==true)
{
arr_signMust[_i]=_i;
}
else
{
arr_signMust[_i]=-1;
}
}
return checkbobox;
}
}//end
private var arr_signChoose:Array=new Array();
private function addQuestion_choose(xml:XML,array:Array,vb:VBox):void//动态创建checkbobox
{
var i_:int;
var allNum:int=xml.children().length();
for(i_=0;i_<allNum;i_++)
{
arr_signChoose[i_]=-1;
var checkbobox:CheckBox=createCheckboBox(i_);
vb.addChild(checkbobox);
}
function createCheckboBox(_i:int):CheckBox
{
var checkbobox:CheckBox=new CheckBox;
checkbobox.label=array[_i];
checkbobox.addEventListener(MouseEvent.CLICK,clickCheckbobox1);
function clickCheckbobox1(event:MouseEvent):void
{
if(checkbobox.selected==true)
{
arr_signChoose[_i]=_i;
}
else
{
arr_signChoose[_i]=-1;
}
}
return checkbobox;
}
}//end
{
var i_:int;
var allNum:int=xml.children().length();
for(i_=0;i_<allNum;i_++)
{
arr_signMust[i_]=-1;
var checkbobox:CheckBox=createCheckboBox(i_);
vb.addChild(checkbobox);
}
function createCheckboBox(_i:int):CheckBox
{
var checkbobox:CheckBox=new CheckBox;
checkbobox.label=array[_i];
checkbobox.addEventListener(MouseEvent.CLICK,clickCheckbobox1);
function clickCheckbobox1(event:MouseEvent):void
{
if(checkbobox.selected==true)
{
arr_signMust[_i]=_i;
}
else
{
arr_signMust[_i]=-1;
}
}
return checkbobox;
}
}//end
private var arr_signChoose:Array=new Array();
private function addQuestion_choose(xml:XML,array:Array,vb:VBox):void//动态创建checkbobox
{
var i_:int;
var allNum:int=xml.children().length();
for(i_=0;i_<allNum;i_++)
{
arr_signChoose[i_]=-1;
var checkbobox:CheckBox=createCheckboBox(i_);
vb.addChild(checkbobox);
}
function createCheckboBox(_i:int):CheckBox
{
var checkbobox:CheckBox=new CheckBox;
checkbobox.label=array[_i];
checkbobox.addEventListener(MouseEvent.CLICK,clickCheckbobox1);
function clickCheckbobox1(event:MouseEvent):void
{
if(checkbobox.selected==true)
{
arr_signChoose[_i]=_i;
}
else
{
arr_signChoose[_i]=-1;
}
}
return checkbobox;
}
}//end