Laboratories, experiments using Flash (Actionscript).

Liar's Dice is live and available at the stores, visit liars.online for more information.

Liar's Dice online multiplayer

Mr Ludo is already live and available at the stores, visit mrludo.com for more information.

MrLudo official website

Traffic Wonder is already live and available at the stores, visit trafficwonderapp.com for more information.

Traffic Wonder official website

Hi, thank you very much for visiting YoAmbulante.com Labs. This is my private kitchen where I make and publish all experiments I do playing around with Adobe Flash. Feel free to navigate through the sections, commenting about the things I do and why not helping me to improve in those things I may doing wrong or could be done better.

Disclaimer

First of all I'm NOT here to impress someone with my demos or experiments, and perhaps it is true you're a far much better developer than me (I'm competing with nobody). I'm here just to discuss programming subjects and exchange knowledge. Be sure that the content you read is appropriated to your programming skills in order to avoid feeling disappointed, I always write a brief description about the article pointing its complexity level on its header.

Second of all I do appreciate all the time that I have spent trying to figure out the best way to do things (hours, weeks, months, which means sacrifices when we have strong commitments). So as I'm a drunk programmer and at the end of the day after paying taxes and bills the spare cash left is not much, I hope that you before downloading any source code from this web site don't feel upset if it asks you for making a small contribution (a beer), we are here to help each other.

And finally I would like to say that I'm not responsible for bad interpretation or manipulation of resources you might find and download from yoambulante.com. It is all about sharing the things I do which they are not always completely finished and they can contain some errors, especially those that were not hardly tested.

If you want to find out more about me, please click on this link. Note that english is not my mother language so I do apologize in advance if some of the content here is tricky to interpret (weird sense), please feel free to write me any comment, any question of a subject that you would like to clarify or why not give me a sugestion about how to improve what I'm doing. Use the contact form at any time.


Keep in contact (RSS feed)

Add yoambulante in your RSS feeds If you would like to be notified every time I publish an article or write down something in my blog that could be of your interest, just add YoAmbulante in your RSS feeds. Just in case you're not familiar with RSS feeds, In outlook (version 2007 or higher) it is so simple; In your Mailbox folders, right click in RSS feeds and then click in the option "Add a new RSS feed...", that's all, I think it is as simple as it is in any other software.


These are the things that I have done in my spare time and worth to be shared, I think

PeopleMundi (Fix Planet Earth)

date: 01 Apr, 2011, actionscript: 3 (FP10)
Select target cursor on Fix Planet Earth

Couple of weeks ago, by chance I read some articles (from different sources) about global warming, overpopulation, worldwide resources, world's education and that entire thing you might have heard already about humans destroying the planet slowly. I know that you may be feeling a bit tired about this subject but I was actually thinking what if you have a real chance of making instant-huge changes on earth, what would you do?

Finally yesterday I got a chance of working in some reports and enhance the results of people's decisions and bombs dropped around the globe; basically you can now click on any affected country and see where the different bombs were dropped and also where they were triggered from based on people's IP address (don't take it too serious, they can be tourists from different places, lol!), here is the link results, also I have enabled comments.

Unity and Flash marriage (Tetris3D in 2.5 days)

date: 10 Dec, 2012, actionscript: 3 FP11, complexity: complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5, feedback (votes): users score 5 of 5 (274 votes)users score 5 of 5 (274 votes)users score 5 of 5 (274 votes)users score 5 of 5 (274 votes)users score 5 of 5 (274 votes)
Tetris World Records

Recently, there is a lot going on regarding to games development. Mainly speaking about how prominent Unity3D is becoming, we can hear more and more people speaking about it everywhere; even my wife (who doesn’t understand anything about games development) asked me these days about it, she said; hey! what’s that unit 3d plug-in for? Is that a kind of Adobe Flash competitor? I said; well to be honest I don’t know enough about it for calling it “competitor”. more...

Traffic Wonder was made in Flash

date: 19 Feb, 2012, actionscript: 3.0, complexity: complexity level 5 of 5complexity level 5 of 5complexity level 5 of 5complexity level 5 of 5complexity level 5 of 5, feedback (votes): users score 5 of 5 (301 votes)users score 5 of 5 (301 votes)users score 5 of 5 (301 votes)users score 5 of 5 (301 votes)users score 5 of 5 (301 votes)
Traffic Wonder Level Small

This is a funny thing, nowadays, even in this first quarter of 2012 when I speak with developers sometimes they get surprised when I say that I am working in an iOS project using Adobe Flash, people say, ehh? Hmmm? How come? Adobe Flash is not supported on iPad, nor on iPhone... To be honest I can't understand how Adobe has not made this very clear, people still think Flash is banned from iOS and only few of us know that this is complete a misunderstanding (this is wrong). Flash is not supported on safari browsers (in Apple mobile devices), so are not other plug-ins such as; java applets, unity3d, etc... but people don't see this; the only thing they see is Flash can't run on iOS. I have spent countless hours testing adobe flash on iOS (yes using adobe air), my final conclusion is that it will never be (in terms of performance) as good as an app natively made in Objective C, but hey, this is not new for us, it was always like that, same on PC, same on MAC, we can't compare Flash with programs made natively in C++ and other languages that work closer to hardware. So we are in a very similar position to where we were before; depending on what we would like to achieve Flash will perfectly satisfy all our needs, as usual. more...

A good comparison between HTML5 and Flash

date: 04 Feb, 2011, actionscript: HTML5, complexity: complexity level 4.09 of 5complexity level 4.09 of 5complexity level 4.09 of 5complexity level 4.09 of 5complexity level 4.09 of 5, feedback (votes): users score 5 of 5 (284 votes)users score 5 of 5 (284 votes)users score 5 of 5 (284 votes)users score 5 of 5 (284 votes)users score 5 of 5 (284 votes)
moving a balloon in HTML5

HTML5 is here to stay, it is for us, and it is for helping us with that boring monkey job nobody likes to do like making a video player with scroll progress and navigation buttons, or making a basic photo gallery with enchanted options, etc. If you are trying to do something more complicated than that, I am afraid you are going to waste a lot of time dealing with very annoying things like cross browser inconsistencies, performance issues, plus you never know if that thing will work in new browsers in the future. The main problem of HTML is and will be always consistency; it looks different among browsers when you are dealing with advanced features, careful, it could be a big pain, keep it simple if you want to sleep well. more...

Acoustic recording and playing back in Flash

date: 10 Jan, 2011, actionscript: 3.0, complexity: complexity level 4.5 of 5complexity level 4.5 of 5complexity level 4.5 of 5complexity level 4.5 of 5complexity level 4.5 of 5, feedback (votes): users score 5 of 5 (284 votes)users score 5 of 5 (284 votes)users score 5 of 5 (284 votes)users score 5 of 5 (284 votes)users score 5 of 5 (284 votes)
Brazilian Pagode MIDI

Here we are once again speaking about midi files and how to use them in flash through actionscript. In my previous article "from fruityloops to actionscript" where I am explaining deeply my approach of loading midi files and play them with a certain predefined samples set, I did mention that dealing with acoustics instruments could be a waste of time due to the complexity of waveforms and how we link them making transitions smoothly. What I meant is that all samples of an acoustic instrument recording rely each other and they have to be played in the same sequence order otherwise it sounds just broken. Well, that's true but it is not too bad at all and there are some things we can do with it. more...

From Fruity Loops to Actionscript

date: 30 Nov, 2010, actionscript: 3 FP10, complexity: complexity level 4.2 of 5complexity level 4.2 of 5complexity level 4.2 of 5complexity level 4.2 of 5complexity level 4.2 of 5, feedback (votes): users score 4.99 of 5 (289 votes)users score 4.99 of 5 (289 votes)users score 4.99 of 5 (289 votes)users score 4.99 of 5 (289 votes)users score 4.99 of 5 (289 votes)
TeslaColor MIDI reader

About 3 years ago, when actionscript 3 was born, Andre Michelle came with the idea of injecting audio data into a ByteArray (binary SWF structure) for generating dynamic audio, I did have a go with this approach for creating my own music dynamically (on the fly) based on pulses previously stored in a MIDI file, which it worked fine but it wasn't too good in terms of performance and synchronization, especially creating long sequences by linking audio files where easily all of them get out of synch in slow machines. So I forgot about all this till Adobe has introduced into the flash player platform (FP10) the very famous SampleDataEvent.SAMPLE_DATA, giving us lots of ways for generating dynamic audio. more...

The word is 'interpolation'

date: 03 Oct, 2010, actionscript: 3 FP10, complexity: complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5, feedback (votes): users score 4.99 of 5 (314 votes)users score 4.99 of 5 (314 votes)users score 4.99 of 5 (314 votes)users score 4.99 of 5 (314 votes)users score 4.99 of 5 (314 votes)
Image resize using Bicubic interpolation

Before showing some examples about interpolation, I would like to explain a little bit what it does mean and why it is so important. Interpolation is a mathematic magic process; it consists in construct new data points within a range of known data points. There are some mathematic patterns (algorithms) for generating missing data between points; I've learned some of them when I was working in an application which required scaling, resize bitmaps. I don't know if you have notice that when you resize an image through Action Script It doesn't look as good as it looks when you do the same in Photoshop more...

The mystery of parallel lines

date: 11 Aug, 2010, actionscript: 3 FP10, complexity: complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5, feedback (votes): users score 4.98 of 5 (297 votes)users score 4.98 of 5 (297 votes)users score 4.98 of 5 (297 votes)users score 4.98 of 5 (297 votes)users score 4.98 of 5 (297 votes)
The psychometric test

This is an algorithm I did for detecting the distance between parallel lines, no matters their positions or rotation. This is a quite simple and light algorithm that can be implemented on any programming language. Just few weeks before the cup I have received an advertisement email speaking about of a competition, a flash game competition with subject as "the biggest flash competition ever", then I took a quick look on it, and well after I read it what I can say is that it took my attention because of the big amount of people participating on it and of course because of the great prizes. more...

Elastic Collisions Inspiration...

date: 11 Apr, 2010, actionscript: 3 FP10, complexity: complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5, feedback (votes): users score 4.98 of 5 (312 votes)users score 4.98 of 5 (312 votes)users score 4.98 of 5 (312 votes)users score 4.98 of 5 (312 votes)users score 4.98 of 5 (312 votes)
Science museum london

First time I worked with elastic collisions was using action script 2, after many tests I did the performance of all these formulas were quite good due to its simplicity of how it works. The main concept is quite simple; an elastic collision is a collision between two objects (bodies which have mass) where the total momentum of the objects colliding are preserved. In other words, none of the energy involved in the collision is lost; it is distributed between the action objects depending on their mass and speed they got when the collision happened. more...

The verlet integration in 9 minutes!

date: 20 Mar, 2010, actionscript: 3 FP10, complexity: complexity level 3.5 of 5complexity level 3.5 of 5complexity level 3.5 of 5complexity level 3.5 of 5complexity level 3.5 of 5, feedback (votes): users score 5 of 5 (322 votes)users score 5 of 5 (322 votes)users score 5 of 5 (322 votes)users score 5 of 5 (322 votes)users score 5 of 5 (322 votes)
The Verlet Integration

The first time I heard about Verlets was about 10 years ago I think, when I was working on a C++ program building a dynamic animated bridge, at that time all documents and resources I found about Verlets were really confusing and at the end I gave up on it (sometimes people are too complicated for explaining simple things). Last year 2009 in flash on the beach (Brighton, UK) when I was attending the session of Keith Peters, he came with some really good ideas about how to implement the "Verlet Integration" in flash using actionscript 3 in a very, very easy way that makes my imagination fly. more...

Balloon algorithm in actionscript 3

date: 03 Oct, 2009, actionscript: 3 FP9, complexity: complexity level 4.09 of 5complexity level 4.09 of 5complexity level 4.09 of 5complexity level 4.09 of 5complexity level 4.09 of 5, feedback (votes): users score 4.94 of 5 (317 votes)users score 4.94 of 5 (317 votes)users score 4.94 of 5 (317 votes)users score 4.94 of 5 (317 votes)users score 4.94 of 5 (317 votes)
balloon moving around

In this experiment I made a rope (string) based on 30 dots linking them each other by using Splines curves. There is not mystery on this project, it can look complicated but it is not, it is based on the normal behaviour of Verlet particles. Verlet concept is very simple but looks like a huge monster engine running behind when what it does is basically moving dots on the screen based always on their previous positions, so the speed and direction of each dot is defined just by using the difference between its current position and the previous one and at the end all we need to do is just stick all dots together again trying to maintain same distance they got from the beginning to maintain its shape (polygon made of these dots). more...

The fastest poker hands evaluator ever

date: 01 Oct, 2009, actionscript: 3 FP10, complexity: complexity level 4.09 of 5complexity level 4.09 of 5complexity level 4.09 of 5complexity level 4.09 of 5complexity level 4.09 of 5, feedback (votes): users score 4.98 of 5 (287 votes)users score 4.98 of 5 (287 votes)users score 4.98 of 5 (287 votes)users score 4.98 of 5 (287 votes)users score 4.98 of 5 (287 votes)
Poker evaluator

Few months ago I've been working in a project where I had to validate poker hands (based on 5 cards) and also calculate what the chance is for all possible hands depending on their rank from highest card to straight flush and then show percentages for each possible future hand type. Well, it looked to me a bit simple before starting but once I took a quick look on the web and I started building up the logic of it, I just realized that it is something really, really complicated. A poker hand of 5 cards can have lots of different combinations which mean that it might need lots of validations and conditions depending on each hand rank (I'm not speaking about few more...

Mr Grass, The grass movement algorithm

date: 25 Nov, 2008, actionscript: 3 FP9, complexity: complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5, feedback (votes): users score 4.98 of 5 (335 votes)users score 4.98 of 5 (335 votes)users score 4.98 of 5 (335 votes)users score 4.98 of 5 (335 votes)users score 4.98 of 5 (335 votes)
how the grass was made

When YoAmbulante idea came to my mind I just started thinking in how the website will look like more than the content itself and programming features. From the very beginning my idea was making something simple and clear and then it was here when I made the header of the web based on a grass algorithm. Why grass and not something else? Well, it was always tricky for everybody making things looking natural, especially animations based on nature things, they are hard to achieve... more...

Predicting the landing position

date: 04 Feb, 2007, actionscript: 3 FP10, complexity: complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5complexity level 4 of 5, feedback (votes): users score 4.98 of 5 (275 votes)users score 4.98 of 5 (275 votes)users score 4.98 of 5 (275 votes)users score 4.98 of 5 (275 votes)users score 4.98 of 5 (275 votes)
ball collisions and reactions

It was one of the most interesting experiments I have ever done. It is about of a ball falling down hitting everything on its way down like a pinball game ball, front the begining my biggest question on this project was if it is possible predict the landing position of the ball when its path is not actually predefined, it is begin defined on the fly completely at random in every single frame of animation. Why would we need to know the landing position of it? Well, in most of the cases when we are working in client/server architectures absolutely everything is processed (in terms of records, operations and results) in the server side and the front-end (client application) is not more than a slave user visual interface more...