/* * nicoscreen3, version: 0.1 (2011-07-11) * * * For usage and examples, visit: * http://nicoscreen3.r9game.com * * Licensed under the MIT: * http://www.opensource.org/licenses/mit-license.php * * Copyright (c) 2011, Shikemoku.MK (shikemoku.mk -[at]- gmail [*dot*] com) */ function nicoscreen3obj(o) { var f = nicoscreen3obj.f, i, len, n, prop; f.prototype = o; n = new f; for (i=1, len=arguments.length; i= n.comments.length) { if(n.env.loop) n.draw_index = 0; return false; } comment_str = n.comments[i]; n.draw_index++; } n.top_pos = Math.floor( Math.random() * parseInt(n.env.height) ); var end_left = (parseInt(n.env.width)) * -1; var cmid = "cm" + i + ""; var com_obj = $("
" + comment_str + "
"); $("#nicoscreen3").append(com_obj); (function(that){ var tmp_cmid = cmid; com_obj.animate({ left: end_left }, { duration: n.env.speed, complete: function(){ var elm_id = "#" + tmp_cmid; $("#nicoscreen3").remove(elm_id); that.top_pos = 10; } }); })(this); }, add:function(str){ this.draw(str); } }; var nicoscreen3 = nicoscreen3obj(r9.nicoscreen3);