“Be inspired, enjoy your work, keep learning and never forget to play.” — gskinner

SVN and Flex Builder

Posted: October 30th, 2007 | Author: nuno | Filed under: Adobe Flex, SVN | 3 Comments »

Till recently I was using TortoiseSVN to do version control of my projects. I decided then I wanted to integrate SVN into Flex Builder and do all the svn commands from there directly. In the end it hasn't hard at all, I just followed the instructions from Ben Bishop's post.

Something me and others noticed here is that, since Flex Builder copies all the project root files and folders into "/bin", including the .svn directories, adding the "bin" directory to the repository will cause later problems.

A lot of people have posts about this and so nothing really new here but I wanted to write down what worked (and is working) for me.


Using code to play MovieClips in reverse and/or play them on a different frame rate.

Posted: October 24th, 2007 | Author: Ivan Valadares | Filed under: Actionscript3, Tutorial | 1 Comment »

One easy way to play movies clips reversed is to affect the currentFrame propriety. The problem is that currentFrame is read only, so you need to make a custom class that extends MovieClip where you can assign values to that propriety.

The class:

The MovieClip:
movieclipanimation.jpg

So with Tweener you can now play with your MovieClip. You can play it on reverse, play it on a different frame rate, and you can even use some crazy transitions.

Example:
example1.zip


Memory Leak in AS3 Loader Class

Posted: October 22nd, 2007 | Author: Tiago Bilou | Filed under: Actionscript3 | 27 Comments »

Today I came across a nasty memory leak in the Loader Class.

I was writting a simple screensaver class that loads external images from the hdd and displays them. Sounds simple? It is. The problem was that everytime I loaded an image, the system memory would go up. I started by checking my eventListeners. They where all weak referenced. I went through the code looking for places where I could be keeping a reference and hence preventing the GC to collect it, but I couldn't find any.

There is something keeping the GC from removing the old images from memory...

Everytime the Loader calls the load() method the image is read into memory and stays there. I tried calling the unload() method but that doesn't help.

Then, how can one remove the loaded image from memory? If you know please let me know...

The only workaround I came up with was gskinners unsupported method to force the GC

This works great, but I would like to know what's keeping the GC from removing the previous images from memory...
Let me know if you have an answer.

Example showing the memory leak


Air: Flv Snapshots

Posted: October 22nd, 2007 | Author: Idoru | Filed under: Actionscript3, Adobe AIR, Adobe Flex, Experiments, Tutorial, Video | 3 Comments »

I just had a go at air today,

A co-worker of mine needed an application that would make it easy for him to take snapshots of .flv files for a content management system, so i came up with the idea of having a go and doing it with air.

So as a follow up i'll make a little tutorial explaining how it works. As Usual you can have a look in the code for the intructions. And should you have any questions feel free to ask them.

Air application file -Thumb

Update: Now published with the final AIR version.


Using Flade

Posted: October 12th, 2007 | Author: Idoru | Filed under: Actionscript2, Flade Physics Engine, Physics Engine, Tutorial | 10 Comments »

Hi there,
Recently i had a project that had to be done in AS2, and to top that it needed to have some physics.

My first thought was, well i'll just use the AS2 version of APE, and then remembered that there isn't one.
Then i found flade.
Made by Alec Cove ( the same guy that does APE ).
Now I wanted to see some tutorials or documentation, but as expected for such an 'ancient' engine there were none.
So I decided to make a simple little tutorial on how to throw things arround using flade.

Files: Flade Example

Demo: Flade Demo

You will need Flash 8, and the Flade files found here.

So here's the code:


Double-faced Plane (or Cube with depth=1) in Papervision3D

Posted: October 11th, 2007 | Author: nuno | Filed under: Actionscript3, Code, Experiments, Papervision3d, Tutorial | 5 Comments »

Today I had my first experiments with Papervision3D and after some time playing around I wanted to try having a double-faced Plane() with a different material on each face.

Its likely that a better way to do this exists, but one way to emulate a double-faced Plane() is to have a Cube with depth = 1, and hiding all but the front and back faces. Here's a and the code.

The hint to do this was from ldoru and the car in the images too!

 Update:  I would not longer use such an approach to achieve a double-faced Plane() with a different material on each face. I would recommend using a DisplayObject3D with two normal one-face planes inside it.