Feb 20 2012

eshop sample

http://www.storenvy.com/

http://society6.com/


Feb 17 2012

keep-generated-actionscript -> mxml to as3

http://saravananrk.wordpress.com/2008/05/26/keep-generated-actionscript-in-flex/


Feb 17 2012

Must read for deploy AIR on playbook

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Tips-Definitive-guide-to-AIR-apps-for-playbook/td-p/1080047


Feb 17 2012

js object and js function class

var yung = { variable : xxx, add: function () { } }

they are all accessible by other

yung.Class = function(someSetting) {

var privateVar
this.publicVar
function privateFunction
function publicFunction

//public function
$.extend(this, {
publicFunction: publicFunction
});

yung.obj = new yung.Class(someSettings);

}

scope:

(function(object1, jquery, window, settings) {

code….

})(object1, jquery, window, settings);


Feb 16 2012

unload module effectively FLEX

http://blogs.adobe.com/tomsugden/2010/02/how_to_unload_modules_effectively.html


Feb 16 2012

[FLEX] modular robotlegs !

http://joelhooks.com/2010/05/02/modular-robotlegs/


Feb 15 2012

view states using AS3 only, no mxml

http://www.digitalprimates.net/author/tapper/2006/03/14/creating-view-states-purely-in-as3/


Feb 15 2012

flex minimal

http://stackoverflow.com/questions/141288/possible-to-use-flex-framework-components-without-using-mxml


Feb 14 2012

very good tutorial for deploy blackberry playbook app

http://www.hsharma.com/tutorials/10-easy-steps-to-package-and-sign-air-apps-for-playbook/


Feb 13 2012

blackberry debug token

http://docs.blackberry.com/en/developers/deliverables/27280/Running_unsigned_apps_debug_tokens_1585072_11.jsp

http://docs.blackberry.com/en/developers/deliverables/27280/Configure_app_signing_from_cmd_line_1463563_11.jsp

About Configuring your application

http://docs.blackberry.com/en/developers/deliverables/27280/Configuring_your_application_1524626_11.jsp

About tablet xml

http://docs.blackberry.com/en/developers/deliverables/23959/Configuring_your_application_1524626_11.jsp


Feb 12 2012

openGL tutorial recommend by jimmy

http://db-in.com/blog/2011/01/all-about-opengl-es-2-x-part-13/


Feb 12 2012

playbook ref

FlashDevelop and BlackBerry PlayBook Development: The Basics

http://www.studiochris.us/2010/flashdevelop-and-blackberry-playbook-development-the-basics/

Tools port AIR -> playbook
http://www.studiochris.us/software/fruit-bat/

Debug token (on simulator)
http://deleteaso.com/playbook-debug-tokens-and-signing/


Feb 10 2012

git 之速查

http://blog.longwin.com.tw/2009/05/git-learn-initial-command-2009/


Feb 8 2012

as3 funny class as function, use a function to return a Class

http://jacksondunstan.com/articles/398


Feb 8 2012

trick on as2

dynamic new a movieClip with init var
http://www.jonnyreeves.co.uk/2007/05/movieclips-and-object-scope-in-as2/

WORTH to read, many FAQ about as2
http://www.senocular.com/flash/tutorials/faq/#newmovieclip

event receive and dispatch and delegate example
http://flash-creations.com/notes/asclass_eventdispatcher.php

hope example help
http://www.bit-101.com/blog/?page_id=1164

reference will be missed at first explanation
http://stackoverflow.com/questions/896335/referencing-movie-clip-class-instances-immediately-in-actionscript-2

EventDispatcher instantiate methods
http://archive.darronschall.com/weblog/2004/03/the-many-faces-of-eventdispatcher.html

container constructor first -> button constructor
container constructor want to call button stuff, but button hvnt construct
http://www.kirupa.com/forum/showthread.php?241544-AS2-0-Linkage-and-attachMovie-Woe


Feb 7 2012

open source as2 compiler

http://www.mtasc.org/


Feb 3 2012

seems very good play:Set up a home file server using FreeNAS

http://www.engadget.com/2012/02/01/how-to-set-up-a-home-file-server-using-freenas/


Jan 31 2012

Prestashop, a eshop framework

http://www.prestashop.com/


Jan 30 2012

zend form tutorial

the tutorial is a bit old, may not suit yr need , but can do ref

http://akrabat.com/zend-framework/simple-zend_form-example/
http://akrabat.com/zend-framework/simple-zend_layout-example/


Jan 22 2012

zend : view helper for js and css

http://devzone.zend.com/1651/managing-css-and-javascript-files-within-a-zend-framework-app/


Jan 19 2012

Free icon 素材 again :)

http://uicons.co/


Jan 18 2012

cron job 既朋友 for windows

http://jenkins-ci.org/


Jan 17 2012

iframe jquery (no cross domain by browser … )

http://blog.roodo.com/thinkingmore/archives/9657289.html


Jan 16 2012

SD card 救 相

http://her.cool3c.com/article/55083


Jan 13 2012

actually wt i want project

http://society6.com/

http://www.storenvy.com/


Jan 13 2012

quick start of zend framework

http://framework.zend.com/manual/en/learning.quickstart.create-project.html


Jan 12 2012

wtf bitmapData

SWF 13+ (Flash Player 11, AIR 3) the practical limit is the amount of memory available. (The theoretical limit to width or height is the largest positive integer — divided by 20 to allow for twips, but you will hit memory limits long before reaching this size.)
SWF 10 (Flash Player 10, AIR 1.5) the maximum size for a BitmapData object is 8,191 pixels in width or height, and the total number of pixels cannot exceed 16,777,215 pixels. (So, if a BitmapData object is 8,191 pixels wide, it can only be 2,048 pixels high.)
SWF 9 (Flash Player 9, AIR 1.1) the limitation is 2,880 pixels in height and 2,880 pixels in width. If you specify a width or height value that is greater than 2880, a new instance is not created.

Flash Player 11 is very good :)
Flash Player 10 need alchemy :(
Flash Player 9 no byteArray, so no need think of playing dynamic image processing :( (


Jan 10 2012

WTF Flex 4.5.1 eat shit SDK for UIComponent

TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/drawBackground()
at fl.controls::LabelButton/draw()
at fl.core::UIComponent/drawNow()
at fl.controls::ScrollBar/draw()
at fl.core::UIComponent/callLaterDispatcher()

I know u meet this error

i know you read this:

http://joshblog.net/2008/02/10/how-to-use-the-flash-cs3-component-set-in-a-flex-builder-actionscript-project/

or this

http://de-co-de.blogspot.com/2008/03/wheres-my-skin.html

but still cant play the UIScrollbar
What i think is, i the past, i use this method still can use, i think it is the issue of flex sdk, okok,

i got it

// trick to bring in the skins for the button
sb.setStyle( “ScrollArrowDown_downSkin”, new ScrollArrowDown_downSkin());
sb.setStyle( “ScrollArrowDown_overSkin”, new ScrollArrowDown_overSkin());
sb.setStyle( “ScrollArrowDown_upSkin”, new ScrollArrowDown_upSkin());
sb.setStyle( “ScrollArrowUp_disabledSkin”, new ScrollArrowUp_disabledSkin());
sb.setStyle( “ScrollArrowUp_downSkin”, new ScrollArrowUp_downSkin());
sb.setStyle( “ScrollArrowUp_overSkin”, new ScrollArrowUp_overSkin());
sb.setStyle( “ScrollArrowUp_upSkin”, new ScrollArrowUp_upSkin());
sb.setStyle( “ScrollBar”, new ScrollBar());
sb.setStyle( “ScrollTrack_skin”, new ScrollTrack_skin());
sb.setStyle( “ScrollThumb_downSkin”, new ScrollThumb_downSkin());
sb.setStyle( “ScrollThumb_overSkin”, new ScrollThumb_overSkin());
sb.setStyle( “ScrollThumb_upSkin”, new ScrollThumb_upSkin());
sb.enabled = true;
sb.visible = true;

add this, where sb is the scrollbar object :)


Jan 9 2012

by pass as3 8191px problem

Core Concept : Dun draw in bitmap

Example:
in urUploader, Thumbnail can over 8191px, loadBytes is according to file size, so if file size too large, yr machine will hang.

private function genThumbnail():void {
			var l:Loader = new Loader();
			l.loadBytes(transcodeManager.baAlchemy);
			l.contentLoaderInfo.addEventListener(Event.COMPLETE, onThumbnailComplete);
		}

		private function onThumbnailComplete(e:Event):void {
			var b:Bitmap = MCUtil.scaledImage(Bitmap(e.target.content).bitmapData, new ThumbnailLayout().width);
			_thumbnail.addChild(b);

			var data:Object = { uploadJob : this };
			dispatchEvent(new UploadJobEvent(UploadJobEvent.THUMBNAIL_GENERATED, data));
		}

This is the scale function, so after scale to small size, now can draw :)

public static function scaledImage(bd:BitmapData, s:Number = 120) : Bitmap
        {
            var newWidth:Number;
            var newHeight:Number;
            var result:BitmapData;
            var bitmap:BitmapData = bd;
            var size:Number = s;
            var matrix:Matrix = new Matrix();
            try
            {
                if (bitmap.width > bitmap.height)
                {
                    newWidth = size;
                    newHeight = bitmap.height * (size / bitmap.width);
                }
                else
                {
                    newHeight = size;
                    newWidth = bitmap.width * (size / bitmap.height);
                }
                matrix.scale(newWidth / bitmap.width, newHeight / bitmap.height);
                result = new BitmapData(newWidth, newHeight);
                result.draw(bitmap, matrix);
                bitmap.dispose();
                return new Bitmap(result);
            }
            catch (e:Error)
            {
                trace("Scaled image error");
            }
            return null;
        }// end function

ref: photobox photobook program


Jan 5 2012

alchemy error : if range invalid …

http://forums.adobe.com/thread/37528

Ans:

4. Sep 23, 2010 5:30 AM (in response to boris.reitman)
Re: Range Error 1506 when CLibInit.init()
Dont init CLibInit twice. Insted use static value to hold it for reuse and refer to it. Worked for me.


Jan 5 2012

js 放係 head,speed up 個 load .js 既 process

http://headjs.com


Jan 3 2012

regular expression tester

http://www.gskinner.com/RegExr/


Jan 2 2012

ref of fdpayforme

look and feel, font
http://www.pixelbaecker.de/#anker-s6


Jan 2 2012

The best oldies


Jan 2 2012

start up js and css framework

http://getskeleton.com/#whatAndWhy


Dec 30 2011

jpeglib encode decode example

http://iysm.net/?p=7

here is a good tutorial for using jpeglib to do decode and encode. It states the usage of some common parameter of decode and encode.


Dec 28 2011

compile ijg, alchemy issue

http://savagelook.com/blog/tag/alchemy

http://zaalabs.com/2010/04/compiling-zaail-with-alchemy-part-2/


Dec 27 2011

read write bytearray use in alchemy

http://blog.debit.nl/2009/03/using-bytearrays-in-actionscript-and-alchemy/


Dec 24 2011

alchemy gluegen : link C library to as3 :)

http://segfaultlabs.com/devlogs/alchemy-round-two


Dec 24 2011

advance alchemy article : about memory

http://bruce-lab.blogspot.com/2011/01/adobe-alchemy-hacks-access-memory-and.html


Dec 23 2011

gstate: alchemy memory

http://jasonbshaw.com/?p=183


Dec 23 2011

super strong flash guy

http://blog.tweenpix.net/


Dec 23 2011

ijg jpeg rare tutorial

http://www.jpegcameras.com/libjpeg/libjpeg.html

this one is really good example :)
http://andrewewhite.net/wordpress/2008/09/02/very-simple-jpeg-writer-in-c-c

this one also :)
http://www.cppblog.com/socketref/archive/2006/03/02/3623.aspx


Dec 22 2011

alchemy, libjpeg ref

日文翻譯文,教你裝同 run
http://www.4ucode.com/Study/Topic/678551

http://www.4ucode.com/Study/Topic/677284

原文,日文
http://d.hatena.ne.jp/amachang/20081118/1227005285

教你用 libjpeg
http://blog.csdn.net/achellies/article/details/4238056

MUST WATCH
Blog
http://www.websector.de/blog/2009/06/21/speed-up-jpeg-encoding-using-alchemy/

config alchemy
http://wiki.zeropointnine.com/?n=FlashPlatform.Alchemy

how to include jconfig.h, jpeglib.h …
http://forums.adobe.com/message/1059134#1059134

using alchemy to do bubble sort
http://blog.comtaste.com/2010/07/adobe_alchemy_a_comparative_ex.html


Dec 22 2011

simple explanation on bytecode

AS3 -> ABC (bytecode) -> AVM (Flash player) -> Windows, Linus, Mac…
落 bytecode 等唔同 OS 既 VM 都行到,但 點解唔直行 AS3 要 compile 落 bytecode ,因為你寫d 野太7 ,變做 While Loop,改你d var, function 名 改短d 靚d 好過 :)


Dec 22 2011

setup alchemy environment

http://blog.flexmaniak.pl/flex-libraries/alchemy/alchemy-installation-guide-for-windows

http://labs.adobe.com/wiki/index.php/Alchemy:Documentation:Getting_Started


Dec 22 2011

Potrace Transforming bitmaps into vector graphics

http://potrace.sourceforge.net/

alchemy version:
https://github.com/claus/as3potrace/tree/master/src/com/powerflasher


Dec 22 2011

Good Grid design for frontend

https://www.aupeo.com/


Dec 21 2011

Super strong as3 developer! see his project for some hints to difficult problem

http://segfaultlabs.com/


Dec 21 2011

event driven in java and IBM java theory and practice column

http://www.java2s.com/Code/Java/Event/Eventsourceandlistener.htm

http://www.ibm.com/developerworks/views/java/libraryview.jsp?type_by=Articles?sort_order=desc&expand=&sort_by=Date&show_abstract=true&view_by=Search&search_by=practice%3A


Dec 20 2011

alchemy IJG investiage

http://segfaultlabs.com/devlogs/alchemy-asynchronous-jpeg-encoding-2

http://savagelook.com/blog/actionscript3/adobe-alchemy

http://forums.adobe.com/message/987186#987186

- find find wt is beginEncodeJpegFileToPixsense, Pixsense encode …. ummm


Dec 20 2011

js design pattern for beginner

http://addyosmani.com/resources/essentialjsdesignpatterns/book/


Dec 19 2011

as3 <--> bridge <--> as2

http://www.jumpeyecomponents.com/Flash-Components/Various/ActionScript-Bridge-91/

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/LocalConnection.html

http://gskinner.com/blog/archives/2007/07/swfbridge_easie.html


Dec 18 2011

gordon recommend CSS engine

http://sass-lang.com/


Dec 15 2011

flash is suck in urlStream or fileRef.upload

