We wrote a nice little nifty AS2 class that removes everything from stage or movieclips, even objects you dragged on it.
It’s a simple class with 5 static functions:
3 public:
removeMovieClip()
removeTextfield()
removeButton()
2 private:
removeOther()
canBeRemoved()
It’s pretty straightforward as you can see.
Use it and download it here.
Technorati Tags: as2, class, flash, remove everything from stage
If ever you need to encrypt or decrypt something from in AS2 or AS3, this might come in handy for you. I’ve started off with the great encryption classes written for AS2 by meychi.com (currently offline), but felt there had to be a more user-friendly way of using them, so I got to work on it last night and think I’ve come up with a pretty elegant solution.
Read the rest of this entry »
Technorati Tags: as2, as3, encryption, flash
Not only the keyboard of my MacBook lits up in the dark, it seems to be equiped with a Sudden Motion Sensor or SMS.
This motion sensor is designed to protect your hard disk when the computer is dropped or undergoes severe vibration.
The Sudden Motion Sensor is designed to detect unusually strong vibrations, sudden changes in position or accelerated movement. If the computer is dropped, the Sudden Motion Sensor instantly parks the hard drive heads to help reduce the risk of damage to the hard drive on impact.
Ofcourse the sensor can be used for more vital applications as well. How about a game of Pong anyone? It has been done in Processing, so why not give it a try in Flash. Just for the sake of it!
Here is an example I’ve build using Java and Flash.
http://www.seeingisbelieving.be/blog/AppleSMS2Flash.flv
I know the ball is going at ‘loser’ speed, but hey it’s MY party and I cry if I want to!
Download the source code here:
http://www.seeingisbelieving.be/blog/AppleSMS2Flash.zip
Included are the Unimotion library and the Java API to work with it, the Flash files and the Java socket server.
The big picture is you use the Unimotion library in Java for detecting the motion and then send it to the Flash through a Java socket server.
Related links:
Lincoln Ramsey (created Unimotion library)
Daniel Shiffman (created the Java API for Unimotion)
Grant Skinner (for the Flash collision detection)
Info about the SMS
crossposted at seeingisbelieving
Technorati Tags: flash, osx, SMS, sudden motion sensor
Check out the movie below:
It is a motion tracking test with a recording function added to it.
Flash stores your movements in it’s memory (we all love array’s don’t we).
The left screen is the captured data, the right screen is the original incoming data.
I was using the flashlight on my cell phone as the light source, which was not very reliable.
But it’s working.
The data is captured at a rate of 1 millisecond at 800/600 resolution. That is not bad, not bad at all.
http://www.seeingisbelieving.be/blog/motion_detection.flv
crossposted at seeingisbelieving
Technorati Tags: flash 8, motion tracking