Check out "Do you speak JavaScript?" - my latest video course on advanced JavaScript.
Language APIs, Popular Concepts, Design Patterns, Advanced Techniques In the Browser

Part 1: We need channels! A gentle introduction to communicating sequential processes.

posted in Riew on 2020-01-06   riew csp routine go javascript channels put javascript fibonacci index function return pattern fibonacci number

CSP is a formal language for describing patterns of interaction in concurrent systems. It's used in Go, Crystal, Clojure's core.async and a couple of other places. The idea in its core is nothing so complicated but it offers some interesting capabilities. Surprisingly enough it is not really popular in JavaScript. Recently I'm exploring this pattern and here are my findings.

read more

5 useful ActionScript 3 tips

posted in ActionScript on 2011-05-24   movie color function date movie getchildat month number return tips

Sometimes, when you work on some project, you find something that is small, but very interesting and useful. Usually I'm adding such kind of things in classes that I like to call helpers. The following tips are part of my helpers.

read more

AS3: dynamic text field to curve (TextField on an arcing path)

posted in ActionScript on 2011-05-04   text var curvedtext textformat number radius tf direction endangle startangle

[2]Most of the articles here are tightly connected to my daily work. As you probably know from one of my latest posts (runtime font loading/embedding) I worked a lot with texts these days. There was a request for producing curved text from a dynamic field. Of course it wasn't so easy to create such a feature. I wrote a simple class that did the job and I decided to share it.

read more

Distort MovieClip in Flash with AS3

posted in ActionScript on 2010-09-05   getrandomnum clip setting mtd tweentype out_expo end getrandomnum distort private function number movieclip distortimagewrapper

As you probably know there is no simple way to distort a MovieClip in Flash. The solution that I've found uses AS3. Special thanks to Thomas Pfeiffer and Ruben Swieringa. They share their experience with this problem.

read more

Papervision3d: Finding 2D coordinates of a 3D object

posted in ActionScript on 2010-07-25   private var 3d number import org papervision3d addsphereandtooltip item mousey mousex basicview displayobject3d event

Papervision3d is probably the most popular 3D flash engine. There are dozen of applications/sites that use it. These days I also decided to create a 3D effect in my portfolio site. Everything works fine, but I needed a tooltip for each of the 3D objects on my scene. To be able to animate everything I needed 2D coordinates of all my 3D elements.

read more