Skip to content

Instantly share code, notes, and snippets.

View lynxerzhang's full-sized avatar
🤒

frankwinter lynxerzhang

🤒
  • geckostudio
  • shanghai
View GitHub Profile
@lynxerzhang
lynxerzhang / ExecuteQueue.as
Last active August 29, 2015 13:56
ExecuteQueue in flash's Starling framework
package
{
import flash.utils.Dictionary;
import starling.animation.IAnimatable;
import starling.core.Starling;
/**
* 方法队列调用
*
* @example
@lynxerzhang
lynxerzhang / FindMatchClassNameItem.jsfl
Last active August 29, 2015 13:56
find library asset by linkage class name (根据输入的链接类名寻找库中是否存在指定资源)
var doc = fl.getDocumentDOM();
var library = null;
var items = null;
var itemLen = null;
var item = null;
run();
function run()
{
@lynxerzhang
lynxerzhang / ExportSwf.jsfl
Created February 27, 2014 12:26
export fla to swf (导出指定目录下的fla文件)
var doc = null;
var flaPath = null;
var outputPath = null;
var recursiveSearch = true;
var suffix = "fla";
run();
function run()
{
#include <stdio.h>
#include <stdlib.h>
char* concatstr(char*, char*);
int strlen(char*);
int strend(char*, char*);
//K&R的c语言指针章节练习题
int main(void)
{
@lynxerzhang
lynxerzhang / GenerateEmbedClass.jsfl
Created May 25, 2014 08:36
将库中所有元件设置成导出状态(Export For ActionScript)
var doc = fl.getDocumentDOM();
//symbol type constant
var movieclipType = "movie clip";
var folderType = "folder";
var bitmapType = "bitmap";
var soundType = "sound";
//prefix
var mcPrefix = "ui";
@lynxerzhang
lynxerzhang / Trie.swift
Last active August 29, 2015 14:07
the trie data structure write in swift
import Foundation
"use xcode's playground"
/**
* port as3 to swift
* http://www.anotherearlymorning.com/2009/06/trie-data-structure-in-actionscript-3/
* http://www.emanueleferonato.com/2009/07/13/trie-data-structure-in-actionscript-3/
*
@lynxerzhang
lynxerzhang / SwiftScreenMotionTips.swift
Created August 22, 2015 07:42
切换界面时自定义过度动画
//
// TransitionManager.swift
// SwiftScreenMotionTips
//
//@see http://mathewsanders.com/animated-transitions-in-swift/
import UIKit
import Darwin //contain pi's constant
class TransitionManager: NSObject, UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate {
@lynxerzhang
lynxerzhang / SwiftMotionPrototypeTips.swift
Last active August 29, 2015 14:27
swift动画练习
//
// ViewController.swift
// SwiftMotionPrototypeTips
//
// @see http://mathewsanders.com/prototyping-iOS-iPhone-iPad-animations-in-swift/
import UIKit
class ViewController: UIViewController {
@lynxerzhang
lynxerzhang / GNU License
Created March 16, 2012 03:01
about GNU License
Monster Debugger is released under the GNU General Public License.
and GrantSkinner's document said this license is a "viral" license,
and our project use the debug tool, so...
@lynxerzhang
lynxerzhang / bitmapscale9btn
Created March 16, 2012 03:55
bitmapscale9btn(like movieclip's scale9Grid property)
/**
*
* all code in timeline
* bitmapbutton test
*
* our project use raw bitmap to install button, so more btn resource is repeat
* use ScaleBitmap to reuse resource(like movieclip's scale9Grid)
*/
import org.bytearray.display.ScaleBitmap;
import org.bytearray.display.ScaleBitmapSprite;