Vanilla Ice small udpate.

Added extractTo method and top-level function.

If you already have object, and you just want to update it fields, use extractTo method. This method will automaticaly extract type of the target object:

Tip: Cut the “hole” inside shape

I had a need to lock the screen except a specific area. All existing solutions have not helped.
A good way was suggested to me by The Rabbit:

That code is drawing a rectangle with hole, it’s blocking mouse events (except hole area).


Easy converting of dynamic Object to strongly-typed.

If you’ve ever developed a client-server application, you should know how much pain delivers manual parsing of dynamic data in a typed structure. I guess you hate that (most simple example):

Well, I have a great solution for you. Jonny Reeves wrote the great library Vanilla, which will help you to deal with it.
Look, how it’s simple:

That’s it. Now go and take that!

AS3 JSON Formatter

Simple function that allows you to format serialized JSON.


Ссылка на Github.