|
_root.onEnterFrame = function() {
w_ratio=400/flower._width;
flower._width=flower._width*w_ratio;
flower._height=flower._height*w_ratio;
_root.width=flower._height+40;
}
//XML파일 읽어오기...찾아올 데이터 불러오기
var myList = get("s");
//소스리스트 초기화
if (myList == Null) {
myList="http://duduji.com.ne.kr/action/33/myImageList.xml";
}
myImageList=new XML();
myImageList.load(myList);
myImageList.onLoad=function() {
rootNode=myImageList.firstChild; // 메뉴트리를 읽어온다.
myOpcount=rootNode.childNodes.length; //문제수를 알아옵니다.
i=1;
pic=rootNode.childNodes[1].attributes.mtitle.toString();
ans=rootNode.childNodes[1].childNodes[0].toString();
showImage(i,pic,ans);
}
_root.nextb.onPress=function () {
if (i<(myOpcount-2)) {
i=i+2;
pic=rootNode.childNodes[i].attributes.mtitle;
ans=rootNode.childNodes[i].childNodes[0];
img_address.text="";
showImage(i,pic,ans);
showImage(i);
}
}
_root.backb.onPress=function () {
if (i>1) {
i=i-2;
pic=rootNode.childNodes[i].attributes.mtitle;
ans=rootNode.childNodes[i].childNodes[0];
img_address.text="";
showImage(i,pic,ans);
}
}
_root.relo.onPress=function () {
pic=img_address.text;
ans="";
showImage(i,pic,ans);
}
_root.ans_ok.onPress=function () {
answer.text=ans;
if (answer.text == "Yes") {
_root.flower._alpha=30;
_root.fire.visible=true;
_root.fire.gotoAndPlay(2);
};
};
_root.ans_no.onPress=function () {
answer.text=ans;
if (answer.text == "No") {
_root.flower._alpha=30;
_root.fire.visible=true;
_root.fire.gotoAndPlay(2);
};
};
function showImage(i,plc,ans) {
loadMovie(pic,flower);
answer.text="";
}
|