Flash广告也能挣钱

今天收邮件的时候发现,有个叫闪告网网站给我发来邀请,说是只要将他们的as代码加入我的动画首帧,就能自定义发布广告,并对我的flash动画进行分布统计,感觉这个创意不错,于是去了解了一下,还真的不错,愧于对flashcs不是很了解,目前只是猜到是用嵌入第一帧的as将观看flash动画的客户的ip地址或其他信息发布到闪告网的指定统计页面,进行记录实现对动画的浏览统计功能,看来还需要进一步的分析其原理,不过的确是个不错的创意,弄完Flash收藏家这个项目后,我再进一步研究一下!
暂时挂起。。。
分析出的as代码如下:
var FLASHADS = {};
FLASHADS.id = “77645fb8f86b3415a00066046648d8fe”;
FLASHADS.version = “0.8”;
FLASHADS.width = Number(“550”);
FLASHADS.height = Number(“400”);
FLASHADS.hostName = “http://serv.flashads.cn/resolve2.swf”;
FLASHADS.allowDomain = “serv.flashads.cn”;
FLASHADS.root = this;
FLASHADS.popLoaded = false;
FLASHADS.bAllowExit = true;
FLASHADS.loadingPer = 0;
FLASHADS.bAd = Number(“1”);
System.security.allowDomain(FLASHADS.allowDomain);
System.security.allowInsecureDomain(FLASHADS.allowDomain);
if (System.security.sandboxType != “localWithFile”)
{
FLASHADS.nDepth = FLASHADS.root.getNextHighestDepth();
FLASHADS.mcFLASHADSLoading = FLASHADS.root.createEmptyMovieClip(“mcFLASHADSLoading”, FLASHADS.nDepth);
FLASHADS.nDepth = FLASHADS.root.getNextHighestDepth();
FLASHADS.mcFLASHADSLoader = FLASHADS.root.createEmptyMovieClip(“mcFLASHADSLoader”, FLASHADS.nDepth);
FLASHADS.nDepth = FLASHADS.root.getNextHighestDepth();
FLASHADS.mcPreloader = FLASHADS.root.createEmptyMovieClip(“mcFLASHADSPreoader”, FLASHADS.nDepth);
FLASHADS.mcPreloaderBar = FLASHADS.mcPreloader.createEmptyMovieClip(“mcPreloaderBar”, 1);
FLASHADS.mcPreloaderBar._x = FLASHADS.width / 2;
if (FLASHADS.bAd == 0)
{
FLASHADS.mcFLASHADSLoading._visible = false;
FLASHADS.mcFLASHADSLoader._visible = false;
FLASHADS.mcPreloader._visible = false;
}
else
{
FLASHADS.root.stop();
FLASHADS.mcPreloader.onPress = function ()
{
getURL(“http://www.flashads.cn/”, “_blank”);
};
} // end if
FLASHADS.drawManage = function (_mc, _aCoord, _oStyle, _oFillStyle)
{
var _l5 = _mc;
var _l2 = _aCoord;
_l5.lineStyle(_oStyle.thickness, _oStyle.rgb, _oStyle.alpha);
var _l4 = _l2[0].x;
var _l3 = _l2[0].y;
_l5.moveTo(_l4, _l3);
_l5.beginFill(_oFillStyle.rgb, _oFillStyle.alpha);
var _l6 = _l2.length;
var _l1 = 1;
while (_l1 < _l6) { _l4 = _l2[_l1].x; _l3 = _l2[_l1].y; _l5.lineTo(_l4, _l3); _l1++; } // end while _l5.endFill(); }; FLASHADS.drawRectangle = function (_mc, _ox, _oy, _w, _h, _oStyle, _oFillStyle) { var _l2 = []; _l2.push({x: _ox, y: _oy}); _l2.push({x: _ox + _w, y: _oy}); _l2.push({x: _ox + _w, y: _oy + _h}); _l2.push({x: _ox, y: _oy + _h}); _l2.push({x: _ox, y: _oy}); this.drawManage(_mc, _l2, _oStyle, _oFillStyle); }; FLASHADS.extraWidth = 50; FLASHADS.prloadHeight = 20; FLASHADS.prloadBarHeight = 2; FLASHADS.lineStyle = {thickness: 0, alpha: 0, rgb: 0}; FLASHADS.preloadBgStyle = {rgb: 0, alpha: 100}; FLASHADS.preloadBarStyle = {rgb: 16763904, alpha: 100}; FLASHADS.drawPreloadMc = function () { this.drawRectangle(this.mcPreloader, -this.extraWidth, this.height - this.prloadHeight, this.extraWidth * 2 + this.width, this.prloadHeight, this.lineStyle, this.preloadBgStyle); this.drawRectangle(this.mcPreloaderBar, -1, this.height - this.prloadBarHeight - 8, 2, this.prloadBarHeight, this.lineStyle, this.preloadBarStyle); }; FLASHADS.drawPreloadMc(); FLASHADS.FLASHADSExit = function () { clearInterval(FLASHADS.exitInter); FLASHADS.mcFLASHADSLoader._alpha = FLASHADS.mcFLASHADSLoader._alpha - 5; FLASHADS.mcPreloader._alpha = FLASHADS.mcPreloader._alpha - 5; if (FLASHADS.mcPreloader._alpha >= 0)
{
FLASHADS.exitInter = setInterval(FLASHADS, “FLASHADSExit”, 30);
updateAfterEvent();
}
else
{
clearInterval(FLASHADS.loadInter);
FLASHADS.root.bFLASHADSRanFlg = true;
FLASHADS.mcFLASHADSLoader.swapDepths(0);
FLASHADS.mcFLASHADSLoader.removeMovieClip();
FLASHADS.mcPreloader.swapDepths(0);
FLASHADS.mcPreloader.removeMovieClip();
if (FLASHADS.bAd == 1)
{
if (FLASHADS.root.bFLASHADSLoadedFlg)
{
FLASHADS.root.play();
} // end if
} // end if
} // end if
};
FLASHADS.FLAPOPStartExit = function ()
{
clearInterval(this.preloadInter);
FLASHADS.exitInter = setInterval(FLASHADS, “FLASHADSExit”, 30);
};
FLASHADS.stopExit = function ()
{
FLASHADS.bAllowExit = false;
};
if (FLASHADS.root.bFLASHADSRanFlg)
{
FLASHADS.FLAPOPStartExit();
return(undefined);
} // end if
FLASHADS.timeoutTime = 8000;
FLASHADS.preloadDtime = 30;
FLASHADS.preloadBarWidth = FLASHADS.width – 20;
FLASHADS.preloading = function ()
{
clearInterval(this.preloadInter);
var _l4 = this.preloadBarWidth * (this.preloadDtime / this.timeoutTime);
var _l3 = this.mcPreloaderBar._width + _l4;
var _l2 = FLASHADS.preloadBarWidth * FLASHADS.loadingPer / 100;
if (_l3 < _l2) { this.mcPreloaderBar._width = _l3; } else { this.mcPreloaderBar._width = _l2; } // end if if (this.mcPreloaderBar._width < this.preloadBarWidth) { this.preloadInter = setInterval(this, "preloading", this.preloadDtime); updateAfterEvent(); } else if (FLASHADS.bAllowExit) { this.FLAPOPStartExit(); } // end if }; FLASHADS.preloading(); FLASHADS.lc = new LocalConnection(); FLASHADS.lcName = "_" + new Date().getTime() + "_" + Math.floor(Math.abs(FLASHADS.root._xmouse * 100)) + "_" + Math.floor(Math.abs(FLASHADS.root._ymouse * 100)) + "_" + Math.floor(Math.random() * 9999999999.000000); FLASHADS.lc.allowDomain = function (sDomain) { return(FLASHADS.allowDomain == sDomain); }; FLASHADS.lc.allowInsecureDomain = FLASHADS.lc.allowDomain; FLASHADS.lc.popExit = function () { FLASHADS.bAllowExit = true; if (FLASHADS.root.bFLASHADSLoadedFlg) { FLASHADS.FLAPOPStartExit(); } // end if }; FLASHADS.lc.FLAPOPStartExit = function () { clearInterval(this.preloadInter); FLASHADS.exitInter = setInterval(FLASHADS, "FLASHADSExit", 30); }; FLASHADS.lc.connect(FLASHADS.lcName); FLASHADS.lc.onStatus = function (oStatus) { }; FLASHADS.sendValue = {}; FLASHADS.sendValue.id = FLASHADS.id; FLASHADS.sendValue.version = FLASHADS.version; FLASHADS.sendValue.lcName = FLASHADS.lcName; FLASHADS.sendValue.url = FLASHADS.root._url; FLASHADS.sendValue.width = FLASHADS.width; FLASHADS.sendValue.height = FLASHADS.height; FLASHADS.sendValue.size = FLASHADS.root.getBytesTotal(); FLASHADS.sendValue.bAd = FLASHADS.bAd; loadMovie(FLASHADS.hostName, FLASHADS.mcFLASHADSLoader, "POST"); FLASHADS.checkLoad = function () { if (FLASHADS.mcFLASHADSLoader.bLoadSucceed) { FLASHADS.popLoaded = true; FLASHADS.stopExit(); clearInterval(FLASHADS.loadInter); FLASHADS.mcFLASHADSLoader.getPopValue(FLASHADS.sendValue.id, FLASHADS.sendValue.version, FLASHADS.sendValue.lcName, FLASHADS.sendValue.url, FLASHADS.sendValue.width, FLASHADS.sendValue.height, FLASHADS.sendValue.size, FLASHADS.sendValue.bAd); } // end if }; FLASHADS.loadInter = setInterval(FLASHADS, "checkLoad", 50); FLASHADS.mcFLASHADSLoading.onEnterFrame = function () { var _l2 = FLASHADS.root.getBytesLoaded(); var _l1 = FLASHADS.root.getBytesTotal(); FLASHADS.loadingPer = Math.floor(_l2 / _l1 * 100); if (FLASHADS.loadingPer == 100) { FLASHADS.root.bFLASHADSLoadedFlg = true; FLASHADS.mcFLASHADSLoading.onEnterFrame = null; FLASHADS.mcFLASHADSLoading.swapDepths(0); FLASHADS.mcFLASHADSLoading.removeMovieClip(); } // end if }; } // end if trace("FlashADS安装成功!");

赞(0) 打赏
分享到: 更多 (0)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