Flash Player can send images to web services like Amazon AWS. The built-in behavior requires the user to browse to an image on the user’s system using a system dialog to select the image for sending. It is possible to send an image from Flash Player without requiring the use of a system dialog to locate the image file, and even without the requirement of saving the image to the system before sending it! In fact, images can be sent without any user interaction whatsoever.
In a recent application we developed, we deployed a solution for capturing BitmapData of a playing video and sent the image to Amazon AWS. The thumbnail could be retrieved later for populating a display of the user’s video bookmarks.
- Capture a BitmapData object of something being displayed in a SWF – any display object
- Convert it to JPG. Several methods are available, we used: https://github.com/LeeBurrows/Async-Image-Encoders
- Using HTTP POST, send the image to Amazon (or anywhere) for storage. This is the difficult part. We derived our solution from Open Booth: https://github.com/obsesh/openbooth/
Tip 1: playing an FLV from your local machine.
To play a local video you must modify your config XML file to include a baseURL. Otherwise, the video fails to load.
Read the full article »
Recently I was unable to access Facebook while travelling in another country. I got an error message that DNS lookup failed. A friend using the same wireless router could access it. I rebooted and tried multiple browsers. My friend pinged facebook to detect their IP address and I tried entering it manually. Still no luck.
Finally, the solution was to change the DNS server to use Google’s DNS server. Who knew Google offered that service? https://developers.google.com/speed/public-dns/docs/using#setup
Using different versions of AIR with Flash/Flex publishing can be a hassle and requires odd code-monkey wrenching. When I need to overlay a different version of the AIR SDK over my Flex SDK I usually do a quick Google search to find the instructions. The Adobe Knowledge Base article dedicated to this usually pops right up, but my most recent search didn’t turn up any results. I discovered that the post has been renamed (seemingly to address the most common error that would lead someone to want to overlay a new AIR SDK).
Here’s the link to Adobe’s AIR overlay instructions: LINK
Here’s a quick reference to the Mac Terminal command that uncompresses the SDK package and overwrites all files: sudo tar jxvf AIR15_mac_sdk_XXXXXX.tbz2
Update: The article is now more helpfully titled again: “Overlay the AIR SDK with Flex SDK”
While we wait for Adobe’s Monocle to give us a better ability to analyze the operation of our CPUs/GPUs, here’s a few tools I heard about that will give you low-level information about what’s going on under the hood. Each of these tools will give you a visual display of what is drawn and uploaded each frame.
Ever wonder how to populate a Vector when you create it?
Here’s a way: Instead of using the *new* operator to create the Vector use global conversion to convert an Array into a Vector (note that the *new* operator is not used in the sample): Read the full article »