urlStream is always good, it trigger the browser request to server, but very raw and cannot detect the upload progress (no progress event fire during upload) ( cal the speed and use Timer to pretend the progress bar )

but fileRef.upload is really poor, it use its user agent, so it is independent to browser, so no session can be save, it make a new session i think

judge yourself use which class then :)


Dec 15 2011

css framework (but ruby :( )

http://compass-style.org/


Dec 14 2011

skype development ref

@ww_boy6 roy:
wwboy: http://skype.sourceforge.jp/index.php?Skype%20API%20For%20Java%20(English)
roy:
this can help ?
roy:
actually they think so 麻煩 becoz they want to do VOIP
roy:
but we only need msg
roy:
wwboy: https://imo.im/
roy:
u see this web app can do skype
roy:

http://developer.skype.com/skypekit/reference/java/html/com/skype/api/Message.html

roy:
for ww


Dec 13 2011

Freeware multi-platform file splitters

http://www.hjsplit.org/


Dec 13 2011

read this post for shopping cart in Zend, can use library or write yr own

http://stackoverflow.com/questions/4032782/best-e-commerce-shopping-carts-for-zend-framework-developer


Dec 12 2011

網上 Q&A 平台 ,o岩細站用

qhub.com


Dec 12 2011

URL request in Flash

IE -> 用 domain 做 base-path
Firefox, chrome -> 用 swf 個 file 個 location 做 base-path

okok, 唔好煩,用死 absolute path, server_url + relative_url 好無 ?

Note Update :

用呢個 “.” d swf location 就會係 swf 個個位置


Dec 5 2011

wordpress localization step 1

http://www.poedit.net/


Dec 3 2011

supreme strong image processing class present by alchemy

http://www.websector.de/blog/2009/06/21/speed-up-jpeg-encoding-using-alchemy/


Dec 1 2011

html5 and music

http://www.baroque.me/
http://www.mta.me/


Dec 1 2011

study this uploader!

http://www.aurigma.com/
http://www.snapfish.com/


Dec 1 2011

jquery ui bridge tutorial

http://www.erichynds.com/jquery/using-jquery-ui-widget-factory-bridge/


Nov 29 2011

let’s try to write Jquery UI widget

http://wiki.jqueryui.com/w/page/12138135/Widget-factory

Ok, this one is better

https://github.com/scottgonzalez/widget-factory-docs/


Nov 28 2011

jquery .add

.add is a function tht “add” the selector into jquery object list. This add is not mean append.


Nov 28 2011

ext core, try this js framework

http://www.sencha.com/products/extcore/


Nov 21 2011

basic knowledge to VBscript

ms tech note
——————
http://technet.microsoft.com/en-us/library/ee198896.aspx

return is a object
——————
http://stackoverflow.com/questions/140002/vbscript-how-to-utiliize-a-dictionary-object-returned-from-a-function


Nov 21 2011

[plupload] about resize and upload

BitmapDataUnlimited

http://blog.formatlos.de/2008/05/28/bitmapdataunlimited/

 

SWF size limit

http://kb2.adobe.com/cps/496/cpsid_49662.html


Nov 16 2011

在 ASP.NET中使用 Include語法

http://blog.xuite.net/sugopili/computerblog/36468651


Nov 14 2011

[mysql] 複製一個 db

http://dev.mysql.com/doc/refman/5.6/en/replication-howto.html


Nov 7 2011

share box

http://www.ruhanirabin.com/how-to-add-facebook-like-button-to-wordpress-posts/

https://dev.twitter.com/docs/tweet-button

http://diythemes.com/thesis/rtfm/add-google-plus-1-share-button/

http://ottopress.com/2011/adding-googles-1-button-to-wordpress-sites/

ajax:
http://forum.developers.facebook.net/viewtopic.php?id=68635


Nov 7 2011

as2 or other graphics technique, set Bounds in short code

if (_bounds != undefined) {
mc._x = Math.max(_bounds.xMin, Math.min(mc._x, _bounds.xMax));
mc._y = Math.max(_bounds.yMin, Math.min(mc._y, _bounds.yMax));
}


Nov 7 2011

wp 必讀

language : http://codex.wordpress.org/I18n_for_WordPress_Developers

writing plugin:
o岩o岩開波d format : http://codex.wordpress.org/Plugin_API
action/filter default hook:
http://codex.wordpress.org/Plugin_API/Hooks_2.0.x

hook list with src:
http://adambrown.info/p/wp_hooks/version/3.2


Nov 4 2011

as2 can do addEventListener and dispatchEvent too

normal use method:
http://flash-creations.com/notes/asclass_eventdispatcher.php

package method:
http://www.sakri.net/blog/2007/02/20/using-eventdispatcher-in-as2-the-as3-way/


Nov 3 2011

[as2] shadow filter in as2

http://www.webwasp.co.uk/tutorials/214/F8-click-by-click/index.php


Nov 3 2011

[as2] graphics algorithm in as2

http://www.video-animation.com/mx2k_01.shtml


Nov 2 2011

[as2] kill a mouse event function

_handle_layer.onMouseMove = undefined;


Nov 2 2011

[as2] onMouseDown和onMouseUp则不管鼠标在什么地方

http://hi.baidu.com/billypc/blog/item/ccbc97efcb981b212cf5341c.html


Nov 2 2011

[as2] some movieClip property you may always need

	function resetStartProps():Void {
		delete _startProps; //Aids in memory management
		_startProps = {};
		var sp = _startProps;
		var axisPoint_obj = this.axisPoint;
		var mdx = _targetObject._parent._xmouse - axisPoint_obj.x; //Distance to mouse along the x-axis
		var mdy = axisPoint_obj.y - _targetObject._parent._ymouse; //Distance to mouse along the y-axis
		var md = Math.sqrt(mdx * mdx + mdy * mdy); //Total distance to mouse
		var angleAxisToMouse = Math.atan2(mdy, mdx);

		var rdx = _targetObject._x - axisPoint_obj.x; //Distance between axis point and registration along the x-axis
		var rdy = axisPoint_obj.y - _targetObject._y; //Distance between axis point and registration along the y-axis

		var angle = _targetObject._rotation * (Math.PI / 180); //rotation translated to radians
		var rAngleAxisToMouse = angleAxisToMouse + angle; //Rotated (corrected) angle to mouse (as though we tilted everything including the mouse position so that the _targetObject is at a 0 degree angle)

		sp.centerX = this.centerX;
		sp.centerY = this.centerY;
		sp.axisX = axisPoint_obj.x;
		sp.axisY = axisPoint_obj.y;
		sp._x = _targetObject._x;
		sp._y = _targetObject._y;
		sp._xscale = _targetObject._xscale;
		sp._yscale = _targetObject._yscale;
		sp._rotation = _targetObject._rotation;
		sp.angle = angle;
		sp._xmouse = _targetObject._parent._xmouse;
		sp._ymouse = _targetObject._parent._ymouse;
		sp.angleAxisToMouse = (angleAxisToMouse + Math.PI * 2) % (Math.PI * 2);
		sp.distAxisToMouseX = Math.cos(rAngleAxisToMouse) * md;
		sp.distAxisToMouseY = Math.sin(rAngleAxisToMouse) * md;
		sp.distAxisToMouse = md;
		sp.distRegToCenterX = _targetObject._x - sp.centerX;
		sp.distRegToCenterY = _targetObject._y - sp.centerY;
		sp.distAxisToReg = Math.sqrt(rdx * rdx + rdy * rdy);
		sp.angleAxisToReg = Math.atan2(rdy, rdx);

		if (_bounds.xMax != undefined) { //If we need to constrain dragging to stay within a rectangle...
			var bnds = _targetObject.getBounds(_targetObject._parent);
			sp.xMin = _bounds.xMin + (_targetObject._x - bnds.xMin) + 1;
			sp.xMax = _bounds.xMax - (bnds.xMax - _targetObject._x) - 1;
			sp.yMin = _bounds.yMin + (_targetObject._y - bnds.yMin) + 1;
			sp.yMax = _bounds.yMax - (bnds.yMax - _targetObject._y) - 1;

			sp.angleAxisToTL = (Math.atan2(_bounds.yMin - axisPoint_obj.y, _bounds.xMin - axisPoint_obj.x) + (Math.PI * 4)) % (Math.PI * 2);
			sp.angleAxisToTR = (Math.atan2(_bounds.yMin - axisPoint_obj.y, _bounds.xMax - axisPoint_obj.x) + (Math.PI * 4)) % (Math.PI * 2);
			sp.angleAxisToBR = (Math.atan2(_bounds.yMax - axisPoint_obj.y, _bounds.xMax - axisPoint_obj.x) + (Math.PI * 4)) % (Math.PI * 2);
			sp.angleAxisToBL = (Math.atan2(_bounds.yMax - axisPoint_obj.y, _bounds.xMin - axisPoint_obj.x) + (Math.PI * 4)) % (Math.PI * 2);
		}

	}
/**********************************************/
    /*      get-set Function                      */
    /**********************************************/
     function get centerX():Number {
		return this.centerPoint.x;
	 }
	 function get centerY():Number {
		return this.centerPoint.y;
	 }
     function get centerPoint():Object {
		var p = {x:_localCenterX, y:_localCenterY};
		_targetObject.localToGlobal(p);
		_targetObject._parent.globalToLocal(p);
		return p;
	}
	function get axisX():Number {
		return this.axisPoint.x;
	}
	function get axisY():Number {
		return this.axisPoint.y;
	}
	function get axisPoint():Object {
		var p = {x:_localAxisX, y:_localAxisY};
		_targetObject.localToGlobal(p);
		_targetObject._parent.globalToLocal(p);
		return p;
	}

/*****************************************************************************/
    /*                                                                           */
    /*      This is the function to find the relative center Point               */
    /*                                                                           */
    /*****************************************************************************/
    function resetCenterPoint():Void {
		var rotation_num = _targetObject._rotation;
		_targetObject._rotation = 0; //We need to straighten it temporarily to measure accurately...
		var bounds_obj = _targetObject.getBounds(_targetObject._parent);
		var x1 = (bounds_obj.xMax + bounds_obj.xMin) / 2; //Find the center x-coordinate when the rotation is 0
		var y1 = (bounds_obj.yMax + bounds_obj.yMin) / 2; //Find the center y-coordinate when the rotation is 0
		var dx = x1 - _targetObject._x; //distance between the _targetObject's registration point and center point along the x-axis
		var dy = _targetObject._y - y1; //distance between the _targetObject's registration point and center point along the y-axis
		var radius = Math.sqrt((dx * dx) + (dy * dy)); //Find the distance between the _targetObject's registration point and the center point.
		var angle1_num = Math.atan2(dy, dx);
		var angle = (rotation_num * (Math.PI / 180)) - angle1_num; //Total angle that we're adding/moving (we have to subtract the original angle to just get the difference)
		var x = _targetObject._x + (Math.cos(angle) * radius);
		var y = _targetObject._y + (Math.sin(angle) * radius);
		_targetObject._rotation = rotation_num; //Re-apply the rotation since we removed it temporarily.
		var p = {x:x, y:y};
		_targetObject._parent.localToGlobal(p);
		_targetObject.globalToLocal(p);
		_localCenterX = p.x;
		_localCenterY = p.y;
	}

	/*****************************************************************************/
    /*                                                                           */
    /*      This is the function to find the relative X Y                        */
    /*                                                                           */
    /*****************************************************************************/
	function setAxis(x:Number, y:Number):Void { //x and y according the the _targetObject._parent's coordinate space!
		var p = {x:x, y:y}; //Make a point so that we can do localToGlobal()
		_targetObject._parent.localToGlobal(p); //Translates the coordinates to global ones (based on _root)
		_targetObject.globalToLocal(p); //Translates the coordinates to local ones (based on _targetObject)
		_localAxisX = p.x;
		_localAxisY = p.y;
	}

Oct 31 2011

basic matrix and geometry

http://www.senocular.com/flash/tutorials/transformmatrix/


Oct 26 2011

[jquery] xxx.fn.funtionName() {} is prototype

Prototype

All objects have a prototype property. Whenever the interpreter looks for a property, it also checks the prototype. jQuery uses that extensively to add methods to jQuery instances.

var form = $(“#myform”);
form.clearForm; // undefined
form.fn.clearForm = function() {
return this.find(“:input”).each(function() {
this.value = “”;
}).end();
};
form.clearForm() // works for all instances of jQuery objects, because the new method was added to the prototype

(This example needs clarification: how does it modify the prototype when the word “prototype” doesn’t appear anywhere? The implication is that form.fn is simply an alias for form.prototype, but if that’s the case then it should be explained. :-? )

In javascript:the definitive guide 5 edition,dont add attibute to Object.prototype


Oct 25 2011

super strong html5 photobook editor

http://www.fujidirekt.de


Oct 25 2011

check empty string? if(strValue) is already enough

http://stackoverflow.com/questions/154059/what-is-the-best-way-to-check-for-an-empty-string-in-javascript


Oct 25 2011

jquery onlyInt validation

http://stackoverflow.com/questions/995183/how-to-allow-only-numeric-0-9-in-html-inputbox-using-jquery


Oct 25 2011

disable the auto complete of browser (so annoying sometime u click on a input field and pop sth out)

http://stackoverflow.com/questions/2530/how-do-you-disable-browser-autocomplete-on-web-form-field-input-tag


Oct 25 2011

cookies, using php or js?

use js pls
php setCookies cant trigger by user if he press “BACK” button


Oct 24 2011

[js] quick revise js

http://javascript.infogami.com/Javascript_in_Ten_Minutes


Oct 24 2011

read this, web developer

http://taligarsiel.com/Projects/howbrowserswork1.htm


Oct 24 2011

[js][php] language solution

http://stackoverflow.com/questions/4762763/change-language-from-dynamically-content-using-javascript


Oct 24 2011

Javascript null, undefined and default value?

http://stackoverflow.com/questions/2559318/how-to-check-for-undefined-or-null-variable-in-javascript

example:

var option = para || {};
option.color = option.color || “#B0B0B0″ ;
option.height = option.height || 1;


Oct 24 2011

old jquery dun hv parseXML function, add it yrself

http://baris.aydinoglu.info/javascript/parsing-xml-with-jquery-parsexml-method


Oct 21 2011

ignore enter submit form by ie and other browser

http://stackoverflow.com/questions/1000597/event-preventdefault-function-not-working-in-ie-any-help

event.preventDefault ? event.preventDefault() : event.returnValue = false;

event.preventDefault = many browser
event.returnValue = ie :)


Oct 21 2011

[js] read The Infamous Loop Problem to know more about always get the last element when event trigger and can learn more abt scoping too!

http://robertnyman.com/2008/10/09/explaining-javascript-scope-and-closures/


Oct 21 2011

[js] a quite good tutorial for js beginner

http://www.quirksmode.org/js/contents.html


Oct 20 2011

batch rename and thumbnail

batch edit image:
infraview

batch rename program:
CKrename


Oct 20 2011

amfphp, zend php [client <-> server]

http://www.silexlabs.org/amfphp/
http://www.zend.com/en/


Oct 19 2011

advice to jquery append, html, remove vs hide/show

pls dun depends on remove , append
they perform badly and hv bug with complicated tag

always use hide / show for module switching!

u already face in urbanmonk, y wrong again in vierzen!


Oct 19 2011

[js] always need to advise : how to make object in js

http://www.phpied.com/3-ways-to-define-a-javascript-class/


Oct 19 2011

html word wrap attribute for diff browser

white-space: pre-wrap; /* CSS3 */
white-space: -moz-pre-wrap; /* Firefox */
white-space: -pre-wrap; /* Opera <7 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* IE */
white-space: normal !important; /* IE 7*/

ref:
http://stackoverflow.com/questions/1638223/is-there-a-way-to-word-wrap-text-in-a-div

http://stackoverflow.com/questions/3553353/problem-with-word-wrap-in-ie7


Oct 19 2011

jquery plugin template

quite good jquery plugin template

http://www.whatheaven.com/fileupload/upload/jquery_slideshow.js

Continue reading


Oct 17 2011

[jquery] very good to modify this to combo box

http://do-web.com/jdropdown/overview


Oct 16 2011

[wp] related post

http://wp.tutsplus.com/tutorials/display-style-related-posts-for-your-wordpress-site/


Oct 15 2011

jquery bubble tip

http://www.vegabit.com/jquery_bubble_popup_v2/#examples


Oct 15 2011

[jquery] combobox, and can type yr own text too

http://flexbox.codeplex.com/


Oct 14 2011

wordpress change upload file config

http://chrismeller.com/2007/07/modifying-allowed-upload-types-in-wordpress

http://www.wprecipes.com/wordpress-tip-allow-upload-of-more-file-types


Oct 13 2011

[jquery] read this if u want to write plugin

diff pattern for plugin

http://coding.smashingmagazine.com/2011/10/11/essential-jquery-plugin-patterns/

defaults and settings/option

http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable

http://blog.jeremymartin.name/2008/02/building-your-first-jquery-plugin-that.html


Oct 11 2011

some example of online photo, card design and print system

photo
———–
snapfish
urphoto
photo create
-> bubblepix
-> purrprint
fujiflim
kodak
momento au

card
———–
moo

canvas
———–
fabness


Oct 3 2011

[webdesign][PS] learn some photoshop effect for your web design

http://designinstruct.com/web-design/create-a-light-textured-web-design-in-photoshop/


Sep 30 2011

[css] clear: both, very useful!

when u r making some layout float:left ….
then u want next component dun want float anymore =.=
use CLEAR attribute!!!


Sep 29 2011

ping again

http://www.ulikela.com/2011/08/21/about-drum/#comments


Sep 27 2011

ulikela ref site

main style:
http://bentrovatoblog.com/

comment style:
http://ddgoodi.es/


Sep 26 2011

something i learn from hactl

1. Dun leave a place easily, yes, u can still change yr job from AP to SA, but if u go too rapidly, u miss the skill building period.

2. Dun just follow a trend to build software. Say IPad, if ipad is hit and release app, then the hit is gone, u got only money. Build your career.

3. If u want to be developer, go other place out of HK. This is commercial place, we are only users. You can do what you want but you cant change the fact.

4. You can leave, if you learn most of the things. You can try to tell yourself wt u done n learnt. If u can tell, u learnt.


Sep 25 2011

opensource font, real good

http://www.theleagueofmoveabletype.com/


Sep 25 2011

[as3] quite good tutorial for learning vector, velocity, direction

http://active.tutsplus.com/tutorials/animation/learn-about-linear-kinematics/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Flashtuts+%28Activetuts%2B%29


Sep 25 2011

blog tool – related post widget.

http://www.linkwithin.com/


Sep 24 2011

learn code Ignitor X jquery

http://net.tutsplus.com/tutorials/javascript-ajax/build-ajax-data-grids-with-codeigniter-and-jquery-2/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+nettuts+%28Nettuts%2B%29


Sep 23 2011

ping test

http://www.ulikela.com/2011/08/21/about-drum/


Sep 12 2011

[blog] a good blog for css learning

http://css-tricks.com/


Sep 9 2011

[php] a blog always talk php.

http://www.gen-x-design.com/
呢個 blog 都無咩 update ,不過d 舊文都 ok 有用


Sep 8 2011

some web magazine

http://mashable.com/
http://thenextweb.com/


Sep 7 2011

[git] git cheatsheet

http://www.ndpsoftware.com/git-cheatsheet.html#loc=workspace;


Sep 7 2011

iphone stuff blog, check it

http://bynomial.com/blog/


Sep 7 2011

CSS button , hv a nice try

http://www.red-team-design.com/just-another-awesome-css3-buttons


Sep 7 2011

font again , some r gd

http://slodive.com/freebies/elegant-fonts


Sep 7 2011

[photoshop] how to draw ipad app layout

http://psd.tutsplus.com/tutorials/interface-tutorials/user-interface-ipad-app/


Sep 6 2011

[nodejs][php] long polling n related concepts

nodjs:
http://www.josephj.com/entry.php?id=358

php
http://www.perfgeeks.com/?p=139


Sep 6 2011

apple wallpaper

http://www.noupe.com/wallpaper/50-high-res-apple-macos-and-iphone-wallpapers.html


Sep 6 2011

[wp] you are doing on comments, right ?

http://net.tutsplus.com/tutorials/wordpress/unraveling-the-secrets-of-wordpress-commentsphp-file/


Sep 6 2011

[wp] learn it first, beginner

http://net.tutsplus.com/articles/web-roundups/top-50-wordpress-tutorials/


Sep 1 2011

[ai] learn draw for some web design

http://slodive.com/design/adobe-illustrator-tutorials/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Slodive+%28SloDive+-+Design+Resources+and+Inspiration%29


Sep 1 2011

[wp] I think u can learn fm them

http://sixrevisions.com/contests/giveaway-premium-wordpress-themes-wpzoom/


Aug 30 2011

[apache][phpmyadmin] change phpmyadmin to 443 using default phpmyadmin package

idea: rewrite engine to make http => https

1. go to .htaccess in /usr/share/phpmyadmin

add
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

2. activate the rewrite engine by a2enmod rewrite , then restart apache2

3. make SSL cert, some command like the following
#openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem

details: http://www.debianadmin.com/install-and-configure-apache2-with-php5-and-ssl-support-in-debian-etch.html

4. permission for the cerf : #chmod 600 /etc/apache2/apache.pem

5. Listen 443 in ports.conf

6. Set the phpmyadmin conf in sites-available:

# phpMyAdmin default Apache configuration
Alias /phpmyadmin /usr/share/phpmyadmin

DocumentRoot /usr/share/phpmyadmin
SSLEngine on
SSLCertificateFile “/etc/apache2/apache.pem”

Options Indexes FollowSymLinks
AllowOverride All
DirectoryIndex index.php


AddType application/x-httpd-php .php

php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .

# Authorize for setup


AuthType Basic
AuthName “phpMyAdmin Setup”
AuthUserFile /etc/phpmyadmin/htpasswd.setup

Require valid-user

# Disallow web access to directories that don’t need it

Order Deny,Allow
Deny from All


Order Deny,Allow
Deny from All

7. Finish.


Aug 30 2011

Protected: it is the manual of my server, somehow for ref

This post is password protected. To view it please enter your password below:



Aug 27 2011

[webdesign][template] some free webpage template, can borrow some graphics component to use

http://slodive.com/freebies/web-design-templates/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Slodive+%28SloDive+-+Design+Resources+and+Inspiration%29


Aug 24 2011

[WP] Learn WP beginner!

http://themeshaper.com/2009/06/22/wordpress-themes-templates-tutorial/

Advance:
theme option page
http://wp.tutsplus.com/tutorials/using-the-settings-api-part-1-create-a-theme-options-page/


Aug 18 2011

some font u will feel good, and it is free

http://www.themeflash.com/35-fresh-free-high-quality-fonts-for-your-next-design/


Jul 31 2011

[js] image slider, ok 好用

http://slidesjs.com/


Jul 27 2011

nav 升升降降……係我想要既野了…. nggggggg

http://www.kirkas.ch/ascensor/


Jul 22 2011

Pushbutton Engine and Haxe: a natural fit

http://dionamago.net/?p=386


Jul 18 2011

素材!

http://iconify.it/free-stuff/plastique-icons-full-set/
http://ddgoodi.es/2011/08/10/ddicons-65-png-psd-icons/


Jul 15 2011

dropkick for HTML dropping list

http://jamielottering.github.com/DropKick/


Jul 13 2011

Poise Drum, real gd fd with yr mpc

http://www.onesmallclue.com/poise.php


Jul 11 2011

let jam song with mlrv

http://parallelogram.cc/mlrv/


Jul 10 2011

learn jquery la!

http://learn.appendto.com/


Jul 8 2011

Zinc, f-in-box 之 Z-drive 之謎?

flash流媒体播放器;讨论以内存流方式播放FLASH的技术

flash流媒体播放器:讨论以内存流方式播放FLASH的技术可行性?
来源: 发布时间:星期三, 2008年9月24日 浏览:44次 评论:0
这样可以实现保护flash文件,而且用flash做界面发布时不要带swf文件,很方便,国外有一个 Control 可以实现,大家一起来讨论一下这样实现的技术方案.
告诉你一个最简单的Method
前面步骤和播放文件一样设置
ShockwaveFlash1.Movie = ‘c:\temp\temp.swf ‘;

ShockwaveFlash1.EmbedMovie = True
ShockwaveFlash1.Movie = ‘-_-!! ‘;
这样swf就含在窗体文件(dfm)中了
发布的时候不用单独带swf文件

这样是可以了,如果想把一个SWF文件做成资源,启动时再载入怎么实现呢?
创建一个不可见、只能当前句柄的program可访问的虚拟硬盘

[轉載]
flashplayercontrol貌似就是以这种方式实现的
虚拟硬盘 这个玩大了
这样就必须用到驱动 flashplayercontrol用驱动不可能吧
反汇编 跟踪 发现真的搞了一个虚拟硬盘,生成了一个临时文件Z:\FromMemory\46A10F369771449587DE913EFC0A258C\1\E4ED7C01D28A43418DBF2CB92CC35E56.swf

http://www.plm.hk/Phpgm/archiver/tid-638.html


Jul 6 2011

強~用css 做 tab style

http://net.tutsplus.com/tutorials/html-css-techniques/how-to-create-diagonal-lines-with-css/


Jul 4 2011

read this first when u go REST

http://blog.steveklabnik.com/2011/07/03/nobody-understands-rest-or-http.html


Jul 4 2011

first html5 game tutorial with box2d

http://net.tutsplus.com/tutorials/html-css-techniques/build-your-first-game-with-html5/


Jul 4 2011

some free sample design work

http://dribbble.com/


Jun 30 2011

Last moment 後制,我的 icon

http://catchtest.pixnet.net/blog/post/22304428

IcoFX

download 小工具 ko 吧

 

或者 on9 solution

http://www.convertico.com/


Jun 21 2011

iOS beginner blog 中文呵

http://eddyl.com/blog/


Jun 21 2011

[iOS] 一d code examples

http://mobile.tutsplus.com/tutorials/iphone/learn-ios-game-development-by-example-10-projects-to-get-you-started/


Jun 21 2011

[配色專用] colorapi

http://www.colorapi.com/


Jun 19 2011

[素材] Vector graphics of social media icon

http://vector.tutsplus.com/articles/web-roundups/23-free-vector-icon-packs-for-social-media/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+vectortuts+%28Vectortuts%2B%29


Jun 10 2011

Useful HTML-, CSS- and JavaScript Tools and Libraries,堅得。

http://coding.smashingmagazine.com/2011/06/10/useful-html-css-and-javascript-tools-and-libraries/


Jun 7 2011

Learn about GIT

http://sixrevisions.com/resources/git-tutorials-beginners/


May 31 2011

Quick Test JS 用

http://jconsole.com/


May 31 2011

js secret

http://www.smashingmagazine.com/2011/05/30/10-oddities-and-secrets-about-javascript/


May 31 2011

htaccess cookbook

http://www.catswhocode.com/blog/10-useful-htaccess-snippets-to-have-in-your-toolbox


May 30 2011

[web] 想 update web content 但又唔想 reload page

Typical 做法:
http://stackoverflow.com/questions/136458/how-do-i-with-javascript-change-the-url-in-the-browser-without-loading-the-new
用 hash-hack #

HTML5 做法:
http://spoiledmilk.dk/blog/html5-changing-the-browser-url-without-refreshing-page
window.history.pushState(“object or string”, “Title”, “/new-url”);


May 29 2011

a common creative share place, music or sth else

http://ccmixter.org/


May 27 2011

Optimizing content for Apple iOS devices [其實 d skill desktop version 都用得著]

http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html


May 13 2011

[as3] Unicode range of Flash

睇睇 flex4 sdk / frameworks 裡面 flash-unicode-table.xml


May 10 2011

[UX] Mock Up software 紹介 … (即係 layout design)

http://balsamiq.com/


May 10 2011

[UX] Tools for UX

http://www.kissmetrics.com/ (web analytic)

http://mixpanel.com/ (web analytic)

http://www.usabilla.com/ (micro usability tests)


May 9 2011

[as3] 唔勁,但可以睇下

http://randomcodescraps.tumblr.com/


May 7 2011

MUST TRY ITEM

http://puredata.info/
a real-time graphical programming environment for audio, video, and graphical processing


May 6 2011

ebook framework~

http://www.lakercompendium.com/


May 5 2011

[audio] 研究下,將 d signal 轉做 midi 既 工具~

http://www.osculator.net/


May 4 2011

Push Button Engine and the console!

http://blog.natebeck.net/2009/11/developing-games-with-pushbutton-engine-using-the-console/


May 4 2011

[rest] kaze 話

restful + spring + freemaker

可以玩下 rest 野,try try try


May 4 2011

[as3] 畫圖形的 library

tutorial

http://active.tutsplus.com/tutorials/actionscript/quick-tip-easy-shape-creation-with-uniqueshape/

Library

http://www.libspark.org/wiki/UniqueShape

Shape 之一覽

http://whirlpower.net/documents/uniqueshape/document.html

 

當然可以 extend 佢 d 野 畫d 複雜d 既野~


May 4 2011

em…browser 字

原來……中文個d 係無腳字……Sans-serif


May 3 2011

[box2d][as3] multiple gravity

http://www.emanueleferonato.com/2009/07/17/managing-multiple-gravities-with-box2d/


May 3 2011

[audio] 第一篇 audio post, ableton tutorial

http://abletonlife.com/


May 3 2011

正野,畫 pixel art 用,同埋寫 game 專用技

http://mtpaint.sourceforge.net/

http://www.libsdl.org/

http://hcsoftware.sourceforge.net/jason-rohrer/ <== 呢條友鍾意用 wor


May 3 2011

[box2d][as3] 睇下 tutorial

Beginner 教程

http://langrisser1981.blogspot.com/2008/02/hello-box2d.html
http://www.emanueleferonato.com/2010/02/19/box2d-flash-game-creation-tutorial-part-1/
http://plasticsturgeon.com/2010/08/making-an-as3-game-in-box2d-flash-version-2-0-hello-world-box2d/2/
http://www.emanueleferonato.com/2009/07/06/platform-engine-using-box2d/

直接睇 wiki

http://code.google.com/p/pushbuttonengine/wiki/Index?tm=6


May 3 2011

[as3] blog, 講 flash games, 幾過癮既

http://plasticsturgeon.com/


May 3 2011

box2d as3 的一般 tutorial

http://www.p-boy.cn/?p=473


May 3 2011

[web] flv movieplayer for web

http://flowplayer.org/
http://www.longtailvideo.com/players/jw-flv-player/


May 3 2011

素材,好野,web 或者 software 用

http://aipotudeng.deviantart.com/art/comMonochromatic-Iconset-2-203677686


May 2 2011

JavaScript Tricks And Good Programming Style

http://alexander.kirk.at/2006/08/09/javascript-tricks-and-good-programming-style/


May 2 2011

[jquery] slider and gallery

http://vandelaydesign.com/blog/web-development/jquery-image-galleries/

http://www.1stwebdesigner.com/css/fresh-jquery-image-gallery-display-solutions/


May 1 2011

[as3] Copying Timeline Animation into a Class

http://active.tutsplus.com/tutorials/animation/quick-tip-copying-timeline-animation-into-a-class/


Apr 29 2011

又有素材, social media 野

http://sixrevisions.com/freebies/icons/socialmate-free/


Apr 29 2011

[away3d] 做得好靚既 away3d ,下次做睇睇佢d code 學下野

http://jacobschatz.com/?p=533


Apr 27 2011

[web][js] fancybox 靚過 lightbox 咁囉

http://fancybox.net/


Apr 18 2011

Keith Peters 用的 Host

http://www.dreamhost.com/


Apr 13 2011

[pbe][as3]既然玩緊 push button,就睇埋呢個。

http://pushbuttonlabs.com/


Apr 12 2011

mobile framework again

http://www.phonegap.com/


Apr 11 2011

[PBE][AS3] Article Studies

http://www.adobe.com/newsletters/edge/august2010/articles/article6/index.html?trackingid=HRTDN

http://www.bukisa.com/articles/228717_making-a-space-invaders-clone-with-pushbutton-the-first-enemy

http://www.brighthub.com/hubfolio/matthew-casperson/blog/archive/2010/01/06/pushbutton-engine-tutorials.aspx


Apr 8 2011

[wp] 好靚,wordpress 改裝 QC system

http://getqualitycontrol.com/


Apr 7 2011

[pbe] Push Button Engine 入門

http://blog.163.com/free_art/blog/static/14156662009111485516228/


Apr 7 2011

[pbe][AS3] Experiment: Using SWF MovieClips in PushButton Engine

http://shikii.net/blog/experiment-using-swf-movieclips-in-pushbutton-engine/


Apr 7 2011

[mac][tricks]Use Tab To Switch Between Dialog Buttons

http://www.mactricksandtips.com/2008/10/use-tab-to-switch-between-dialog-buttons.html

The one single “bug” on Mac OS X by far is the ability to switch buttons in dialog boxes. For example I mean using Tab to go between OK, Cancel, Don’t Save etc. For a long while until today I had just got used to using the mouse. Although you can use some shortcut keys for Save, but these aren’t always reliable. Windows has the ability to tab through button options. Why not Mac? Well you can and it is blindingly obvious.
To enable you to tab through dialog boxes go to System Preferences > Keyboard & Shrotcuts. At the very bottom there will be an option saying about full keyboard access. Check the radio button that says “All Controls”.

Now when you find a dialog box (a new file in TextEdit is quickest), when you hit tab you will be able to move through the dialog box options. Very neat. As the option at the bottom states if you hit Control + F7 you will be able to change this setting, although I doubt would have to.


Apr 6 2011

[web] Comment management social community

http://disqus.com/


Apr 5 2011

[mysql/php] Using MySQL Stored Procedures with PHP mysql/mysqli/pdo

http://preetul.wordpress.com/2009/06/26/using-mysql-stored-procedures-with-php-mysqlmysqlipdo/


Mar 31 2011

[VC++]我想用 regex 但無左 atlrx.h

http://blog.csdn.net/wu_huiwen/archive/2010/04/24/5523128.aspx

http://blog.csdn.net/zhuxiaoyang2000/archive/2011/01/17/6147483.aspx


Mar 24 2011

[IDE][Cloud] Cloud 9 , a JS IDE for JS

http://c9.io/


Mar 24 2011

[素材] Social Icons 1.0 既圖

http://www.alexpeattie.com/projects/justvector_icons/


Mar 20 2011

[software] 其實有d 都 ok, 尤其個 ommwriter

http://playpcesor.blogspot.com/2011/03/blog-post.html

 

你在開啟電腦後會常駐執行哪些軟體與網站?我的推薦與不推薦

 


Mar 16 2011

[PSD] many good effect tutorial, CD album i think

http://designinstruct.com/graphic-design/make-a-colorful-retro-themed-space-scene-in-photoshop


Mar 14 2011

[as3]八個我最常用的AS3開源類庫(轉載)

http://fan.renren.it/a/bianchengyuyan/Flashbiancheng/20100926/38134.html


Mar 14 2011

[as3]What can you do with bytes ?

http://www.bytearray.org/?p=711


Mar 12 2011

[web][js] 3 ways to define a JS Class

http://www.phpied.com/3-ways-to-define-a-javascript-class/


Mar 10 2011

[AIR][AS3] Playing around silent install AIR

Cmd 教你裝
http://stackoverflow.com/questions/821531/how-can-the-adobe-air-installer-itself-require-air

官方教你裝
http://help.adobe.com/en_US/air/build/WS789ea67d3e73a8b22388411123785d839c-8000.html

一炮過 setup.exe
http://bishoponvsto.wordpress.com/2010/03/10/deploying-air-application-with-air-runtimeredistributable-in-single-exe/

forum discuss about this
http://forums.adobe.com/message/1998708


Mar 10 2011

[adobe] a blog of adobe news

http://www.webkitchen.be/


Mar 10 2011

[as3] readObject, writeObject of ByteArray, good for save 低 d野~

http://ted.onflash.org/2007/11/abcs-of-amf.php


Mar 8 2011

[wordpress] 整 wordpress theme 用 framework

http://whiteboardframework.com/


Mar 8 2011

[webdesign] 興! 極速做 3D banner for web

http://www.css3d.net/ribbon-generator/


Mar 7 2011

[as3]使用ByteArray做一些基本的檔案保護

http://blog.iamjason.com/2010/08/bytearray.html


Mar 7 2011

[as3] fscommand fix

fscommand(“exec”, “abc.exe”)
呢個你識用啦,將個 abc.exe 放係 fscommand 既 folder 到
好啦,但係好大問題就係 你想入 argument 入去 係唔 work
fscommand(“exec”, “abc.exe argu1″),無呢回事
咁點算好!

solution:

System.setClipBoard(cmd);

再用 C++ 寫個小 program
個 program 就係貼上 clipBoard 既字再 run
咁就乜 seven 都 run 到啦!
唔洗下下用 C++ 自己寫 flash player 或者 d zinc framework 咁煩~


Mar 7 2011

[as3] 搵左咁耐終於有教,d 網只係教人爆 zip,唔教人 zip 野

FZip
http://lucamezzalira.com/2010/04/13/working-with-zip-files-and-flash-platform/

或者用 nochump
http://pradeek.blogspot.com/search/label/nochump


Mar 3 2011

[M$] 玩 mfc 了嘛?

http://www.codersource.net/mfc/mfc-tutorials/mfc-tutorial-part-1.aspx


Mar 3 2011

[AS3][JQuery] jotaquery, as3 直 call jquery 既 script

http://code.google.com/p/jotaquery/


Mar 1 2011

[web][design] Japan sample site

http://io3000.com/
http://www.dailywebdesign.com/
http://midashi-design.com/
http://www.designlinkdatabase.net/
http://bm.straightline.jp/
http://www.goodeza.net/
http://web-selection.com/


Mar 1 2011

[as3][C++]有 vc++ 就好 lu

http://blog.csdn.net/zhuxiaoyang2000/category/679833.aspx


Feb 25 2011

學少少 bat cmd 梗有用

http://ss64.com/


Feb 24 2011

[web font] web font concept

http://www.dlocc.com/articles/modern-web-font-options-for-web-designers/


Feb 24 2011

unicode range

常用正規表達式, 繁簡體中文日文韓文的Unicode字元範圍
//日文 : [\u0800-\u4e00]
//漢字 : [\u4e00-\u9fa5]

src: http://it4mm.blogspot.com/2010/05/unicode.html


Feb 23 2011

[as3] Generative Art in Flash

tutorial
a href=”http://active.tutsplus.com/tutorials/design/creating-generative-art-with-hype/”>http://active.tutsplus.com/tutorials/design/creating-generative-art-with-hype/

Framework
http://www.hypeframework.org/


Feb 21 2011

[web][font] typekit, a company provide web fonts

http://typekit.com/


Feb 21 2011

[as3] Polygon area calculation

http://ricombination.wordpress.com/2008/11/06/actionscript-3-polygon-area-calculation/


Feb 18 2011

[as3] Displacement filter, 可以玩放大,mapping 等等

放大
http://www.emanueleferonato.com/2009/08/12/pure-as3-magnifying-effect-using-displacement-map-filter/
mapping
http://www.emanueleferonato.com/2007/12/03/understanding-flash-displacement-map-filter/


Feb 15 2011

[Web Design] Japan website sample

http://maka-veli.com/webdesign-samplelist.html


Feb 15 2011

[Photoshop]學用 Pen Tool Video

http://lifehacker.com/#!5753624/basics-of-photoshop-basic-drawing-and-layouts


Feb 14 2011

[C++][AS3] C++ insert Flash

http://www.n8lm.cn/blog/archives/200910/40/


Feb 14 2011

[font] font collection

http://designinstruct.com/articles/resources/font-collections/font-collection-10-stylish-free-stencil-fonts/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+designinstruct+(Design+Instruct)


Feb 11 2011

[Web]How to Build an RSS Reader with jQuery Mobile

http://net.tutsplus.com/tutorials/javascript-ajax/how-to-build-an-rss-reader-with-jquery-mobile-2/


Feb 11 2011

[JS] 其實好 OK, js Magazine style framework

http://treesaverjs.com/


Feb 8 2011

[AS3] Zinc 夾 GAIA, d path 錯曬!

http://www.designdisclosure.com/2009/07/make-mdm-zinc-applications-with-the-gaia-framework-for-adobe-flash/
Solution here~

July 5, 2009 by Alistair Stead in ActionScript, Flash Comments ( 3 )
The Gaia Framework for Adobe Flash is a something I have been using for some time. It is one of the most useful frameworks I have found for use with Flash. It adds a great deal of useful functionality and can generate large swathes of source code that you would otherwise need to write from scratch. However it is a very lightweight and unobtrusive ActionScript framework, you are still free to build your flash application in the same way you always have. You can continue to use your existing workflow but also take advantage of the framework features such as scaffolding, swfAddress, SEO optimization and asset loading and pre-loading.

With all this said when using the Gaia Framework with MDM Zinc application wrapper you have a couple of issues to resolve.

File paths and references from the application executable.
External Interface calls.
Most flash developers are likely unfamiliar with developing installable applications so these issues may be daunting when first encountered. However once explained there are simple solutions to both these issues that I will explain in detail.

File Paths and References

When Flash is used within a website it is served by a webserver and files can always be referenced from the root of the website e.g. /flv/example-video.flv or relative to the location of the .swf e.g. flv/example-video.flv.

However when your .swf is running inside the MDM Zinc wrapper it can no longer reliably reference files using the absolute path from root or a relative path. To resolve this you will need to evaluate the location that the application is running at before creating a path to the files based on this computed path.

Zinc Context Object

To solve this problem I have created a singleton context object. This object allows me to run the required application setup code and access the application properties from everywhere within my Gaia based application.

package com.designdisclosure.utils.mdm
{
import mdm.*;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.display.*;

public class ZincContext extends Sprite
{
private static var _instance:ZincContext;
public var zincGlobals:ZincGlobals;

/**
* Public static method to instantiate the ZincContext object.
* @return ZincContext Object Instance
*/
public static function get instance():ZincContext
{
if(_instance === null)
{
_instance = new ZincContext(new SingletonEnforcer());
}

return _instance;
}

public function ZincContext(pvt:SingletonEnforcer):void
{
if(pvt == null)
{
throw new Error(“Error: Instantiation failed: Use ZincContext.instance instead of new.”);
}

// Initialize an MDMZinc application and create a callback method for when this is completed
mdm.Application.init(this, onMDMinit);
}

private function onMDMinit():void
{
// Use this method to setup your Zinc application
// This is the same as applicationDidFinishLaunching from cocoa
}

/**
* Get the absolute path to the application and its files.
* I use a VMWare machine during testing and found
* that the application path is alittle un-reliable
* and needs modification when running in the VM.
*/
public function getApplicationPath():String
{
var path:String = mdm.Application.path;

return path;
}

public function get isZincApplication():Boolean
{
return (getApplicationPath.length)? true : false;
}
}
}

internal class SingletonEnforcer {}
This object can be used to obtain the application path, an absolute location at which the Zinc application is running. The can then be used in any function the loads external resources. However here is the main problem within the Gaia framework. It is possible to update the path to the site.xml file that is loaded in main.as but even if you load the file from an absolute path the framework does not update the paths used to load any assets referenced in the xml file its self.

Fixing the file paths

Although my next suggestion is not by any means ideal as it involves modifying the framework, I have yet to find a better solution. This obviously will lead to problems when updating the framework to future revisions. However these changes re fairly limited in scope as it is only a single file SiteModel.as. Here are my modifications that inject the application path if it exists into any location where external files are loaded.

public function load(path:String):void
{
if (path == null) path = “site.xml”;
if (path != “xml/site.xml” && path != “site.xml”) GaiaDebug.log(“site.xml path = ” + path);
var request:URLRequest = new URLRequest(CacheBuster.create(ZincContext.instance.getApplicationPath()+path));
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoadComplete);
loader.load(request);
}
private function parseSite():void
{
_title = _xml.@title || “”;
_preloader = _xml.@preloader || ZincContext.instance.getApplicationPath()+”preload.swf”;
_menu = (_xml.@menu == “true”);
_delimiter = _xml.@delimiter || “: “;
_routing = !(_xml.@routing == “false”);
_history = !(_xml.@history == “false”);
_indexFirst = (_xml.@indexFirst == “true”);
_assetPath = _xml.@assetPath || ZincContext.instance.getApplicationPath();
// preloaderDepth
var depth:String = String(_xml.@preloaderDepth).toLowerCase();
if (depth == Gaia.MIDDLE || depth == Gaia.BOTTOM) _preloaderDepth = depth;
else _preloaderDepth = Gaia.TOP;
// preloaderDomain
var domain:String = String(_xml.@preloaderDomain).toLowerCase();
if (domain == Gaia.DOMAIN_CURRENT || domain == Gaia.DOMAIN_NEW) _preloaderDomain = domain;
else _preloaderDomain = Gaia.DOMAIN_NULL;
// defaultFlow
var flow:String = String(_xml.@flow).toLowerCase();
if (flow == Gaia.PRELOAD || flow == Gaia.REVERSE || flow == Gaia.CROSS) _defaultFlow = flow;
else _defaultFlow = Gaia.NORMAL;
if (_routing) _routes = {};
}
private function parsePage(node:XML, parent:PageAsset = null):PageAsset
{
validateNode(node, true);
var isIndex:Boolean = (node.@id == _indexID);
var page:PageAsset = new PageAsset();
page.node = node;
page.id = node.@id;
page.src = ZincContext.instance.getApplicationPath()+node.@src;
page.title = node.@title;
page.bytes = node.@bytes;
page.assetPath = ZincContext.instance.getApplicationPath()+node.@assetPath || _assetPath;

page.preloadAsset = true;
page.menu = (node.@menu == “true”);
if (page.menu && page.title.toLowerCase() == “about”) GaiaDebug.warn(‘* Warning * “About” is not permitted in Flash context menus’);
if (page.menu && page.title.length > 0) _menuArray.push(page);
page.landing = (node.@landing == “true”);
// domain
var domain:String = String(node.@domain).toLowerCase();
if (domain == Gaia.DOMAIN_NEW || domain == Gaia.DOMAIN_CURRENT) page.domain = domain;
// depth
var depth:String = String(node.@depth).toLowerCase();
if (!isIndex)
{
page.setParent(parent);
page.external = (node.@src.split(“.”).pop() != “swf” || node.@src.indexOf(“javascript”) > -1);
if (page.external) page.window = node.@window || “_self”;
if (depth == Gaia.TOP || depth == Gaia.BOTTOM || depth == Gaia.NESTED) page.depth = depth;
else page.depth = Gaia.MIDDLE;
}
else
{
if (depth == Gaia.TOP || depth == Gaia.MIDDLE) page.depth = depth;
else page.depth = Gaia.BOTTOM;
}
// flow
var flow:String = String(node.@flow).toLowerCase();
if (flow == Gaia.NORMAL || flow == Gaia.PRELOAD || flow == Gaia.REVERSE || flow == Gaia.CROSS) page.flow = flow;
// assets
if (node.asset.length() > 0 || node.@seo != undefined) page.assets = parseAssets(node.asset, page, node.@seo, int(node.@seoBytes));
// child pages
if (node.page.length() > 0)
{
page.defaultChild = node.@defaultChild;
page.children = parseChildren(page, node.page);
if (!page.children.hasOwnProperty(page.defaultChild)) page.defaultChild = node.page[0].@id;
}
// terminal page
else
{
if (page.src.substr(page.src.length – 4) == “.swf”) page.landing = true;
if (isIndex) GaiaSWFAddress.isSinglePage = true;
}
// only add terminal and landing pages to routes
if (_routing && page.landing)
{
var route:String = node.@route || page.title;
if (isIndex) route = route || page.id;
page.route = getValidRoute(route, page.id).toLowerCase();
_routes[page.route] = page.branch;
}
return page;
}
These changes allow you to test your application within the flash authoring environment as the application path will be empty and it will load the files with local references. If you run the application inside a Zinc wrapper the files will be references with an absolute path.

