Skip to content

Instantly share code, notes, and snippets.

@darylducharme
darylducharme / repeatString.as
Created March 9, 2012 17:01
Non loop way of creating a string of a certain length
/**
* Creates a string by repeating a string a certain number of times
* @param str The String to repeat
* @param count The number of times to repeat the string
*/
function repeatString(str:String, count:uint):String {
var output:Vector.<uint> = new Vector.<uint>(count, true);
return output.join("").replace(/0/g, str);
}
@darylducharme
darylducharme / Main.as
Created March 11, 2012 17:52
Testing why, when, and how of overriding AS3's event.clone() method
package
{
import flash.display.Sprite;
import flash.events.Event;
public class Main extends Sprite
{
private var _child1:Sprite;
private var _child2:Sprite;
private var _child3:Sprite;
@darylducharme
darylducharme / OBS-chunkbase.css
Last active June 11, 2024 03:39
CSS I used for OBS to make chunkbase map show up without ads and other extras.
/* Remove the top and just get right to the Seed Map */
#pageheader {
display:none;
}
/* Remove ads */
.adthrive-ad, .adthrive, .adthrive-footer {
display: none;
}