The last few days, I’ve been working on a Flash thingy that can grab barcodes from the webcam. This is another part of the project from my last post. It’s actually kind of fun getting my hands dirty with pixels again.
If you’re wondering what that white space below the webcam image is, JOIN THE CLUB. I’ve been through the code… I don’t know how many times. The Flash layout system hates me.
I’m sure that part of the problem is my ghetto open source development tools for Flash. But until I have $700 to sink into something that is mostly a hobby, this is what I have available.
And to everyone about to tell me to pirate it: eat me.
actionscript still sucks
July 10, 2006 9:49pm (4 years, 1 month and 3 weeks ago)Comments
Matthew W. Jackson
Jul 12, 2006 12:22am
Stick with FlashDevelop. I get completely lost in Flash Studio, but I rather like FlashDevelop. Then again, I’m a better at programming than drawing.
Jul 12, 2006 7:02am
Yeah, I am pretty much the same way. I just seem to have trouble positioning and sizing a video with it.
When I resize the movie to 320x240, the video is displayed at 256x192. It maintains the aspect ratio, but it’s always at a size smaller than the movie. I’d like it to take up the whole thing.
I’ve tried setting the width and height in the swfmill XML, I’ve tried many combinations of _width and _height for the video and the movieclip that it’s embedded in from actionscript… It’s just a bit frustrating.
When I resize the movie to 320x240, the video is displayed at 256x192. It maintains the aspect ratio, but it’s always at a size smaller than the movie. I’d like it to take up the whole thing.
I’ve tried setting the width and height in the swfmill XML, I’ve tried many combinations of _width and _height for the video and the movieclip that it’s embedded in from actionscript… It’s just a bit frustrating.
Aug 11, 2006 3:31am
Pirate? Well, that’s hardly the image we want for Long John Silvers!
I love the duplicitous nature of people who make money writing software pirating software.
I love the duplicitous nature of people who make money writing software pirating software.
Aug 11, 2006 4:07pm
Hey, I wrote some software pirating software once!
I used an event hook to run code in the target’s address space. The code rewrote its import tables to replace various functions used to uniquely identify my computer to the remote server. Returning random id’s allowed me to be in a perpetual free trial. I don’t know if this is a normal method, but surprisingly it worked.
I used an event hook to run code in the target’s address space. The code rewrote its import tables to replace various functions used to uniquely identify my computer to the remote server. Returning random id’s allowed me to be in a perpetual free trial. I don’t know if this is a normal method, but surprisingly it worked.
Aug 11, 2006 8:23pm
That reminds me of a long story.
I was once trying to write a program to randomize system sounds. Since there’s no system event for this in Windows, I decided to try to hook the
It worked well enough, but it turns out that a great deal of system sounds are not generated by user processes, so all it ended up randomizing was the Empty Recycle Bin and New Mail sounds. Sounds played by message boxes and by clicking on modal windows are apparently generated by a kernel process.
So I figured out how to hook the kernel process, but it involved changing a registry key to cause my library to load at system startup. I did this, rebooted my machine, and almost immediately hit a blue-screen-of-death STOP error.
Apparently I did not realize that my debugging code, which displayed a message box to indicate that my event hook was firing, was causing the kernel to crash. This was because the kernel does not have a desktop in order to perform any kind of user interaction.
I was unable to boot my machine, even in safe mode. I had to put in my Windows disc, run the recovery console, delete my library, and reboot.
At that point I decided that I was not comfortable with my code running in the kernel, and what I was trying to accomplish was not worth creating a potentially unstable system.
I think if I ever try to write the program again, I’ll use an idle-priority thread to randomly change the registry settings for system sounds. Since frequently-read registry settings tend to stay in memory and not on disk, it should perform pretty well.
I was once trying to write a program to randomize system sounds. Since there’s no system event for this in Windows, I decided to try to hook the
PlaySound function in all user processes and change the registry setting for that sound immediately after playback.It worked well enough, but it turns out that a great deal of system sounds are not generated by user processes, so all it ended up randomizing was the Empty Recycle Bin and New Mail sounds. Sounds played by message boxes and by clicking on modal windows are apparently generated by a kernel process.
So I figured out how to hook the kernel process, but it involved changing a registry key to cause my library to load at system startup. I did this, rebooted my machine, and almost immediately hit a blue-screen-of-death STOP error.
Apparently I did not realize that my debugging code, which displayed a message box to indicate that my event hook was firing, was causing the kernel to crash. This was because the kernel does not have a desktop in order to perform any kind of user interaction.
I was unable to boot my machine, even in safe mode. I had to put in my Windows disc, run the recovery console, delete my library, and reboot.
At that point I decided that I was not comfortable with my code running in the kernel, and what I was trying to accomplish was not worth creating a potentially unstable system.
I think if I ever try to write the program again, I’ll use an idle-priority thread to randomly change the registry settings for system sounds. Since frequently-read registry settings tend to stay in memory and not on disk, it should perform pretty well.
Leave a comment
Accepts BBCode with a few enhancements.