External Interface calls

In order for flash applications to communicate with the browser they use External Interface. This is used extensively within the Gaia framework for logging and also search engine optimization with swfAddress. However MDM Zinc does not handle these calls particularly gracefully and as it is not possible to turn this functionality off within the framework we again need to make a couple of modifications.

Blocking external calls

Inside SWFAdress.as there is a test for ExternalInterface.available however inside Zinc this will incorrectly report true. The only fix for this is as follows:

private static var _availability:Boolean = false; // used to be ExternalInterface.available;
Conclusion

The solutions I have proposed here will resolve the issues the prevent you from using Gaia within a Zinc application. However I believe that these issues could be resolved in a number of ways within the respective products.

MDM Zinc need resolve the issue with ExternalInterface and the its incorrect implementation as this is essentially a bug in the platform.

The issues with the Gaia framework can not be considered bugs as the framework does exactly what it was intended to do. However I would suggest that the framework would be greatly improved if additional configuration were made available to users. Being able to turn off the SEO modules such as SWFAddress and external calls would be very helpful. Not only for use within MDM Zinc but also in situations where the flash application is not the entire web page. If you use Gaia to be build a smaller component within a page the SWFAddress calls can also cause problems.

The loading of assets would also be greatly improved if it were possible to update their paths at run time. Obviously this is not a common requirement but it would make the framework much more flexible and far more useful.


