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
//-------------------------------------------------------------------------- | |
// | |
// Overridden methods | |
// | |
//-------------------------------------------------------------------------- | |
//---------------------------------- | |
// Short comment | |
//---------------------------------- |
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 url:URLRequest = new URLRequest("http://www.google.co.jp/"); | |
navigateToURL(url, "_blank"); |
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
velocity = 0.9 * (velocity + ((0.3 * (180 - horizontalAngle)) / 6.0)); | |
horizontalAngle += velocity; |
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
// 送信かつページ遷移(POST) | |
var variables:URLVariables; | |
var request:URLRequest; | |
request = new URLRequest("http://hoge.jp/hoge.jsp"); | |
variables = new URLVariables(); | |
variables.decode("user_id=" + userNumber); | |
variables.decode("graph_id=fig" + figName); | |
request.data = variables; | |
request.method = URLRequestMethod.POST; | |
navigateToURL( request , "_self"); |
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
stage.addEventListener(Event.ENTER_FRAME, enterFrameHandler); | |
function enterFrameHandler(eventObject:Event):void{ | |
trace("test"); | |
removeEventListener(Event.ENTER_FRAME, enterFrameHandler); | |
} |
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 ary:Array = new Array(); | |
ary[0] = 5; | |
ary[1] = "aaa"; | |
ary[2] = {name:"sitiyan",power:5}; | |
var ary1:Array = [0,1,5,8,4]; | |
var ary2:Array = new Array(); | |
ary2[10] = 9; | |
var length1:int = ary1.length; // 5 |
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
// クリックしたら対象mcが最前面になる | |
function clicked(event:MouseEvent):void { | |
var lastIndex:int = container.numChildren - 1; | |
container.setChildIndex(DisplayObject(event.target), lastIndex); | |
} | |
// クリックしたら対象mcが最背面になる | |
function clicked(event:MouseEvent):void { | |
container.setChildIndex(DisplayObject(event.target), 0); |
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
//四捨五入 | |
Math.round(2.1); | |
// 切り下げ | |
Math.floor(2.1); | |
// 切り上げ | |
Math.ceil(2.1) |
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 netCon:NetConnection = new NetConnection(); | |
netCon.connect(null); | |
var netStr:NetStream = new NetStream(netCon); | |
netStr.client = new Object(); | |
netStr.play("test.flv"); | |
var vid:Video = new Video(851, 480); | |
vid.attachNetStream(netStr); | |
addChild(vid); |
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
// (1) ライブラリに埋め込み時にリンゲージ設定する必要あり | |
var textformat:TextFormat = new TextFormat(); | |
//textformat.font="小塚ゴシック Pro B"; | |
textformat.font = new font1().fontName; | |
textformat.size=20; | |
var tf:TextField = new TextField(); | |
tf,mouseEnabled = false; | |
tf.defaultTextFormat=textformat; | |
tf.autoSize= "left"; |
OlderNewer