2,278
社区成员




<?xml version='1.0' encoding='utf-8'?>
<fileList>
<filesList category_id="20060215162232-218467" product_id="20060216113405-452303" fileName="file/index/img-20060216113405-452303.jpg" /><filesList category_id="20060215162232-218467" product_id="20060217153046-672603" fileName="file/index/img-20060217153046-672603.jpg" /><filesList category_id="20060220165702-154985" product_id="20060221161457-809446" fileName="file/index/img-20060221161457-809446.jpg" /><filesList category_id="20060220165722-042503" product_id="20060227191806-230237" fileName="file/index/img-20060227191806-230237.jpg" /><filesList category_id="20060215162232-218467" product_id="20060227192026-051553" fileName="file/index/img-20060227192026-051553.jpg" /><filesList category_id="20060220165708-806439" product_id="20060323161307-078498" fileName="file/index/img-20060323161307-078498.jpg" /><filesList category_id="20060215162232-218467" product_id="20060323161430-473719" fileName="file/index/img-20060323161430-473719.jpg" /><filesList category_id="20060220165653-729594" product_id="20060323161544-636249" fileName="file/index/img-20060323161544-636249.jpg" /><filesList category_id="20060220165722-042503" product_id="20081018104830-183440" fileName="file/index/img-20081018104830-183440.jpg" /><filesList category_id="20060220165722-042503" product_id="20060328161602-372483" fileName="file/index/img-20060328161602-372483.jpg" /><filesList category_id="20060220165722-042503" product_id="20060410144504-821017" fileName="file/index/img-20060410144504-821017.jpg" /><filesList category_id="20060220165708-806439" product_id="20060418143414-553070" fileName="file/index/img-20060418143414-553070.jpg" />
</fileList>
class as.randomImage extends MovieClip
{
var _name, loaderTotal, max, min, frameRate, randProcedure, nowEndLoader, mclListener, loaderShowNumber, nowLoaderComplete, loaderShowArray, category_idGoTo, project_idGoTo;
function randomImage()
{
super();
} // End of the function
function onLoad()
{
loaderTotal = Number(_name.substr(20, 1));
if (loaderTotal == 8)
{
max = loaderTotal / 2 + 1;
min = 2;
}
else
{
max = loaderTotal / 2;
min = 1;
} // end else if
frameRate = 2;
randProcedure = new as.randomProcedure();
nowEndLoader = 0;
mclListener = new Object();
mclListener.onLoadComplete = movieClipLoadCompleteFun;
loaderShowNumber = this.startImageChg(this, randProcedure);
} // End of the function
function startImageChg(targetMovieClip, randProcedure)
{
var _loc6 = new MovieClipLoader();
var _loc8 = new MovieClipLoader();
_loc6.addListener(mclListener);
var _loc7 = Math.round(Math.random() * (max - min)) + min;
var _loc5 = new Array();
if (_root.xmlIntroImage.firstChild.childNodes.length < _loc7)
{
return (0);
} // end if
nowLoaderComplete = 0;
loaderShowArray = new Array();
loaderShowArray = randProcedure.getRandomResult(1, loaderTotal, _loc7);
_loc5 = randProcedure.getRandomResult(0, _root.xmlIntroImage.firstChild.childNodes.length - 1, _loc7);
for (var _loc3 = 1; _loc3 <= loaderTotal; ++_loc3)
{
targetMovieClip["imageLoader" + _loc3].onRelease = null;
targetMovieClip["imageLoader" + _loc3].useHandCursor = false;
} // end of for
for (var _loc3 = 0; _loc3 < loaderShowArray.length; ++_loc3)
{
if (loaderTotal == 8)
{
targetMovieClip["imageLoader" + loaderShowArray[_loc3]].onRelease = imageRelease;
}
else
{
targetMovieClip["imageLoader" + loaderShowArray[_loc3]].onRelease = imageReleaseIntro;
} // end else if
targetMovieClip["imageLoader" + loaderShowArray[_loc3]].useHandCursor = true;
targetMovieClip["imageLoader" + loaderShowArray[_loc3]].category_idGoTo = _root.xmlIntroImage.firstChild.childNodes[_loc5[_loc3]].attributes.category_id;
targetMovieClip["imageLoader" + loaderShowArray[_loc3]].project_idGoTo = _root.xmlIntroImage.firstChild.childNodes[_loc5[_loc3]].attributes.product_id;
targetMovieClip["imageLoader" + loaderShowArray[_loc3]].imageLoader.createEmptyMovieClip("image_mc", 1);
_loc6.loadClip(_root.fullPath + _root.xmlIntroImage.firstChild.childNodes[_loc5[_loc3]].attributes.fileName, targetMovieClip["imageLoader" + loaderShowArray[_loc3]].imageLoader.image_mc);
trace(_root.fullPath + _root.xmlIntroImage.firstChild.childNodes[_loc5[_loc3]].attributes.fileName);
if (loaderShowArray[_loc3] >= loaderTotal / 2 + 1)
{
targetMovieClip._parent["imageLoader" + loaderShowArray[_loc3] + "_shadow"].imageLoader.createEmptyMovieClip("image_mc", 1);
_loc6.loadClip(_root.fullPath + _root.xmlIntroImage.firstChild.childNodes[_loc5[_loc3]].attributes.fileName, targetMovieClip._parent["imageLoader" + loaderShowArray[_loc3] + "_shadow"].imageLoader.image_mc);
} // end if
} // end of for
return (_loc7);
} // End of the function
function imageRelease()
{
_root.subMenuAppear = true;
_root.back2 = true;
_level0.category_id = category_idGoTo;
_level0.project_id = project_idGoTo;
_root.gotoAndPlay("pdetail");
_root.menu.gotoAndPlay("subCategoryLoad");
} // End of the function
function imageReleaseIntro()
{
_level0.category_id = category_idGoTo;
_level0.project_id = project_idGoTo;
_level0.fromIntro = true;
_level0.pageName = "project.swf";
_root.gotoAndPlay("selfClose");
} // End of the function
function movieClipLoadCompleteFun(target_mc)
{
++target_mc._parent._parent._parent.nowLoaderComplete;
if (target_mc._parent._parent._parent.nowLoaderComplete >= target_mc._parent._parent._parent.loaderShowNumber)
{
for (var _loc2 = 0; _loc2 < target_mc._parent._parent._parent.loaderShowArray.length; ++_loc2)
{
target_mc._parent._parent._parent["imageLoader" + target_mc._parent._parent._parent.loaderShowArray[_loc2]].gotoAndPlay(target_mc._parent._parent._parent.max * target_mc._parent._parent._parent.frameRate - _loc2 * target_mc._parent._parent._parent.frameRate);
if (target_mc._parent._parent._parent.loaderShowArray[_loc2] >= target_mc._parent._parent._parent.loaderTotal / 2 + 1)
{
target_mc._parent._parent._parent._parent["imageLoader" + target_mc._parent._parent._parent.loaderShowArray[_loc2] + "_shadow"].gotoAndPlay(target_mc._parent._parent._parent.max * target_mc._parent._parent._parent.frameRate - _loc2 * target_mc._parent._parent._parent.frameRate);
} // end if
} // end of for
} // end if
} // End of the function
} // End of Class