Feb 5 2011

[webdesign] 素材,the noun project always good!

http://www.thenounproject.com/


Feb 5 2011

[jquery][plugin] 好多正野,學野無妨

http://www.myjqueryplugins.com/


Feb 5 2011

[webdesign] 素材一大堆 Update

http://view.iconsutra.com/
http://www.designdeck.co.uk/dd_articles/ic_minimal_icon_set/
http://www.danieleckermann.com/linkdeck/
http://www.iconsweets2.com/


Feb 5 2011

[webdesign][css] gradient 靚靚 menu bar

http://www.webdesignerwall.com/tutorials/cross-browser-css-gradient/


Feb 4 2011

[design] 做 font 既 website, 幾靚, 做 logo o岩晒~

http://fontfabric.com/


Jan 30 2011

[Design][AI]一堆 paper, memo background 素材

http://www.1stwebdesigner.com/freebies/45-free-design-template-and-psd-files/


Jan 28 2011

[AS3] 似曾相識的錯,tweenlite removeTint re 極都 re 唔到

TweenPlugin.activate([TintPlugin]);
TweenLite.to(mc, 1, {removeTint:true});

我跟足你做,點解有時唔得?

TweenPlugin.activate([RemoveTintPlugin, TintPlugin]);
funny, 原來有 RemoveTintPlugin =x=

