UX & Product Designer

Chi Wai Li



Quick AS3 Tweening and easing Reference guide

Thanks to http://www.zedia.net/actionscript-3-tweens-tutorial/ import fl.transitions.Tween; import fl.transitions.easing.*; var myTweenX:Tween = new Tween(rectangle, “x”, Strong.easeOut, 0, 300, 3, true); var myTweenAlpha:Tween = new Tween(rectangle, “alpha”, Strong.easeOut, 0, 1, 3, true); var myTweenWidth:Tween = new Tween(rectangle, “width”, Strong.easeOut, rectangle.width, rectangle.width + 300, 3, true); var myTweenRotation:Tween = new Tween(rectangle, “rotation”, Strong.easeOut, 0, 90, 3, true);

Calculating tangent angle in AS3

To work out the angle of arrows, I have to use good old trigonometry. Something I have actually enjoyed back in high school. The problem solving was a good challenge for me. When I use to work as a volunteer in London, I also helped tutor kids with their home work and this was one of […]

Pulling in external jpgs with AS3

This is something I have done and forgotten so many times. So lets try add it here as a reminder. To add an image to flash. import flash.display.Loader; import flash.net.URLLoader; myImageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoaderReady); var fileRequest:URLRequest = new URLRequest(“XXX.jpg”); myImageLoader.load(fileRequest); public function onImageLoaderReady(e:Event) {       myContainer.addChild(myImageLoader); } Credits to Kirupa once again, a site with so much […]