mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
added type information to tweenjs-test.ts and loadHandler method of soundjs-test.ts.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
// Feature set example:
|
||||
createjs.Sound.addEventListener("fileload", createjs.proxy(this.loadHandler, this));
|
||||
createjs.Sound.registerSound("path/to/mySound.mp3|path/to/mySound.ogg", "sound");
|
||||
function loadHandler(event):void {
|
||||
function loadHandler(event:Object):void {
|
||||
// This is fired for each sound that is registered.
|
||||
var instance: createjs.SoundInstance = createjs.Sound.play("sound"); // play using id. Could also use full sourcepath or event.src.
|
||||
instance.addEventListener("complete", createjs.proxy(this.handleComplete, this));
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
///<reference path="../easeljs/easeljs.d.ts"/>
|
||||
|
||||
var target: createjs.DisplayObject = new createjs.DisplayObject();
|
||||
var Tween: createjs.Tween = createjs.Tween;
|
||||
|
||||
// source : http://www.createjs.com/Docs/TweenJS/modules/TweenJS.html
|
||||
// Chainable modules :
|
||||
target.alpha = 1;
|
||||
Tween.get(target).wait(500, false).to({ alpha: 0, visible: false }, 1000).call(onComplete);
|
||||
createjs.Tween.get(target).wait(500, false).to({ alpha: 0, visible: false }, 1000).call(onComplete);
|
||||
function onComplete() {
|
||||
//Tween complete
|
||||
}
|
||||
Reference in New Issue
Block a user