PS
我知啦! 原來舊版本先係咁
成日用 gaia framework 又 update 下個 tweenlite =x=


Jan 28 2011

[wordpress]Theme 抄下參下

http://designinstruct.com/articles/resources/10-free-wordpress-themes-for-portfolio-sites/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+designinstruct+(Design+Instruct)


Jan 27 2011

[AS3] Signal 野: Signal VS DeluxeSignal

http://insideria.com/2010/10/an-introduction-to-as3-signals.html
睇左先
up 一大春英文,搞咩,超簡單
signal 係可以 pass parameter,但 pass 個個 object 就係個個 object 囉

DeluxeSignal 就勁啦,係 pass event
event signal 都識 pass 啦,咁你就錯
呢個 event 係 as3 d fd,你 pass 左,過到去,有翻曬你以前 event 玩既野
例如 event.currentTaret, event.type, event.target 咁
咁咪開心又興奮囉~


Jan 26 2011

[AS3] 兩個 SWF event 傳黎傳去既方法

你仲想利用個 event 傳data ?

mother.addEventListener(CustomEvent.MODULE_CLOSE, onModuleClose)

function onModuleClose(e:*):void {

var data = e.data;

}

var data = {a:1, b:"hello"};

swf.dispatchEvent(new CustomEvent(CustomEvent.MODULE_CLOSE, data));

PS

如果要玩 bubbling: 記得 extend 個陣 要 override 埋 clone 呢個 function!


Jan 26 2011

[AS3] Loading SWFs into AIR 1.5.X and LoaderInfo.sharedEvents

http://richardleggett.co.uk/blog/index.php/2009/04/02/loading-swfs-into-air-1-5-and-loaderinfo

我見佢打散個 swf 做 byteArray ,再用 loader 砌翻埋佢


Jan 26 2011

[AS3] GAIA Framework, 自己整 custom attribute for site.xml ,這世界突然美好了。

http://www.dustypixels.com/blog/2010/03/17/gaia-accessing-custom-page-attributes-from-site-xml/


Jan 26 2011

[Web][AS3] 有趣的 web service – digital publishing

http://issuu.com/business


Jan 25 2011

[AS3] 又黎一d framework

Swiz is a framework for Adobe Flex and ActionScript that aims to bring complete simplicity to RIA development.

http://swizframework.org/

話勁過快過 event 既 singal
https://github.com/robertpenner/as3-signals


Jan 22 2011

[mac]熄左開機聲佢

http://www5e.biglobe.ne.jp/~arcana/software.en.html

download 完, 開 system requirement


Jan 18 2011

[AI] Good AI Techique!

http://www.smashingmagazine.com/2011/01/17/productive-web-design-with-adobe-illustrator/


Jan 13 2011

[AS3] Hit on hitTestObject

hitTestObject is always use

but do u know:

mc.hitTestObject(target)

if target.visible = false and target.alpha =0

其實都 hit 中 return true

小心d 啦~ 最好加多個 condition

mc.hitTestObject(target) && target.visible


Jan 13 2011

[web] Modernizr

http://www.modernizr.com/

Modernizr is a small and simple JavaScript library that helps you take advantage of emerging web technologies (CSS3, HTML 5) while still maintaining a fine level of control over older browsers that may not yet support these new technologies.


Jan 13 2011

[web] wunderlist 其實 open src ,學野啦~

https://github.com/6wunderkinder/wunderlist


Jan 13 2011

[iphone, mac] blog of cocoa

http://cocoawithlove.com/


Jan 13 2011

[iphone] development platform, cocos2d 既 朋友

http://www.anscamobile.com/corona/


Jan 13 2011

[AS3] SWF Sheet, flash mc -> sequence img format, good for iphone!

http://www.bit-101.com/blog/?p=2939


Jan 11 2011

[Paper] Silencing

http://visionlab.harvard.edu/silencing/

Silencing is a new illusion that shows it’s hard to notice when moving objects change.


Jan 10 2011

[Windows] BAT file Library

http://www.robvanderwoude.com/batexamples.php?fc=P


Jan 10 2011

[AS3] Generate Pdf by AS3 Library

http://alivepdf.bytearray.org/


Dec 30 2010

[AI] How to distribution Objects Around the Circle

http://www.vectorguru.com/tutorials/005_how_to_distribute_objects_around_the_circle_or_how_to_create_in_illustrator.html


Dec 29 2010

[AS3] Concept of display list

http://www.oreillynet.com/pub/a/oreilly/digitalmedia/helpcenter/actionscript30cookbook/chapter6.html

Highlight : Stage -> Main -> DisplayObject(s) -> …


Dec 29 2010

[AS3][Function]Anonymous, inline, and named functions in ActionScript

what is inline function …

http://www.darronschall.com/weblog/2004/08/anonymous-inline-and-named-functions-in-actionscript.cfm


Dec 29 2010

[AS3] Flash Tips (MUST READ)

Flash Tips
http://haxe.org/doc/flash/cheatsheet


Dec 7 2010

[AS3] Mac Dock Style Flash

http://jrgraphix.net/r/Flash7_Dock/

read this more happi

http://active.tutsplus.com/tutorials/actionscript/create-a-mac-dock-style-menu-with-as3/


Dec 6 2010

[AS3] 搵翻 GAIA 唔洗 FLASH,用 ANT 都得!

http://kevincao.com/2010/03/workflow-robotgaiaant/


Dec 3 2010

[Math] 單位 px 與 cm 如何轉換

單位 px 與 cm 如何轉換?

1cm = ?px, 1px = ?cm.

在 PowerPoint (ppt) 製作, 要在網頁的截圖上開始畫畫時, 特別需要~
公分(cm) 與 px 如何轉換?

* 1px = 0.04cm
* 1cm = 25px


Dec 2 2010

[AS3] Flex no MXML using Application

package
{
	import mx.core.Application;
	import mx.events.FlexEvent;
	import mx.styles.StyleManager;
	import mx.styles.CSSStyleDeclaration;
	import mx.controls.Button;
	import mx.skins.halo.HaloBorder;
	import flash.display.Bitmap;

	public class Main extends Application
	{
		[Embed(source="../library/up.png")]
		public var UpState		: Class;
		[Embed(source="../library/over.png")]
		public var OverState	: Class;
		[Embed(source="../library/down.png")]
		public var DownState	: Class;

		public function Main()
		{
			super();

			this.layout = "absolute";
			this.addEventListener(FlexEvent.CREATION_COMPLETE, handleComplete);

			setupStyles();
		}

		private function setupStyles() : void
		{
			var style:CSSStyleDeclaration = new CSSStyleDeclaration();
			style.setStyle( "borderSkin", mx.skins.halo.HaloBorder );
			StyleManager.setStyleDeclaration( "Application", style, false );

			style = new CSSStyleDeclaration();
			style.setStyle( "textAlign", "left" );
			style.setStyle( "fontAntiAliasType", "advanced" );
			style.setStyle( "fontGridFitType", "pixel" );
			style.setStyle( "paddingLeft", 10 );
			style.setStyle( "paddingRight", 10 );
			style.setStyle( "paddingTop", 5 );
			style.setStyle( "paddingBottom", 5 );
			style.setStyle( "horizontalCenter", 0 );
			style.setStyle( "verticalCenter", 0 );
			style.setStyle( "upSkin", UpState );
			style.setStyle( "overSkin", OverState );
			style.setStyle( "downSkin", DownState );

			StyleManager.setStyleDeclaration( "Button", style, false );
		}

		private function handleComplete( event : FlexEvent ) : void
		{
			var button : Button = new Button();
			button.label = "labelBtn";
			addChild( button );
		}
	}
}

Nov 26 2010

[3D] 3d 必學 algor

http://en.wikipedia.org/wiki/Delaunay_triangulation


Nov 24 2010

[影像] 影像玩到咁,不枉此生

http://www.joewehner.com
http://vimeo.com/jw99


Nov 23 2010

[AS3] 靚波請睇

http://tukuru296.com/labo/

d 波點做?
一個波其實好多 point 組成,再用 curve 連成
wave effect 係 叫d point 郁少少 x 同 郁少少 y


Nov 22 2010

[WebDesign] CSS Font-Size: em vs. px vs. pt vs. percent

http://kyleschaeffer.com/best-practices/css-font-size-em-vs-px-vs-pt-vs/


Nov 22 2010

[AS3] Open source Page Flip Engine

