Archive for the 'AS2' Category

Monty Hall / Let’s Make a Deal problem simulator

Sunday, July 3rd, 2005 by Thomas

I found this post about the Monte Hall problem on the Singularity blog and couldn't help but writing a little simulator...

I'm not going into the details again - it's a quite fascinating statistical problem that appeared in a US game show and apparently caused quite some controversy (here's a another good explanation).

I took the opportunity to try out FAME, which worked nicely thanks to the excellent first step tutorial by Carlos Rovira's (Towards Open Source Flash Development).

It might be worth mentioning that the latest version of Flashout only works with Eclipse 3.1.

Sample swf:
[flash]http://www.blog.lessrain.com/wp-content/upload/makeadeal.swf,500,100[/flash]

-> Et voilà - we truly double our chances by switching the door!

Read the rest of this entry »

Flash: Slider Class

Thursday, June 16th, 2005 by Luis

I quite like to use sliders in order to test some values while I'm developing a project.

Until now I've been using a simple draggable movie clip with startDrag() method. Sometimes I need to ease or jump to certain values, so this morning I decided to create a simple and quick Slider class with simple ease and jump to value features.

Sample swf:

[flash]http://www.blog.lessrain.com/wp-content/upload/slider.swf,400,250[/flash]

Read the rest of this entry »

Extending CSS capabilities in Flash

Monday, June 13th, 2005 by Thomas

Following up our post Flash: Using CSS I found out that Flash internally converts every CSS-class into a TextFormat Object. That's why it only supports CSS properties that have a direct relation to a TextFormat property. It doesn't support "line-height" for example, nor the TextFormat alternative "leading".

Read the rest of this entry »

Flash: GetURL Que

Tuesday, June 7th, 2005 by Luis

Interesting and useful getURL queueing class by Arthur Clemens and Martijn de Visser. Basically the class queues all getURL calls and executes them one after the other with a small delay.

Flash: Path Class

Friday, June 3rd, 2005 by Luis

Very interesting Path class by Ivan Dembicki.

Class file cache

Thursday, May 19th, 2005 by Thomas

We sometimes experience problems when updating classes through the CVS, which have an older timestamp than the one that was overwritten. I've been looking for this for quite a while and finally found out that and how Flash caches Classes as aso files:

More information from Macromedia (how to delete the cache)

A desktop tool to clear the class cache

Flash: Class conflict

Thursday, May 19th, 2005 by Luis

I heard about this before, but it never happens to me until yesterday...

Ericlin has an article decribing the problem, Name of class conflicts with loaded class.

Flash: Final solution -KillerBeacon

Friday, May 13th, 2005 by Luis

Finally I have find a clean solution in order to remove from the stage TextFields that were not created with createTextField() or movie clip instances that were not created with duplicateMovieClip(), MovieClip.duplicateMovieClip(), or MovieClip.attachMovie().

Read the rest of this entry »

Flash: Abbreviate Utility

Friday, May 6th, 2005 by Luis

I have converted one of the most valuables String prototypes you can find at layer51 into an AS2 static method.

The Protoype in question is a simple and handy abbreviate function written by craftymind about two years ago.

Read the rest of this entry »

Animation Package for AS2

Wednesday, May 4th, 2005 by Thomas

Don't know if you know this, but it seems pretty good! A whole bunch of animation classes, like MoveOnPath, MoveOnCurve, MoveOnCubicCurve, etc. which let you programmatically define splines to be used as runtime motion guides easing bouncing etc...

Haven't used them yet, just had a quick glance.

Check it out

Usage of the Proxy class

Friday, April 29th, 2005 by Thomas

I felt like posting this here, because I keep forgetting how to use Luis' very helpful Proxy class...

Read the rest of this entry »

Flash: Depth Control

Thursday, April 28th, 2005 by Luis

Maybe is old news but I didn't know about it. Basically I found the mx.behaviors.DepthControl in one of the example files provided with MX Pro.

Read the rest of this entry »