Author: Dickmao
As code:
Copy Code code as follows:
Design by Dickmao 2007.1
Fscommand ("ShowMenu", "false");
Import mx.managers.depthmanager;//Load Class
Item = 1;//counter, load the number of animations
var mcllistener = new Object ()//listener listening for load completion
var mcloader = new Moviecliploader ()//new container to load animation
Mcloader.addlistener (Mcllistener);
function attachflv () {//define method to load animation
Mcloader.loadclip (Myarray[item-1], this["B" +item].box.sit);/Load Animation (MyArray is an array of animation names)
this["B" +item].box._visible = false;//The animated animation is not visible before it is fully loaded and then becomes visible
this["B" +item].box.sit._x = -54;//defines where the animation is loaded
this["B" +item].box.sit._y =-39;
this["B" +item].box._xscale = 0;
this["B" +item].box._yscale = 0;
this["B" +item].loadbar._visible = true;//loading the visible of the bar is set to True
this["B" +item].textbar.itemname.text = namearray[item-1];//Read the title of the animation
this["B" +item].textbar.itemname.settextformat (FNF);//Set Caption Text property to "FNF", FNF is defined below
this["B" +item].textbar.itemname._visible = false;//Set Title not visible
}
Mcllistener.onloadinit = function () {//Set listener method to load complete
if (item<flvtotal) {//When counter is less than the total number of animations
item++;//Current one animation load complete, counter plus one,
ATTACHFLV ()//Continue Loading
}
};
var FNF = new TextFormat ();//define Properties for FNF
fnf.align = "center";//Center
Fnf.size = "9";//9px Word
Fnf.color = 0xffffff;//White
var xarray = new Array ()//Declaration array, used to store the unknown of each small screen
var yarray = new Array ();
var flvtotal;
_global.myxml = new XML ()///Declaring global variables: getting ready to communicate with XML files
Myxml.ignorewhite = true;
Myxml.load ("Http://vod.cntvs.com/video/videowall/list1.xml");//What document do you want to read?
_global.myarray = new Array ();//arrays containing animated names
_global.namearray = new Array ();//arrays of animated titles
_global.linkarray = new Array ();//arrays containing linked addresses
Myxml.onload = function () {//Load XML method
var e = myxml.firstchild.childnodes;//assigns content in XML to E
Flvtotal = e.length;//How many contents are there? Assign value to Flvtotal.
for (var i = 0; i<flvtotal; i++) {
Myarray.push (e[i].attributes["title");//put the title tag content in the XML file into the MyArray array
Namearray.push (e[i].attributes["name");//put the name tag content in the XML file into the NameArray array
Linkarray.push (e[i].attributes["link");//put the link tag content in the XML file into the Linkarray array
}
ATTACHFLV ()//starts loading the first animation because it only executes once
};
/////////////////////////////////////////////////////////////////////////////////
for (var i = 1; i<=35; i++) {//This is the beginning of the block, no explanation.
Butt = Attachmovie ("button", "B" +i, i);
Butt.loadbar._visible = false;
if ((i>=1) && (i<=7)) {
butt._x = 116+81*i;
butt._y = 40-2;
}
if ((i>=8) && (i<=14)) {
butt._x = 116+81* (i-7);
butt._y = 101-2;
}
if ((i>=15) && (i<=21)) {
butt._x = 116+81* (i-14);
butt._y = 162-2;
}
if ((i>=22) && (i<=28)) {
butt._x = 116+81* (i-21);
butt._y = 223-2;
}
if ((i>=29) && (i<=35)) {
butt._x = 116+81* (i-28);
butt._y = 284-2;
}
Xarray.push (butt._x)//The unknown to each small screen to tell the array, recorded
Yarray.push (butt._y);
BUTT.N = i;//A number for small screen, after easy to find.
Butt.onrollover = over;//performs function over when small screen is passed by mouse
Butt.onrollout = out;//similar to above
Butt.onrelease = rele;//or similar to the above
}
function over () {///How to execute when the mouse is over a small screen
_root.pressnumber = this.n;//What small screen does the mouse point to? The number on the front is handy.
Onenterframe = function () {
_root["B" +pressnumber].setdepthto (depthmanager.ktop); Put the small screen to the front. Other screen watches are blocked.
_root["B" +pressnumber]._xscale = 150-(150-_root["B" +pressnumber]._xscale) *.6;//enlarge small Screen
_root["B" +pressnumber]._yscale = 150-(150-_root["B" +pressnumber]._yscale) *.6;
_root["Player" +pressnumber]._xscale = 150-(150-_root["Player" +pressnumber]._xscale) *.6;//content to be enlarged
_root["Player" +pressnumber]._yscale = 150-(150-_root["Player" +pressnumber]._yscale) *.6;
for (var i = 1; i<36; i++) {//below is to get the little screen back.
if (I<>_root.pressnumber) {
_root["B" +i]._xscale = 100-(100-_root["B" +i]._xscale) *.6;
_root["B" +i]._yscale = 100-(100-_root["B" +i]._yscale) *.6;
_root["B" +i]._x = xarray[i-1]-(xarray[i-1]-_root["B" +i]._x) *.6;
_root["B" +i]._y = yarray[i-1]-(yarray[i-1]-_root["B" +i]._y) *.6;
}
}
if (_root["B" +pressnumber]._x<238) {//below is to allow the screen on the edge to enlarge, don't run out of the box.
_root["B" +pressnumber]._x = 217-(217-_root["B" +pressnumber]._x) *.6;
}
if (_root["B" +pressnumber]._x>650) {
_root["B" +pressnumber]._x = 663-(663-_root["B" +pressnumber]._x) *.6;
}
if (_root["B" +pressnumber]._y<60) {
_root["B" +pressnumber]._y = 53-(53-_root["B" +pressnumber]._y) *.6;
}
if (_root["B" +pressnumber]._y>260) {
_root["B" +pressnumber]._y = 267-(267-_root["B" +pressnumber]._y) *.6;
}
};
}
function out () {///the method to execute when the mouse leaves the small screen
Onenterframe = function () {
for (var i = 1; i<=36; i++) {//All return!
_root["B" +i]._xscale = 100-(100-_root["B" +i]._xscale) *.6;
_root["B" +i]._yscale = 100-(100-_root["B" +i]._yscale) *.6;
_root["B" +i]._x = xarray[i-1]-(xarray[i-1]-_root["B" +i]._x) *.6;
_root["B" +i]._y = yarray[i-1]-(yarray[i-1]-_root["B" +i]._y) *.6;
}
};
}
function Rele () {//How to execute when mouse clicks on small screen
_root.pressnumber = THIS.N;
GetURL (Linkarray[pressnumber-1], "_blank");
}
XML List File
Copy Code code as follows:
<?xml version= "1.0" encoding= "Utf-8"?>
<flvLists>
<item title= "http://vod.cntvs.com/video/videowall/item/bahentie-second.swf" name= Brandon Scar Paste "link=" http:// Www.cntvs.com/Product_detail.asp?ID=25 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/dazuifuzhu-second.swf" name= "Big Mouth fu Pig" link= "http://" Www.cntvs.com/Product_detail.asp?ID=99 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/dv9800-second.swf" name= "Beauty Easy to beat DV9800" link= "http://" Www.cntvs.com/Product_detail.asp?ID=13 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/fuguixing-second.swf" name= "rich star smokeless pot" link= "http://" Www.cntvs.com/Product_detail.asp?ID=30 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/null.swf" name= "U8" Back Back Good "link=" http://www.cntvs.com/ Product_detail.asp?id=85 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/jianzhangle-second.swf" name= "Kin changle capsule" link= "http:// Www.cntvs.com/Product_detail.asp?ID=94 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/null.swf" name= "08 edition back Back Good" link= "http://www.cntvs.com/ Product_detail.asp?id=86 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/jipinguowang-second.swf" name= "best Pot King" link= "http://" Www.cntvs.com/Product_detail.asp?ID=36 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/lewanjia-second.swf" name= "le million home smokeless pot" link= "http://" Www.cntvs.com/Product_detail.asp?ID=32 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/liangliting (Neiku)-second.swf" name= "Liang Li Ting Underwear" link= "http ://www.cntvs.com/product_detail.asp?id=26 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/null.swf" name= "U9" Back Back Good "link=" http://www.cntvs.com/ Product_detail.asp?id=84 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/liangliting (Neiyi)-second.swf" name= "Liang Li Ting Underwear" link= "http ://www.cntvs.com/product_detail.asp?id=28 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/duoduoxian-second.swf" name= "a lot of fresh preservation box" link= "http:// Www.cntvs.com/Product_detail.asp?ID=41 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/liangliting (Taozhuang)-second.swf" name= "Liang Li Ting Set" link= " Http://www.cntvs.com/Product_detail.asp?ID=10 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/liangliting (Zhongku)-second.swf" name= "Liang Li Ting Pants" link= " Http://www.cntvs.com/Product_detail.asp?ID=12 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/qingfengcheying-second.swf" Name= "The Wind Car Shadow" link= "http://" Www.cntvs.com/Product_detail.asp?ID=15 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/quban-second.swf" name= Brandon Whitening Freckle "link=" http:// Www.cntvs.com/Product_detail.asp?ID=20 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/null.swf" name= "more dense Hair" link= "http://www.cntvs.com/Product" _detail.asp?id=27 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/null.swf" name= "green power chewable tablets" link= "http://www.cntvs.com/ Product_detail.asp?id=98 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/qudou-second.swf" name= Brandon Acne Combination "link=" http:// Www.cntvs.com/Product_detail.asp?ID=21 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/xueyitong-second.swf" name= "learning Yi Tong Electronic Teacher" link= "http:// Www.cntvs.com/Product_detail.asp?ID=11 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/renshenwen-second.swf" Name= "Brandon" link= Www.cntvs.com/Product_detail.asp?ID=22 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/tingcai-second.swf" name= "Ting Slimming Liang Yan" link= "http:// Www.cntvs.com/Product_detail.asp?ID=40 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/null.swf" name= "thin Son" link= "http://www.cntvs.com/Product_" Detail.asp?id=52 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/tingzi-second.swf" name= "posture Correction belt" link= "http:// Www.cntvs.com/Product_detail.asp?ID=43 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/xianliting-second.swf" name= "fiber Li Ting Orthopedic underwear" link= "http:// Www.cntvs.com/Product_detail.asp?ID=42 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/xuexizhen-second.swf" name= "Good student Learning Pillow" link= "http://" Www.cntvs.com/Product_detail.asp?ID=93 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/null.swf" name= "Can bell bionic mask paste" link= "http://www.cntvs.com/ Product_detail.asp?id=37 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/null.swf" name= "Federal Yoyo" link= "http://www.cntvs.com/" Product_detail.asp?id=46 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/yilaida-second.swf" Name= "Eliza Rose Lip Pen" link= "http:// Www.cntvs.com/Product_detail.asp?ID=18 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/zaiqingchun-second.swf" name= "again Qing Chun" link= "http://" Www.cntvs.com/Product_detail.asp?ID=29 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/zhoujixiao-second.swf" name= "Brandon Wrinkle Combination" link= "http://" Www.cntvs.com/Product_detail.asp?ID=24 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/liduofangzhou-second.swf" Name= "tentanyl droperidol Ark" link= Www.cntvs.com/Product_detail.asp?ID=14 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/null.swf" name= "link=" like smoke and electronic smoke http://www.cntvs.com/ Product_detail.asp?id=87 "/>
<item title= "http://vod.cntvs.com/video/videowall/item/null.swf" Name= "Tang Longan Kangyi" link= "http://www.cntvs.com/" Product_detail.asp?id=92 "/>
</flvLists>
Package file Download