http://www.megazine3.de/


Nov 18 2010

[Maths] Algorithms DB

http://www.cse.ohio-state.edu/~gurari/course/cis680/cis680No1.html#QQ2-46-95


Nov 18 2010

[JS] 新既圓型 concept photo slider

http://www.baijs.nl/tinycircleslider/


Nov 17 2010

[AS3] Flash Video Player

http://www.longtailvideo.com/players/jw-flv-player/


Nov 16 2010

[天文]觀星用 software

http://www.stellarium.org/


Nov 15 2010

[CSS] 將網頁分割,放棄 960 grid 的一個原因

http://lessframework.com/


Nov 10 2010

[AS3] Saving file by FileReference

FileReference.save()

http://blog.everythingflex.com/2008/10/01/filereferencesave-in-flash-player-10/

API

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html#save%28%29

(題外話,講 load 的)

叫你注意 loader.dataFormat = URLLoaderDataFormat.BINARY;

http://www.actionscript.org/forums/showthread.php3?t=187580

如果 advance d coding的話,用 fscommand出一個小exe將 bytearray -> jpg都得。


Nov 9 2010

[AS3/Flex] Start Module Programming!

http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f22.html


Nov 2 2010

[RoR]Ruby on Rails Guides

http://guides.rubyonrails.org/


Nov 1 2010

[WebDesign] 素材!

ICON

http://lab.simurai.com/css/buttons/#material

http://greepit.com/open-source-icons-gcons/

http://www.fullcreative.com/2010/09/switch-a-set-of-54-minimalist-vector-icons-part-1/

http://www.webdesignerdepot.com/2010/07/200-exclusive-free-icons-reflection/

http://somerandomdude.com/projects/iconic/

http://www.wpzoom.com/wpzoom/new-freebie-wpzoom-developer-icon-set-154-free-icons/

TILE BKG

http://tileabl.es/


Oct 28 2010

[AS3] AS3 Framework / API Collection

Adobe APIs
corelib, mappr, flickr, youtube and more.
http://labs.adobe.com/wiki/index.php…apis:libraries
APE (Actionscript Physics Engine)
http://www.cove.org/ape/
as3awss3lib
ActionScript 3.0 library for interacting with Amazon S3
http://code.google.com/p/as3awss3lib/
as3soundeditorlib
Actionscript 3.0 library for sound editing
http://code.google.com/p/as3soundeditorlib/
as3ds
AS3 Data Structures For Game Developers
http://code.google.com/p/as3ds/
ASCOLLADA
http://code.google.com/p/ascollada/
As3Crypto
ActionScript 3 Cryptography Library
http://crypto.hurlant.com/
asinmotion
Animation Library for AS3
http://code.google.com/p/asinmotion/
Away3d
http://code.google.com/p/away3d/
ebay API
http://code.google.com/p/as3ebaylib/
facebook-as3
AS3 API to access Facebook’s Platform API
http://code.google.com/p/facebook-as3/
flest
Flest Framework for Adobe Flex and ActionScript3 Applications
http://code.google.com/p/flest/
FZip
Actionscript 3 class library to load standard ZIP archives and extract/decompress contained files.
http://codeazur.com.br/lab/fzip/
lastfm-as3
Actionscript 3.0 library to access the Last.fm web services
http://code.google.com/p/lastfm-as3/
MapQuest
http://company.mapquest.com/mqbs/4a.html
mecheye-as3-libraries
A set of ActionScript 3 Libraries, primarily for Flash game development.
http://code.google.com/p/mecheye-as3-libraries/
Papervision3D
http://code.google.com/p/papervision3d/
Salesforce Flex Toolkit
http://wiki.apexdevnet.com/index.php/Flex_Toolkit
Tweener
Full featured animation library
http://code.google.com/p/tweener/
Twitter AS3 API
http://twitter.com/blog/2006/10/twitter-api-for-flash-developers.html
uicomponents-as3
Lightweight AS3 UI component library
http://code.google.com/p/uicomponents-as3/
XIFF
XMPP client library
http://svn.igniterealtime.org/svn/repos/xiff/branches/xiff_as3_flexlib_beta1/
Yahoo AS3 APIs
http://developer.yahoo.com/flash/as3_api_libraries.html


Oct 22 2010

[html5] 超勁 canvas 既 function api reference!

http://www.html5.jp/canvas/ref.html


Oct 22 2010

[JS] 靚靚 progress bar

http://www.catswhocode.com/blog/how-to-create-a-kick-ass-css3-progress-bar


Oct 21 2010

[JS] Canvas Framework

http://processingjs.org/

作者 = jquery 作者


Oct 21 2010

[Flash] Hacking SWF – Everything You Never Wanted To Know About Shapes In Flash

http://wahlers.com.br/claus/blog/hacking-swf-1-shapes-in-flash/

must read item!!!!!!!!!!!!!


Oct 21 2010

[C++] C++ program with Flash GUI

http://www.codeproject.com/KB/cpp/FlashGui.aspx


Oct 21 2010

[HTML5] JS Game Engine – ImpactJS

http://impactjs.org/


Oct 21 2010

[HTML5] Canvas Demo Blog

http://www.canvasdemos.com/


Oct 21 2010

[HTML5] AI -> canvas

http://visitmix.com/labs/ai2canvas/


Oct 20 2010

50 Powerful Time-Savers For Web Designers

http://www.smashingmagazine.com/2010/10/19/50-powerful-time-savers-for-designers/


Oct 19 2010

[AS3] About Sound

http://www.zedia.net/2008/a-little-bit-about-sound-using-the-sound-soundchannel-soundtransform-classes/


Oct 15 2010

[Flash 3D] Z-sorting for flash native 3D

http://blog.generalrelativity.org/actionscript-30/z-sorting-3d-displayobjects-for-flash-player-10/


Oct 14 2010

[PV3D]SLERP Concept

http://pv3d.org/2008/12/28/click-then-tween-camera-to-plane/

see this first

http://pv3d.org/2009/01/11/tweening-rotated-planes-to-you/

similar things

http://embots.dfki.de/doc/seminar_ca/Kremer_Quaternions.pdf

the concept

http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation

wiki


Oct 14 2010

[C++]OpenFramework Very Powerful Graphics framework in C++

http://www.openframeworks.cc/


Oct 13 2010

[3d graphics] demo of some important concept (e.g. quadTree)

http://away.kiev.ua/away3d/techdemos/


Oct 13 2010

[Math] Vector Maths

http://programmedlessons.org/VectorLessons/index.html


Oct 13 2010

[pv3d] USING QUADTREES IN PAPERVISION3D (solve 3D obj collision problem)

http://blog.zupko.info/?p=177

with 2 very good demos inside~

http://blog.yoz.sk/2010/03/fixing-z-sorting-in-papervision-3d/

another tutorial, it also mention  cube.meshSort = DisplayObject3D.MESH_SORT_FAR; // before line 50

http://www.bukisa.com/articles/37044_papervision-3d-programming-tutorial-quadtree-renderer

more


Oct 12 2010

The Essentials of Writing High Quality JavaScript

http://net.tutsplus.com/tutorials/javascript-ajax/the-essentials-of-writing-high-quality-javascript


Oct 12 2010

[Design pattern] Why extends is evil

http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-toolbox.html?page=3

Why extends is evil


Oct 12 2010

[Flex] Beginner for flex

http://zh-tw.w3support.net/index.php?db=so&id=141288

可以使用Flex框架/組件少許的MXML?

http://sujitreddyg.wordpress.com/2008/02/05/splitting-flex-application-into-modules/

Splitting Flex application into modules

http://mromecki.fr/en/post-using-flex-3-component-without-mxml-only-as3#/post-using-flex-3-component-without-mxml-only-as3

http://cookbooks.adobe.com/post_Creating_Application_without_MXML-11123.html

Using Flex 3 Component without MXML – only AS3 (FLEX 3333333333333333333333333!)


Oct 12 2010

[AS3] About Vector and Advanced Drawing API

http://newmovieclip.wordpress.com/page/3/


Oct 12 2010

jquery fundamental tutorial

http://jqfundamentals.com/book/book.html


Oct 12 2010

mozilla js guide

https://developer.mozilla.org/en/JavaScript/Guide


Oct 11 2010

Automation API sample applications & Advanced Analytics For Flex and Flash RIAs

http://www.adobe.com/devnet/flex/samples/custom_automated.html

i dun know wt is this , stay here for reference

(i know la, this is an toolkit to record down user action like scroll, click, and u can make use of it to do some software like vnc etc.)

http://code.google.com/p/jcheng/

reference about this too

Advanced Analytics is also mention in this tutorial


Oct 11 2010

[JQuery] Slidar Gallery

http://tympanus.net/Tutorials/SliderGallery/


Oct 11 2010

[iphone] tutorial

http://www.oscarvgg.com/

iphone code blog

http://bonjouryentinglai.wordpress.com/2009/11/30/cocos2d簡介/

cocos2d 簡介

http://bonjouryentinglai.wordpress.com/

主網

http://nateburba.com/software-development/learning-cocos2d-and-objective-c/

tutorial of cocos2d and obj C


Oct 11 2010

[iphone] iphone game framework

http://www.cocos2d-iphone.org/


Oct 7 2010

InnerFade with JQuery

http://medienfreunde.com/lab/innerfade/


Oct 5 2010

jQuery: how to tell if you’re scroll to bottom? (or aka wt is scrollHeight)

http://yelotofu.com/2008/10/jquery-how-to-tell-if-youre-scroll-to-bottom/


Oct 4 2010

JSFL compile all

http://log.liminastudio.com/programming/automating-flash-cs4-builds-with-jsfl


Sep 29 2010

Tweenlite: colorTransfrom vs colorMatrixFilter

colorTransform colorTransform
colormatrixcolorMatrixFilter

ColorTransform is like color multiply (疊加)

ColorMatrix is like Color Overlay but still hv the color depth or gradient 係到


Sep 29 2010

example for a static class function Class to run constructor first (Singleton use)

http://www.ultrashock.com/forums/actionscript/as3-global-stage-singleton-96247.html

this is an example of stageReference singleton

but it is also a good example using static var instance to store itself,

so a class (with static function use) can run a constructor first


Sep 28 2010

game on jsfl~

http://www.lostinactionscript.com/blog/index.php/2010/03/06/how-not-to-hate-swf-libraries/


Sep 28 2010

jsfl tutorial

http://active.tutsplus.com/tutorials/workflow/create-new-features-for-flash-with-jsfl/


Sep 28 2010

Using String to call function (可以玩 “jump” + “offense” / “jump” + “attack” 既 call function 做法)

http://asgamer.com/2009/using-string-variables-to-call-functions-in-as3

同場加映 apply function (try it)

Tweenlite.to(mc, ….)

個 mc 都係玩 apply 咋

http://troyworks.com/blog/2008/01/03/as3-functionapply/

http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/Function.html


Sep 24 2010

about mask

http://rhinotw.blogspot.com/2009/01/as3mask.html

AS3的mask並不會改變原物件的長寬;
舉例來說,一個長寬500×500的A_mc,被一個200×200的B_mc所mask,
AS2的時候,trace會發現A_mc的長寬變成200×200了,
但AS3則仍然trace出500×500。
這問題在需要對A_mc縮放的時候,會有大麻煩,
例如我想放大到寬度是1000px,則AS2會放大5倍,但AS3只會放大2倍;
試過DisplayObject的getRect()跟getBounds(),都是trace出500×500,
Vanilla找到一個怪招:
bitmapData.draw(A_mc);
trace(bitmapData.getColorBoundsRect(0xff000000,0xff000000,true));
就會回報正確的長寬了!
感謝Vanilla!


Sep 21 2010

JSFL recommend

jsfl

find these jsfl ! this would be good to u and faster development


Sep 21 2010

Motion XML Elements (係咪我想要既野)

http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/motionXSD.html


Sep 20 2010

[trytry佢]Runtime Font Publisher, a tool for runtime font sharing.

http://blog.johannest.com/2010/06/22/runtime-font-publisher-a-tool-for-runtime-font-sharing/


Sep 17 2010

Jquery Test, Mini Jquery Lab

http://www.darkthread.net/MiniJQueryLab/


Sep 17 2010

會唔會太靚,日本靚 flash Lab

http://clockmaker.jp/


Sep 17 2010

終於搵得翻,isometric world example

http://ryobicity.100th.jp/


Sep 17 2010

3D site concept

http://www.kepco.co.jp/pr/elcity/top.html

某某科學展。 3d pixel is used!


Sep 17 2010

女,AXE 永遠都最正。+others 女 site!

http://zozo.jp/event/axe/axe.html

正,玩大相的

https://www.mmts-shop.jp/

正正,賣衫的

http://www.flandre.ne.jp/pridre/

鬼妹 model

http://www.amphi.jp/index.html

日本 bra


Sep 17 2010

Website recommendation

有靚女,mouseover 埋去轉相的諗法

http://www.pika-ichi.jp/index.html

日清意粉。用顏色分類之 concept

http://www.pastaism.jp/


Sep 8 2010

Notes on Cross Domain Event Flow

http://ticore.blogspot.com/2007/08/as3-cross-domain-event-flow.html


Sep 7 2010

a good hitTest class (for isometric too)

http://www.tink.ws/blog/as-30-hittest/


Sep 6 2010

About isometric world depth sorting

http://jwopitz.wordpress.com/2008/09/03/absolute-isometric-depth-sorting/


Aug 31 2010

game framework

http://www.yogurt3d.com/ (3d game engine)

http://www.ffilmation.org/website/ (isomeric engine)

http://flixel.org/ (so u heard of it already)

http://pushbuttonengine.com/ (one more then)


Aug 30 2010

isomeric world 學野啦

http://as3isolib.wordpress.com/


Aug 25 2010

SiON ActionScript3 software synthesizer library (造聲必備)

http://sites.google.com/site/sioncenter/


Aug 12 2010

ANT on flash develop

http://www.allflashwebsite.com/article/running-ant-from-flashdevelop


Aug 12 2010

presentation 之 software (video capture screenshot 個d)

http://www.debugmode.com/wink/


Aug 12 2010

Web material and DHTML RIA

http://www.openlaszlo.org/

open laszlo <—— dhtml RIA

http://cocoon.apache.org/

web 既發布技術之一


Aug 12 2010

flash runtime on javascript

http://paulirish.com/work/gordon/demos/


Aug 12 2010

developer blog

http://flexonrails.net/

flex <-> ruby developer

http://antimatter15.com/wp/

ajax animator 個作者


Aug 12 2010

speed up as3 swf file by apparat framework

http://code.google.com/p/apparat/

http://webdevotion.be/blog/2010/06/02/how-to-get-up-and-running-with-apparat/

a passage to introduce apparat


Aug 12 2010

finite state machine in as3 (for game develop)

http://www.richardlord.net/blog/finite-state-machines-for-ai-in-actionscript


