forked from: Planetarium
/**
* Copyright rafomac ( http://wonderfl.net/user/rafomac )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/1WI9
*/
//----------------------------------------------------------------------
//Symbol 9 MovieClip Frame 1
//----------------------------------------------------------------------
hd2.autoSize = true;
//----------------------------------------------------------------------
//Symbol 14 MovieClip Frame 1
//----------------------------------------------------------------------
this.onEnterFrame = function () {
logo.logo._x = 111 - (logo.logo._width / 2);
if (logo.logo._width != 0) {
}
};
//----------------------------------------------------------------------
//Symbol 20 MovieClip Frame 1
//----------------------------------------------------------------------
stop();
xml = new XML();
xml.ignoreWhite = true;
xml.load("C:/pixcom/Elevision/News/elevision_news.xml");
xml.onLoad = function (success) {
if (success) {
n = xml.childNodes[0].childNodes.length;
_root.newsv = 1;
}
};
//----------------------------------------------------------------------
//Symbol 18 MovieClip Frame 1
//----------------------------------------------------------------------
stop();
xml3 = new XML();
xml3.ignoreWhite = true;
xml3.load("C:/pixcom/Elevision/Building_Name.xml");
xml3.onLoad = function (success) {
if (success) {
bn = xml3.childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes;
bid = xml3.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes;
}
};
xml = new XML();
xml.ignoreWhite = true;
xml.load("C:/pixcom/Elevision/message_V2.xml");
xml.onLoad = function (success) {
if (success) {
n = xml.childNodes[0].childNodes.length;
if (n == 0) {
_root.nv = new Array("n", "n", "n", "n", "n", "n");
} else {
_root.nv = new Array("m", "n", "n", "n", "n", "n");
}
_root.msgv = 1;
}
};
//----------------------------------------------------------------------
//Frame 1
//----------------------------------------------------------------------
user_so = SharedObject.getLocal("MSK");
news.news.hd2.lg._visible = 0;
if (user_so.data.news != undefined) {
} else {
user_so.data.news = -1;
}
if (user_so.data.msg != undefined) {
} else {
user_so.data.msg = -1;
}
if (user_so.data.arraycount != undefined) {
} else {
user_so.data.arraycount = -1;
}
i = 0;
nqv = 1;
pv = 360;
tm = 0;
k = Number(String(user_so.data.arraycount));
tot = Math.floor((pv * 75) / 100);
_root.newsn = user_so.data.news;
_root.msgn = user_so.data.msg;
newstimes = 0;
msgtimes = 0;
var nv;
_root.msgv = 0;
_root.newsv = 0;
this.onEnterFrame = function () {
if ((_root.msgv == 1) and (_root.newsv == 1)) {
i++;
if (i == tot) {
user_so.data.news = _root.newsn;
user_so.data.msg = _root.msgn;
user_so.data.arraycount = k;
}
if (i == pv) {
i = 0;
}
if (i == 5) {
k++;
kn = nv.length;
if (k == kn) {
k = 0;
}
sv = nv[k];
if (sv == "n") {
_root.newsn++;
if (_root.newsn >= _root.newsp.n) {
newstimes++;
if (newstimes == 2) {
_root.newsp.gotoAndStop(2);
if (_root.nomsg == 1) {
_root.msg.gotoAndStop(2);
msgtimes = 0;
_root.msgv = 0;
}
newstimes = 0;
_root.newsv = 0;
}
_root.newsn = 0;
}
xml = new XML(_root.newsp.xml);
trace(_root.newsn);
newshead = xml.childNodes[0].childNodes[_root.newsn].childNodes[5];
newsdet = String(xml.childNodes[0].childNodes[_root.newsn].childNodes[6]);
pv1 = String(xml.childNodes[0].childNodes[_root.newsn].childNodes[6].childNodes).length;
if (pv1 <= 50) {
pv = 240;
}
if ((pv1 > 50) and (pv1 <= 100)) {
pv = 288;
}
if ((pv1 > 100) and (pv1 <= 150)) {
pv = 312;
}
if ((pv1 > 150) and (pv1 <= 200)) {
pv = 360;
}
if (pv1 > 200) {
pv = 408;
}
tot = Math.floor((pv * 75) / 100);
newstype = xml.childNodes[0].childNodes[_root.newsn].childNodes[10].childNodes;
logo = xml.childNodes[0].childNodes[_root.newsn].childNodes[11].childNodes;
news.news.hd1.hd1.html = true;
news.news.hd2.hd1.html = true;
news.news.hd2.hd2.html = true;
news.news.hd1.hd1.htmlText = newstype;
news.news.hd2.hd1.htmlText = newshead;
news.news.hd2.hd2.htmlText = newsdet;
news.news.hd2.hd1.autoSize = true;
news.news.hd2.hd2.autoSize = true;
news.news.hd2.hd2._y = news.news.hd2.hd1._height + 10;
news.news.hd2.lg._visible = 0;
var _local2 = new TextFormat();
_local2.leading = 0;
news.news.hd2.hd2.setTextFormat(_local2);
news.news.hd1.logo.logo.loadMovie(("C:/Pixcom/Elevision/images/news_icons/News_Icon" + logo) + ".png");
} else {
_root.msgn++;
if (_root.msgn >= _root.msg.n) {
msgtimes++;
if (msgtimes == 2) {
_root.msg.gotoAndStop(2);
msgtimes = 0;
_root.msgv = 0;
}
_root.msgn = 0;
}
xml2 = new XML(_root.msg.xml);
newshead = xml2.childNodes[0].childNodes[_root.msgn].childNodes[5];
newsdet = xml2.childNodes[0].childNodes[_root.msgn].childNodes[6];
pv = 360;
tot = Math.floor((pv * 75) / 100);
newstype = xml2.childNodes[0].childNodes[_root.msgn].childNodes[10].childNodes;
logo = xml2.childNodes[0].childNodes[_root.msgn].childNodes[11].childNodes;
news.news.hd1.hd1.html = true;
news.news.hd2.hd1.html = true;
news.news.hd2.hd2.html = true;
news.news.hd1.hd1.htmlText = _root.msg.bn + " News";
news.news.hd2.hd1.htmlText = newshead;
news.news.hd2.hd2.htmlText = newsdet;
news.news.hd2.hd1.autoSize = true;
news.news.hd2.hd2.autoSize = true;
news.news.hd2.hd2._y = news.news.hd2.hd1._height + 10;
news.news.hd2.lg._visible = 1;
}
}
}
};
//----------------------------------------------------------------------
//Symbol 20 MovieClip Frame 2
//----------------------------------------------------------------------
_root.newsv = 0;
gotoAndStop (1);
//----------------------------------------------------------------------
//Symbol 18 MovieClip Frame 2
//----------------------------------------------------------------------
_root.msgv = 0;
gotoAndStop (1);
//----------------------------------------------------------------------
//Frame 2
//----------------------------------------------------------------------
gotoAndStop (1);