Difference between revisions of "Logo.as"
(ball behind to test) |
(revert back to proper logo code) |
||
Line 1: | Line 1: | ||
− | + | id0 = 1; | |
− | + | changes = []; | |
− | + | change = false; | |
+ | nchanges = 10; | ||
+ | offset = -200; | ||
− | + | // Set up async connection with server | |
+ | server = new LoadVars(); | ||
+ | server.title = 'RC-Summary'; // wiki page to request | ||
+ | server.onLoad = function(success) { | ||
+ | if (success) { | ||
+ | for ( i = 0; i < nchanges; i++ ) { | ||
+ | row = this['item'+i].split(','); | ||
+ | id = row.shift(); | ||
+ | if ( ( i == 0 ) && ( id != id0 ) ) { | ||
+ | if ( id0 ) offset = -20; | ||
+ | id0 = id; | ||
+ | } | ||
+ | time = row.shift(); | ||
+ | user = row.shift(); | ||
+ | user = '<u><a href="/User:'+user+'">'+user+'</a></u>'; | ||
+ | title = row.shift(); | ||
+ | title = '<a href="/'+title+'">'+title+'</a>'; | ||
+ | comment = row.join(','); | ||
+ | if (comment != '') title = comment; | ||
+ | changes[i] = '<font face="arial, helvetica" color="#cca099"><i><b>'+user+' </b> '; | ||
+ | changes[i] += title+'</i></font><font face="arial" size="17"> </font><br>'; | ||
+ | } | ||
+ | rc.htmlText = changes.join(''); | ||
+ | } | ||
+ | }; | ||
+ | // Textbox | ||
+ | createTextField( 'rc', 1, -10000, 0, 190, 200 ); | ||
+ | with (rc) { | ||
+ | selectable = false; | ||
+ | _quality = 'BEST'; | ||
+ | border = false; | ||
+ | multiline = true; | ||
+ | wordWrap = false; | ||
+ | html = true; | ||
+ | } | ||
+ | |||
+ | // Logo | ||
+ | _root.attachMovie( 'xmlwiki', 'xmlwiki', 20 ); | ||
+ | _root.xmlwiki._x = 100; | ||
+ | _root.xmlwiki._y = -100; | ||
+ | |||
+ | // Per-frame function | ||
function reduce() { | function reduce() { | ||
− | + | ||
− | + | // Scrolling | |
− | } | + | if ( offset < 0 ) offset++; |
+ | rc._y = offset; | ||
+ | |||
+ | // Make request on some regular cycle which seems about right | ||
+ | if ( ++_root.ctr%400 == 1 ) { | ||
+ | server.SWF = id0; | ||
+ | server.sendAndLoad( '/wiki/index.php', server, 'GET' ); | ||
+ | } | ||
+ | |||
+ | } |
Revision as of 09:44, 16 March 2006
id0 = 1; changes = []; change = false; nchanges = 10; offset = -200;
// Set up async connection with server
server = new LoadVars();
server.title = 'RC-Summary'; // wiki page to request
server.onLoad = function(success) {
if (success) {
for ( i = 0; i < nchanges; i++ ) {
row = this['item'+i].split(',');
id = row.shift();
if ( ( i == 0 ) && ( id != id0 ) ) {
if ( id0 ) offset = -20;
id0 = id;
}
time = row.shift();
user = row.shift();
user = '<a href="/User:'+user+'">'+user+'</a>';
title = row.shift();
title = '<a href="/'+title+'">'+title+'</a>';
comment = row.join(',');
if (comment != ) title = comment;
changes[i] = ''+user+' ';
changes[i] += title+'
';
}
rc.htmlText = changes.join();
}
};
// Textbox createTextField( 'rc', 1, -10000, 0, 190, 200 ); with (rc) { selectable = false; _quality = 'BEST'; border = false; multiline = true; wordWrap = false; html = true; }
// Logo _root.attachMovie( 'xmlwiki', 'xmlwiki', 20 ); _root.xmlwiki._x = 100; _root.xmlwiki._y = -100;
// Per-frame function function reduce() {
// Scrolling if ( offset < 0 ) offset++; rc._y = offset;
// Make request on some regular cycle which seems about right if ( ++_root.ctr%400 == 1 ) { server.SWF = id0; server.sendAndLoad( '/wiki/index.php', server, 'GET' ); }
}