Aug 11 2010

about outline finding

http://www.sakri.net/blog/2009/04/13/extract-shape-outline-points-from-bitmapdata/

search about canny edge too


Aug 11 2010

meta tag introduction

http://www.switchonthecode.com/tutorials/flex-snippet-tutorial-bindable-meta-tag-part-3

talk about bindable tag

http://www.casadirocco.nl/2009/09/the-event-meta-tag-in-actionscript-3-and-flex-builder.html

talk about event tag

http://www.boostworthy.com/blog/?p=157

general brief of the metatag

http://www.bit-101.com/blog/?p=946

frame tag, for making preloader for flex


Aug 10 2010

關於 tab 個個核突黃色框

http://mattmaxwellas3.blogspot.com/2008/12/as3-disable-yellow-tab-rectangles.html

see the comment as well~answer is in comment…..XD


Aug 9 2010

Flash Blogs

http://blog.johannest.com/

http://delfeld.wordpress.com/


Aug 9 2010

Web Toolbar~~~

http://www.wibiya.com/?ref=L


Aug 9 2010

The MovieClip life cycle, Event.FRAME_CONSTRUCTED, and Event.EXIT_FRAME.

http://blog.johannest.com/2009/05/22/the-movieclip-life-cycle-event-frame_constructed-and-event-exit_frame/


Aug 9 2010

Tricks on AS3

http://www.untoldentertainment.com/blog/2010/03/01/5-ways-to-cheat-at-actionscript/comment-page-1

http://insideria.com/2010/04/combining-the-timeline-with-oo.html


Aug 9 2010

Using getDefinitionByName and getQualifiedClassName

http://delfeld.wordpress.com/2009/04/21/object_from_class_name/


Aug 9 2010

swf and Browser trick

http://www.asual.com/swfaddress/

http://code.google.com/p/swfobject/

http://www.project-nya.jp/modules/weblog/details.php?blog_id=745

swfAdress

swfObject

swfForceSize


Aug 7 2010

swf2exe d solution 成日要人俾錢,用 Screenweaver 啦

http://screenweaver.org/doku.php?id=

花d時間研究下d haxe 同 neko 先


Aug 6 2010

Packages are actually namespaces in ActionScript 3 (我都估到架啦!)

http://joshblog.net/2009/05/13/packages-are-actually-namespaces-in-actionscript-3/


Aug 6 2010

GUI for as3, with no flash component

http://www.aswing.org/
http://www.minimalcomps.com/


Aug 6 2010

error 2007, load swf with Flash UI component error

TypeError: Error #2007: 參數 child 不能是 Null。
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/drawBackground()
at fl.controls::BaseButton/draw()
at fl.core::UIComponent/drawNow()
at fl.controls::ScrollBar/draw()
at fl.controls::UIScrollBar/draw()
at fl.core::UIComponent/drawNow()
at fl.controls::TextArea/updateScrollBars()
at fl.controls::TextArea/drawLayout()
at fl.controls::TextArea/draw()
at fl.core::UIComponent/callLaterDispatcher()

TypeError: Error #2007: 參數 child 不能是 Null。

當你用了 load swf,而咁o岩裡面個 swf 有用到 UI component d 野
(e.g. scrollbar, checkbox 等)
你用 main 個個 swf load 佢,本身都應該相安無事
但你搞下個 fl library,例如玩下 focusManager,又或者 (我估) add 其他 UI component
咁佢就會鬧你 load swf 個個搵唔到適當既 UI component
其實無咩野,出下 error,想解決就係 main library 都加埋 個個 UIcomponent la~


Aug 6 2010

Flash右鍵另存圖片 with FP10 API-FileReference.save()

package  {
 import flash.display.Loader;
 import flash.display.Sprite;
 import flash.display.StageAlign;
 import flash.display.StageScaleMode;
 import flash.events.ContextMenuEvent;
 import flash.events.Event;
 import flash.net.FileReference;
 import flash.net.URLLoader;
 import flash.net.URLLoaderDataFormat;
 import flash.net.URLRequest;
 import flash.ui.ContextMenu;
 import flash.ui.ContextMenuItem;
 import flash.utils.ByteArray;

 /**
  * ...
  * @author Focus1921
  * 實作Flash右鍵另存圖檔demo
  */
 [SWF(width = "800", height = "600", backgroundColor = "#ffffff", frameRate = "30")]
 public class Main extends Sprite {
  private var imgDataLdr:URLLoader;
  private var imgRequest:URLRequest;
  private var imgData:ByteArray;
  private var imgLdr:Loader;
  private var imgSprite:Sprite;
  private var imgFileRef:FileReference;
  private var imgContextMenu:ContextMenu;

  /**
   * 建構式
   */
  public function Main() {
   if (stage) {
    init();
   }else {
    addEventListener(Event.ADDED_TO_STAGE, init);
   }
  }

//---Method----------------------------------------------------------------------------------------------

  //初始化
  private function init(e:Event = null):void {
   removeEventListener(Event.ADDED_TO_STAGE, init);

   //舞台不縮放,靠上對齊
   stage.scaleMode = StageScaleMode.NO_SCALE;
   stage.align = StageAlign.TOP_LEFT;

   //加上demo浮水印
   var _demoMark:DemoMark = new DemoMark(stage.stageWidth);
   addChild(_demoMark);

   //建構URLRequest,並指定目標圖檔url
   imgRequest = new URLRequest();
   imgRequest.url = "assets/p1.jpg";

   //建構URLLoader,讀取目標圖檔二進位資料
   imgDataLdr = new URLLoader();
   imgDataLdr.dataFormat = URLLoaderDataFormat.BINARY;
   imgDataLdr.addEventListener(Event.COMPLETE, onImgDataLdrComplete);
   imgDataLdr.load(imgRequest);

   //建構Sprite裝載圖檔Loader(Loader不能自訂右鍵快顯選單)
   imgSprite = new Sprite();
   addChild(imgSprite);
   imgSprite.y = _demoMark.y + _demoMark.height;

   //建構圖檔Loader,置於imgSprite顯示清單下
   imgLdr = new Loader();
   imgSprite.addChild(imgLdr);

   //建構FileReference,存圖檔用
   imgFileRef = new FileReference();

   //建置圖檔Sprite容器自訂右鍵選單
   setupImgMenu();
  }

  //建置圖檔Sprite容器自訂右鍵選單
  private function setupImgMenu():void {
   //建構自訂ContextMenu,關閉預設選項
   imgContextMenu = new ContextMenu();
   imgContextMenu.hideBuiltInItems();

   //建構"另存圖片..."ContextMenuItem,加入自訂快顯選單中並將自訂選單指定給圖檔Sprite容器
   var _itemSaveAs:ContextMenuItem = new ContextMenuItem("另存圖片...");
   _itemSaveAs.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onItemSaveAsSelect);
   imgContextMenu.customItems.push(_itemSaveAs);
   imgSprite.contextMenu = imgContextMenu;
  }

//---Event Handler---------------------------------------------------------------------------------------

  //圖檔URLLoader讀取完成
  private function onImgDataLdrComplete(e:Event):void {
   //儲存圖檔二進位資料,圖檔Loader讀取該二進位資料(顯示用)
   imgData = imgDataLdr.data;
   imgLdr.loadBytes(imgData);
  }

  //快顯選單"另存圖片..."選項被選中
  private function onItemSaveAsSelect(e:ContextMenuEvent):void {
   //從Request的url中抓取圖檔檔名當作存檔預設檔名,叫用FileReference的save方法存檔
   var _url:String = imgRequest.url;
   var _defalutName:String = _url.substr(_url.lastIndexOf("/") + 1);
   imgFileRef.save(imgData, _defalutName);
  }

 }

}

import flash.display.GradientType;
import flash.display.Sprite;
import flash.geom.Matrix;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;

//demo浮水印
class DemoMark extends Sprite {
 public function DemoMark(_width:Number) {
  var _matrix:Matrix = new Matrix();
  _matrix.createGradientBox(_width, 20);

  graphics.beginGradientFill(GradientType.LINEAR, [0x333333, 0x333333], [1, 0], [0, 255], _matrix);
  graphics.drawRect(0, 0, _width, 20);
  graphics.endFill();

  var _txt:TextField = new TextField();
  _txt.autoSize = TextFieldAutoSize.LEFT;
  _txt.textColor = 0xffffff;
  _txt.text = "Flash實作右鍵另存圖片, demo by focus1921--(圖檔上按右鍵/另存圖片...)";
  addChild(_txt);
  _txt.x = _txt.y = 2;
 }
}

引用:

http://asgrocery.blogspot.com/2010/01/flash-with-fp10-api-filereferencesave.html#links
right click 另存圖片!

存檔時是把load進來的圖檔二進位資料原封不動寫回本機存檔,不會有轉存後品質和原圖不一樣的情況,如果圖檔要加工像是畫畫、加印章或是壓縮圖檔…等等的,就先建構BitmapData去draw加工過的圖後,再用JPGEncoder去編成ByteArray,最後交給FileReference.save()存檔。聽起來落落長,不過本篇的重點還是在於讓Flash擁有像是在網頁上圖片右鍵另存的功能。


Aug 6 2010

duplicate MC……自己 load 自己

http://asgrocery.blogspot.com/2010/02/actionscript-3-duplicate-stage-instace.html#more

很有趣的構思

package  {
 import flash.display.Loader;
 import flash.display.MovieClip;
 import flash.display.Stage;
 import flash.display.StageAlign;
 import flash.display.StageScaleMode;
 import flash.events.Event;
 import flash.events.MouseEvent;
 import flash.net.URLLoader;
 import flash.net.URLLoaderDataFormat;
 import flash.net.URLRequest;
 import flash.utils.ByteArray;

 /**
  * ...
  * @author Focus1921
  *
  * 複製無綁定類別movie clip場景實體(stage instance)實作demo(fla文件類別)
  */
 public class DocTest extends MovieClip {
  //stage instance
  public var test_box_mc:MovieClip; //場景上僅有的movie clip, 實體名稱test_box_mc

  private var ba:ByteArray;   //儲存自己這個swf的byte array
  private var ldr:Loader;    //建一個loader來load ba
  private var tmpX:Number;
  private var tmpY:Number;

  /**
   * 建構式
   */
  public function DocTest() {
   if (stage) {
    init();
   }else {
    addEventListener(Event.ADDED_TO_STAGE, init);
   }
  }

  private function init(e:Event = null):void {
   stage.scaleMode = StageScaleMode.NO_SCALE;
   stage.align = StageAlign.TOP_LEFT;

   //確保主場景load只load自己一次,避免溢位
   if (parent is Stage) {
    trace("parent is Stage");
    //建構url loader(binary)去load自己的byte array
    var _urlLoader:URLLoader = new URLLoader();
    _urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
    //trace(root.loaderInfo.url);
    _urlLoader.load(new URLRequest(root.loaderInfo.url));
    _urlLoader.addEventListener(Event.COMPLETE, onURLLdrComplete);
   }

   //建構loader, 註冊complete完成偵聽
   ldr = new Loader();
   ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onLdrComplete);

   //stage註冊click偵聽
   stage.addEventListener(MouseEvent.CLICK, onStageClick);
  }

  //---Event Handler-----------------------------------------------------------------------------

  private function onURLLdrComplete(e:Event):void {
   e.currentTarget.removeEventListener(Event.COMPLETE, onURLLdrComplete);
   //把load到的byte array存起來
   ba = e.currentTarget.data;
  }

  private function onLdrComplete(e:Event):void {
   //用實體名稱去抓到要複製的movie clip,每次load完都會傳不同的引用
   var _mc:MovieClip = <div style="display: inline; height: auto; position: absolute; visibility: hidden; width: auto; ">MovieClip</div>MovieClip(ldr.content).getChildByName("test_box_mc") as MovieClip;
   //屬性設定不同的值,證明的確不是同一個引用
   _mc.x = tmpX;
   _mc.y = tmpY;
   _mc.alpha = Math.random();
   //加入顯示清單
   addChild(_mc);
  }

  private function onStageClick(e:MouseEvent):void {
   //把點擊座標記起來,當作複製後的mc的座標
   tmpX = e.stageX;
   tmpY = e.stageY;
   //loader去load(loadBytes)存起來的byte array(ba)
   ldr.loadBytes(ba);
  }

 }

}

Aug 6 2010

focus unwork as3???

注意 flash IDE 個 flash player 對 focus 是虧的……

另外自己再用 flash player 開過黎試……

唔好以為自己錯……


Aug 4 2010

Object Handler (MC transformer 既 framework)

http://object-handles-examples.appspot.com/


Aug 4 2010

Hack Flash Projector to change some value (e.g. title name)

Player without minimize, maximize and close buttons when not full screen:

Using third party projector tools such as mProjector, Zinc, SWF Studio or Screenweaver. Flash alone cannot do that.

Another way to hide the minimize, maximize and close buttons (and also, if you want, to modify/remove others menus, dialog windows etc.), but only applicable at a projector file, is to use a resource editor program, also called ‘hacking’ program. With such programs (for example: ‘XN Resource Editor’, ‘Resource Hacker’), you can usually ‘hack’ Win32 PE files (modules); that is why you will be able to edit only the projector file.

http://www.wilsonc.demon.co.uk/d10resourceeditor.htm

http://www.angusj.com/resourcehacker/


Aug 3 2010

Using swc rather than Embed tag

http://www.arpitonline.com/blog/2009/03/21/flex-builder-tip-use-swcs-for-image-assets-not-embed-metatags-for-pure-actionscript-projects/

PS

What is Flex Assets?

When using [Embed] to store some bitmap, it will extends BitmapAssets, etc……….

so somethime may not want to use Embed tag, then u can import the Asset class inside and extends by yrself!

http://www.ultrashock.com/forums/flex/embed-flex-assets-without-using-flex-123405.html


Aug 3 2010

Flash game framework (one is for pixel game!)

http://flixel.org/

http://flashpunk.net/

flixel is a flash game framework for pixel games

flashpunk is a flash game framework~~~


Jul 31 2010

as3 event bubbling notice

The event can only bubble up through the display list if the object that dispatched the event is a DisplayObject (or an ancestor of DisplayObject, such as a Sprite or MovieClip) so that it can be in the display list AND it is added to the display list at the time of the event dispatch.

唔係你係類面 new 個 instance ,佢就識玩 bubble

而係 addChild 落個 displaylist 到先識玩 bubbling

new object 個個你就要一層層咁自己 dispatch~


Jul 31 2010

edwin 介紹的 web host


Jul 30 2010

Flash compile exe -> Flash player 可選!

最新既 flash player 10 多左個 digital cert 功能,可惜的是 IE 去開既時候會鬧你無正確既 digital cert,咁點解決呢

1. 用 zip -> sfx 既方法,IE 就唔當 flash player 開

2. compile 既時候,換個 flash player,用 無cert 既 9 或者用 10 既 debug version (但希望你個 program 無 bug,唔係出 error)

