flash问题!急!急!急!高分奖赏
发布网友
发布时间:2023-11-05 22:26
我来回答
共1个回答
热心网友
时间:2024-07-19 08:10
flash代码下半部分
for (z = 0; z < the_xml.childNodes.length; z++)
{
tempobject_xml = this.firstChild.childNodes[z];
content_mc["story" + z] = new Object();
content_mc["story" + z].image = tempobject_xml.childNodes[0].childNodes[0];
content_mc["story" + z].image_sm = tempobject_xml.childNodes[1].childNodes[0];
content_mc["story" + z].video = tempobject_xml.childNodes[2].childNodes[0];
content_mc["story" + z].captionlines = tempobject_xml.childNodes[3].childNodes[0];
content_mc["story" + z].headline = "<b>" + tempobject_xml.childNodes[4].childNodes[0].toString() + "</b>";
content_mc["story" + z].thecaption = tempobject_xml.childNodes[5].toString();
content_mc["story" + z].photocaption = tempobject_xml.childNodes[6].childNodes.toString();
} // end of for
build_app();
};
build_app = function ()
{
for (z = 0; z < 5; z++)
{
_root["nav" + z].init_num = z;
_root["nav" + z].image_mc.loadMovie(_root.content_mc["story" + z].image_sm);
_root.stage["inner_" + z].loadMovie(_root.content_mc["story" + z].image);
_root.stage["inner_bttm_" + z].loadMovie(_root.content_mc["story" + z].image);
} // end of for
play();
};
scrub = function ()
{
if (_root.inited == 4)
{
init_story(0);
}
else
{
init_story(_root.inited + 1);
} // end if
};
starttimer = function (a)
{
_root.interval_var = setInterval(scrub, 10000);
};
cleartimer = function (a)
{
clearInterval(_root.interval_var);
};
init_story = function (n)
{
_root.cleartimer();
p_array = new Array(0, -342, -684, -1026, -1368);
if (_root.inited != null)
{
_root["nav" + _root.inited].gotoAndStop(1);
} // end if
_root["nav" + n].gotoAndStop(2);
indicator_mc.theGoalY = _root["nav" + n]._y;
stage.target_x = p_array[n];
_root.inited = n;
if (content_mc["story" + n].video == undefined)
{
thebutton._y = -1800;
}
else
{
thebutton._y = 6;
} // end if
stage.masker.gotoAndPlay(1);
_root.photo_credit = content_mc["story" + n].photocaption;
delete headline_txt;
delete content_txt;
var _l3 = new TextFormat();
_l3.font = "隶书";
_l3.color = 16777215;
var _l4 = new TextFormat();
_l4.font = "隶书";
_l4.size = 2;
_l4.leading = -1;
_l4.color = 16777215;
_root.headline_txt.removeTextField();
_root.content_txt.removeTextField();
_root.createTextField("headline_txt", _root.getNextHighestDepth(), 100, 1000, 400, 48);
_root.createTextField("content_txt", _root.getNextHighestDepth(),8,-10000 ,400, 20);
content_txt.textColor = 0x000000;
content_txt.background = true;
content_txt.backgroundColor = 0xffffff;
content_txt.border = true;
content_txt.borderColor = 0xff0000;
if (content_mc["story" + n].captionlines + "" == "1")
{
_l3.size = 64;
}
else if (content_mc["story" + n].captionlines + "" == "2")
{
trace("2");
_l3.size = 46;
content_txt._y = 0;
_root.content_txt.wordWrap = true;
_root.content_txt.autoSize = true;
_root.content_txt.multiline = true;
}
else if (content_mc["story" + n].captionlines + "" == "3")
{
trace("3");
_l3.size = 36;
content_txt._y = 1000;
_root.content_txt.wordWrap = true;
_root.content_txt.autoSize = true;
_root.content_txt.multiline = true;
}
else if (content_mc["story" + n].captionlines + "" == "4")
{
trace("4");
_l3.size = 26;
content_txt._y = 325;
_root.content_txt.wordWrap = true;
_root.content_txt.autoSize = true;
_root.content_txt.multiline = true;
} // end if
_root.contentarea.selectable = true
_root.headline_txt.html = true;
_root.headline_txt.embedFonts = true;
_root.content_txt.html = true;
_root.contentarea.embedFonts = false;
_root.headline_txt.setNewTextFormat(_l3);
_root.content_txt.setNewTextFormat(_l4);
_root.content_txt.styleSheet = _root.my_styleSheet;
_root.headline_txt.htmlText = content_mc["story" + n].headline;
_root.content_txt.htmlText = content_mc["story" + n].thecaption;
if (!_root.pausemovie)
{
_root.starttimer();
} // end if
};
topstory_xml.load("/nba_2006_topstory.xml");
stop();