This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Yet another DANMAKU #1 rev2 | |
* =========================== | |
* Bullets now reflect @ walls! | |
* | |
* This sample assigns bullet objects every time when new bullets are | |
* needed. Creating a new bullet costs much, we'd better find an another | |
* way to manage bullets. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import flash.text.TextField; | |
import flash.text.TextFieldType; | |
import flash.events.FocusEvent; | |
public class PlaceholderTextField extends TextField { | |
public var placeholder:String; | |
public var placeholderColor:uint; | |
private var defaultTextColor:uint; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import flash.text.TextField; | |
import flash.net.URLLoader; | |
import flash.net.URLRequest; | |
import flash.text.StyleSheet; | |
import flash.system.System; | |
import flash.events.Event; | |
import flash.events.IOErrorEvent; | |
public class MyHTMLTextLoader { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import flash.display.*; | |
import flash.filters.*; | |
import flash.events.*; | |
import flash.media.*; | |
public class MyPlayBass extends Sprite { | |
private var pointSpriteTop:Sprite; | |
private var pointSpriteBottom:Sprite; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
space = u' ' | |
message = u"""あけまして | |
おめでとう | |
ございます | |
今年もよろしくお願いします | |
""" | |
messageArray = message.split('\n') | |
maxTokenLength = len(max(messageArray, key=lambda x:len(x))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PFont font; | |
String message; | |
void setup() { | |
size(300, 700); | |
noLoop(); | |
font = createFont("HiraMinProN-W6", 36, true); | |
message = "あけまして\nおめでとう\nございます\n今年もよろしくお願いします"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TEST CODE | |
var abesi = { | |
"hidebu": { | |
"loginPage": this.loginPage, | |
"tawaba": 1 | |
}, | |
"itterebo": 2 | |
}; | |
trace(abesi); | |
trace(abesi.hidebu.loginPage, abesi["hidebu"].loginPage, abesi["hidebu"]["loginPage"], abesi["hidebu.loginPage"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When loader has finished its loading... | |
var loaderInfo:LoaderInfo = event.target as LoaderInfo; | |
var mc:MovieClip = loaderInfo.content as MovieClip; | |
var xml:XML = describeType(mc); | |
var variable:XMLList = xml.child("variable"); | |
// Correct way, uses temporary variable | |
for each (var v:XML in variable) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dict:Dictionary = new Dictionary(); | |
var abesi:Sprite = new Sprite(); | |
var hidebu:Sprite = new Sprite(); | |
dict[abesi] = "abesi"; | |
dict[hidebu] = "hidebu"; | |
trace(dict[abesi]); | |
// "abesi" | |