how?

program files -> flash -> player

換左類面個 player 佢

export 出黎既 exe 就係包呢款 player,

(projector 原理: 包個 flash player,叫佢開個 swf 之嘛)

無 cert 既 projector 就過關了!


Jul 23 2010

2D Array -> 1D Array -> Vector -> bitwise Vector 越黎越快

http://alecmce.com/as3/fast-2d-arrays

追求速度。


Jul 23 2010

Debug Monster

http://www.demonsterdebugger.com/

a very good debug tool for writing as3


Jul 23 2010

K2, a view framework for wordpress

http://getk2.com/


Jul 23 2010

Design pattern for as3 Blog

http://www.as3dp.com/


Jul 23 2010

Interface trick (main swf –> load external swf and want to call it function)

http://www.zedia.net/2008/another-good-use-of-interfaces/

同場讀埋,interface 有咩用?

http://www.zedia.net/2008/how-to-use-interface-in-actionscript-3/


Jul 23 2010

模擬 multiple inheritance

http://www.darronschall.com/weblog/2006/10/multiple-inheritance-in-actionscript-3.cfm

用 implement interface + #include 去摸擬

實際上佢 implement 個 interface,但只有 function 名,對嘛

然後每個要 (扮) extends 個個 class implement 完左 #include 一定要個d functions,

咁咪一定要用個d function 囉?

咁就 == 一定有個堆 function 兼 function 名 及可以用 is 等等

咁就可以無限 (扮) extends!

(not a gd practice, btw)


Jul 23 2010

AS3 的一些怪野,必睇

http://va.lent.in/blog/2010/03/08/as3-is-weird-true-story/


Jul 21 2010

Many Great resources, 最正係 MC transform

http://www.senocular.com/


Jul 21 2010

SWFExplorer

呢個 library 可以一次過抽起曬 d definition 出黎 new

http://www.bytearray.org/?p=175


Jul 21 2010

Playing Audio with Flash

http://milkmidi.blogspot.com/2010/07/as3-scratch.html 我由呢個 demo 開始睇

http://www.anttikupila.com/flash/soundfx-out-of-the-box-audio-filters-with-actionscript-3/ 有呢個好正既 sound filter, 識做 echo, phase, feedback, cutoff, resonance 個d effect

用 pixelBlender Mix 歌

http://www.kaourantin.net/2008/10/audio-mixing-with-pixel-bender.html#4759002868008324481

http://blogs.adobe.com/kevin.goldsmith/2009/08/pixel_bender_au.html

載入 mp3

http://www.flexiblefactory.co.uk/flexible/


Jul 19 2010

有擬似 bindable for Flash 既 library

http://bumpslide.com/blog/2009/03/04/data-binding-for-flash/ (explanation)

http://code.google.com/p/bumpslide/ (src)


Jul 13 2010

Some tools playing code -> art


Jul 13 2010

Art from code, and a book about art <-> program

http://www.artfromcode.com/

http://www.generative-gestaltung.de/


Jul 12 2010

Multiple AS3 classes in one file

http://probertson.com/articles/2006/07/28/one-file-many-as3-classes/


Jul 12 2010

Keith Peters 個 blog~

http://www.bit-101.com/blog/


Jul 9 2010

收錢 engine

http://www.theoworlds.com/products.php

睇下佢搞緊咩

咁舊既野,仲有無得賺?


Jul 9 2010

isometric view 既 library

http://code.google.com/p/as3isolib/


Jul 9 2010

using zip to pack a bulk of swf/exe

http://teejee2008.wordpress.com/2009/01/12/7-zip-sfx-maker-v20-2/

http://www.7-zip.org/

using this little tools and 7z

or use this

http://www.chilkatsoft.com/chilkatsfx.asp

little good tool


Jul 9 2010

The First HTML5 Mobile App Framework

http://www.sencha.com/


Jul 9 2010

dojo

http://www.dojotoolkit.org/

a javascript framework rather than jQuery


Jul 9 2010

a blog of a flash developer

http://blog.joa-ebert.com/


Jul 8 2010

FluorineFX, RIA <-> .NET

http://www.fluorinefx.com/


Jul 8 2010

flash 新 3d engine, flare3d

http://www.flare3d.com/


Jul 8 2010

pv3d 唔夠用,用呢個擴充 lib 做更多 effect (其實 away3d 都得!)

http://code.google.com/p/as3dmod/


Jul 8 2010

一個玩 flash 玩得 ok 勁既台灣人

http://milkmidi.blogspot.com/


Jul 8 2010

Web design layout template 排得靚d

http://960.gs/

try 960 grid system


Jul 8 2010

data center recommend by 高強

http://www.hostmonster.com/


Jul 5 2010

as3 vcam ok 過癮既 tool, 做相機 app 最o岩

http://bryanheisey.com/blog/?page_id=18


Jul 5 2010

CJCat lib, as3 library, and The Emitter Particle FX engine

http://code.google.com/p/cjlibrarycs4/

作者個blog:

http://cjcat.blogspot.com/


Jul 5 2010

屈機既 geom library for java

http://toxiclibs.org/


Jul 5 2010

cpanel alternative

http://www.webmin.com/index.html
http://www.vhcs.net/index.html
http://sourceforge.net/projects/zpanel/


Jun 14 2010

graphics framework for as3

http://www.degrafa.org/
呢個正。

http://visualrinse.com/2008/07/01/10-open-souce-or-free-flash-or-flex-code-libraries-you-need-to-check-out/
10 Open Source Or Free Flash Or Flex Code Libraries You Need To Check Out.


May 19 2010

真人油畫

http://alexameade.com/portfolio.html


May 7 2010

CSS tag menu 鼠黎鼠去個 concept

http://www.alistapart.com/articles/slidingdoors


May 6 2010

website theme is great

http://ielab.jp/


Apr 28 2010

Flipping books

http://www.rubenswieringa.com/blog/flex-book-component-beta
http://pageflip.hu/


Apr 27 2010

rpg maker, visual novel engine

http://tkool.jp/products/rpgvx/eng/material.html

http://renpy.org/wiki/renpy/Home_Page


Apr 27 2010

embed xml

[Embed(source="info.xml", mimeType="application/octet-stream")]
protected var EmbeddedXML:Class;

var ba : ByteArray = (new EmbeddedXML()) as ByteArray;
var s : String = ba.readUTFBytes( ba.length );
xml = new XML( s );

Apr 27 2010

forum 講寫 game,都會講 as3

http://forums.tigsource.com/index.php


Apr 26 2010

Understanding how a TriangleMesh3D works

http://www.david5.com/understanding-how-a-trianglemesh3d-works/


Apr 23 2010

How away3D 解決 Z-order Problem

http://away.kiev.ua/away3d/techdemos/zorder/


Apr 21 2010

a blog of designer and adv. flash

http://yourpalmark.com/


Apr 16 2010

MVC, pls learn this 好快睇曬

http://www.moock.org/lectures/mvc/


Apr 16 2010

KitchenSync

http://kitchensync.as3lib.org/

an ActionScript 3.0 library for sequencing animations and other time-based actions.


Apr 16 2010

Embed Almost Anything in Your SWF

http://dispatchevent.org/roger/embed-almost-anything-in-your-swf/


Apr 16 2010

a programmer blog

http://blog.brokenfunction.com/


Apr 14 2010

swf 是自己還是載入?

if(this.parent == stage);

(一日未 add child ,呢招都唔 work)

if (this.stage != null) {
}

but this work

load 入去個個,個 stage 會變左 null =.=


Apr 12 2010

FlashDevelop vs Flex Builder vs Flash

http://accelermedia.com/content/flash-actionscript-editor-flex-builder-vs-flashdevelop


Apr 9 2010

some great flash lib

http://blog.everythingflex.com/as3-libraries/
識得整 pdf!

http://code.google.com/p/as3corelib/
有用既 code library


Apr 7 2010

Box2D, a physics engine for Flash

http://box2dflash.sourceforge.net/


Apr 7 2010

少有既 flash game framework

http://pushbuttonengine.com/


Apr 1 2010

graffiti framework

http://www.nocircleno.com/graffiti/
作者個網
http://www.nocircleno.com/


Apr 1 2010

Papervision3D – Camera Perspective Change

// To increase perspective set the camera close and reduce the zoom
camera.z = -600;
camera.zoom = 40;

// To decrease perspective set the camera far and increase zoom.
camera.z = -1510;
camera.zoom = 180;

Mar 27 2010

要睇既要睇既

http://petitelaine.blogspot.com/
純粹記低

PS
睇黎要再諗一諗個blog 既 structure…


Mar 25 2010

得 Outline Material

http://forum.papervision3d.org/viewtopic.php?f=15&t=958&p=5060


Mar 25 2010

3D Font, papervision

http://www.packtpub.com/article/3d-vector-drawing-and-text-papervision3d-part1

3D 字!超靚!!!


Mar 25 2010

papervision, 關於上色

cube20100325

陰影很怪。

這個本應使用了 FlatShadeMaterial 去直接打光上去上色。

在 cube 上再加上一塊 bitmap mapping / movieClip mapping / colorMaterial

material = new CompositeMaterial();
var mat = new ColorMaterial(ColorLibrary.YELLOW_COLOR, THREE_D_OBJ_ALHPA);
material.addMaterial(mat);
var mat = new FlatShadeMaterial(_light, Conf.LIGHT_COLOR, Conf.AMBIENT_COLOR, 20, THREE_D_OBJ_ALHPA);
material.addMaterial(mat);

將兩個 material 合埋使用,

因為立體有了自身的顏身再上 flatShade 咁就靚曬啦!


Mar 25 2010

又係 flash 3D 人

http://www.zeropointnine.com/blog/


Mar 25 2010

相 -> 書

hypo-20100325

http://hypo.cc/12sq.html
台灣的產品
upload 相 -> 佢幫你印成書
堅靚。


Mar 24 2010

明天就是 deadline! (一)

24032010

還有很多立體要畫。

用了 papervision 。但經過不斷的 research, 聽聞 away3d 更好。

(聽聞)只少在 import 3D卡通時較易上手。

之後很想學 blender 或者 3D studio max,做一d 得意既 3D 動畫或者網站!

P.S. 明天就是 deadline,後面加了 (一),好明顯我知道這類 Post 應該以後陸續有黎!


Mar 24 2010

papervision,將 TriangleMesh3D 一開二

http://www.unitzeroone.com/blog/2008/03/17/papervision3d-cut-any-mesh-into-2-new-meshes-source/

halfsphere

http://www.unitzeroone.com/

btw,佢個 blog 都幾正~


Mar 24 2010

推薦網站

關於 adobe 的消息,都 ok 專業
http://www.bytearray.org/


Mar 24 2010

getDefinitionNames,成個 swf 既 library 抽出黎

http://etcs.ru/

up 俄文既 as3 library
最出名係 getDefinitionNames
成個 swf 既 library 抽出黎既 Class

SWF Explorer, 佢既應用
http://www.bytearray.org/?p=175


Mar 24 2010

Thread in as3

For Flash,
http://www.joristimmerman.be/wordpress/2009/01/11/pseudo-threading-in-actionscrip-as3/

For Flex,
http://blogs.adobe.com/aharui/2008/01/threads_in_actionscript_3.html


Mar 24 2010

呢個有趣,遲d 研究下

http://www.rentacoder.com/


Mar 24 2010

香港人之 blog

一個寫 mobile apps 既香港人既 blog
http://leoto.blogspot.com/

專欄
http://www.manincentral.blogspot.com/


Mar 23 2010

Flash Framework (二)

Flint Particle System
http://flintparticles.org/

Away3D
http://away3d.com/

ds – data structures for AS3
http://code.google.com/p/polygonal/wiki/DataStructures


Mar 22 2010

external assets swf (getDefinition)

package {
/*
the main swf that loads everything, starting with assets swf...
*/
import flash.display.*;
import flash.net.URLRequest;
import flash.utils.*;
import flash.events.Event;</code>

public class Requiem extends MovieClip {
private var AssetLoader:Loader;
private var Request:URLRequest;
private var AssetsURL:String = "RequiemAssets.swf"

public function Requiem (){
var Request = new URLRequest(AssetsURL)
var AssetLoader = new Loader()
AssetLoader.load(Request)
AssetLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete)

}

private function onComplete(e:Event):void{
trace ("Load Complete")
var ldrInfo = e.currentTarget as LoaderInfo;
ldrInfo.removeListener (Event.COMPLETE, onComplete)

var assets:MovieClip = e.currentTarget as MovieClip;
var Home:Class = assets.loaderInfo.applicationDomain.getDefinition("home")
var home:MovieClip = new Home()
addChild (home)
}
}
}

用黎 load 一個 swf,拎佢 library 裡面d 野出黎


Mar 22 2010

Developer Blog, Site 推薦 (一)

一定要 keep 住睇! 日本 developer 既蒲點,好多 idea 可以係到搵到
http://wonderfl.net/
http://beautifl.net/

比較淺
http://tutorials.flashmymind.com/

呢個係賣code 既,睇下都學到好多野
http://activeden.net/

一個鍾意玩 pv3d 既人既 blog
http://sebleedelisle.com/

show news 多
http://www.flashmagazine.com/

比較淺,可睇可唔睇
http://www.riacodes.com/

一定要睇,show 新 technique 多過教你寫 code
http://www.everydayflash.com/

papervision technical 野多
http://blog.zupko.info/

effect technical 野多,較難,推薦
http://www.dehash.com/

閒話家常,technical 唔多
http://www.blog.lessrain.com/

可以一看
http://flashenabledblog.com/

日本野! Good!
http://www.be-interactive.org/

好勁既 papervision3d blog
http://professionalpapervision.wordpress.com/

Flex Community, show news 多
http://blog.flexcommunity.net/

一個鍾意玩 Augmented Reality 既人既 blog
http://www.harrynorthover.com/blog/


Mar 22 2010

Flash Framework

GAIA Flash Framework
http://www.gaiaflashframework.com/
寫網站時試用,包了 swfAddress 同自動分頁

Papervision 3D
http://blog.papervision3d.org/
不用介紹吧,正在研究

PureMVC
http://puremvc.org/
MVC Model,還在研究中

XIFF
http://www.igniterealtime.org/
做 real-time community 用,例如 chatting,還在研究中

TweenLite
http://www.greensock.com/tweenlite/
做 motion tween 用

JiglibFlash
http://www.jiglibflash.com/blog/
Physics Engine For 3D,還在研究中

CASA Lib
http://casalib.org/
提供一大堆有用既 Class

BetweenAS3 (TweenLite d friend)
http://www.be-interactive.org/works/20090911/slide_betweenas3.html

Popforge
http://code.google.com/p/popforge/
Sound Library

Five3D

http://five3d.mathieu-badimon.com/
主要用翻 flash 10 個 3D engine 去做既 library