Archive for februar 5th, 2010
got a minute? try this amazing game made in Flash
this puzzle game is made by a Swedish study group.
it’s very simple, but has a great gameplay and very nice use of music.
enjoy :O)
ActionScript 3.0: using the search method of the String class, part 1
if using the search method of the String class, this would trace; do stuff to you:
var teststr:String = "blablabla";
if(teststr.search(/bl/i) > -1) {
trace("do stuff");
}
if(teststr.search(/bl/i) > -1) {
trace("do stuff");
}
and this wouldn’t:
var teststr:String = "blablabla";
if(teststr.search(/br/i) > -1) {
trace("do stuff");
}
if(teststr.search(/br/i) > -1) {
trace("do stuff");
}
doing the same kind of search in a String with HTML-text, this would trace out; do stuff to you:
var teststr:String = "blab<br>labla";
if(teststr.search(/\<br\>/i) > -1) {
trace("do stuff");
}
if(teststr.search(/\<br\>/i) > -1) {
trace("do stuff");
}
and this wouldn’t:
var teststr:String = "blablabla";
if(teststr.search(/\<br\>/i) > -1) {
trace("do stuff");
}
if(teststr.search(/\<br\>/i) > -1) {
trace("do stuff");
}