PHP Tutorial – Bypass the Need for a Cross Domain Policy File When Loading Images in Flash
We are working on a project for a client that has a very troublesome requirement as part of the custom content management system—the ability to enter ANY image URL into an HTML text field for use within a custom Flash application that we built.
This is troublesome because although the client does own the rights to the images they are using, they do not have any easy way to implement crossdomain.xml policy files on their image servers.
SO, we needed to come up with a workaround—hence the example below. Please keep in mind that this is just an example and the version optimized for other image types/videos/error checking/etc. is not posted.
<?php
// GET THE PATH OF THE TARGET IMAGE
if (isset($_GET["img"])) {
// READ THE CONTENTS OF THE IMAGE
$handle = fopen($_GET["img"], "rb");
$contents = "";
while (!feof($handle)) {
$contents .= fread($handle, 8192);
}
fclose($handle);
// DISPLAY THE IMAGE
header ("Content-Type: image/jpeg");
echo $contents;
}
?>
Punchkick Interactive has authored it’s first article for Adobe.com. Zak Dabbas and myself (Ryan Unger) co-authored Developing Flash Lite for BREW applications for Verizon Wireless. This article covers not only the technical side of developing applications for BREW for Verizon Wireless, but also the marketing aspects of distributing content directly to Verizon Wireless or to a content catalog partner such as Atom Entertainment, FunMobility, or Smashing Ideas.
The article has three main sections:
1. Understanding the Flash Lite for BREW marketplace
2. Becoming an authorized Qualcomm BREW developer
3. Testing content on a Verizon Wireless handset
Read the full article on Adobe.com
Introduction
At the October 2006 Adobe MAX conference, Adobe and Verizon Wireless announced a partnership that would make Flash Lite content available to over 37.5 million Verizon Wireless subscribers. Flash Lite developers were understandably excited about the announcement, and teaching developers how to create content for Verizon Wireless became a central focus of the MAX conference.This article will teach you how to develop Flash Lite for BREW content directly for Verizon Wireless. It will detail the process of becoming an authorized Qualcomm BREW developer, testing your Flash Lite for BREW content on a Verizon Wireless handset, and selling your content through Verizon Wireless.
In addition to understanding the technical specifics of creating Flash Lite for BREW content, this article will also discuss the pros and cons of using the direct model for developing and distributing Flash Lite for BREW content—including the real costs and anticipated returns on your development investment. It will also briefly cover the process of selling content through an content catalog partner, and the pros and cons associated with doing so.
Also, we would like to thank Phil Pastore for helping out with the headshots.
Learn more about Punchkick Interactive’s Flash Lite development capabilities.
Adobe began shipping the much anticipated CS3 design and Web software bundles. Additionally, Adobe has added several software titles to Labs.
Amongst the new Beta software in Labs is:
- Adobe After Effects CS3 Pro
- Adobe Premiere CS3 Pro
- Adobe Soundbooth CS3 beta 3
- Flash Lite for BREW Publisher for Flash CS3 Professional prerelease
- knowhow (preview)


After Effects and Premiere have been long overdue. I am very excited to play with both titles. Soundbooth is great and new beta versions are always fun.
The Flash Lite for BREW Publisher is obviously needed. I am very happy that Adobe released this tool. The only thing they neglected to include was a Mac bundle (sigh). I am sure that there are other developers that will only use one licenced copy of Flash CS3 (in my case on my Mac), and will need to create Mod/Mif files from it.
I am also very happy to see the knowhow demo. It seems like a great panel to add to the CS3 suite.
knowhow is a technology preview that delivers single-click, contextual access to relevant help information from a panel in Adobe® Creative Suite® 3 software. knowhow gives users access to a wide variety of information—basic tool descriptions and short cuts, Adobe Help content, as well as community-generated tutorials, tips, and techniques on the web.
First let me preface this by saying that this trick currently is only support by Flash Player. Flash Lite does not support PNG-8 files with alpha made with Fireworks (Note that it may be a handset issue and not a Flash Lite issue). If you want to petition for this feature, feel free to comment and I will pass the “signatures” along.
I understand that you can create a PNG-8 image file with alpha transparency using Adobe Photoshop. However, those files are far more inferior than a PNG-8 image that is created using Fireworks. I will demonstrate why a Photoshop PNG-8 lags behind a Fireworks PNG-8 in the follow paragraphs.
First off, PNG-24 looks better than anything else, but the filesizes are much larger than any other format. The ideal goal would be to create a PNG-8 with alpha that looks like a PNG-24—Fireworks comes close. Both Adobe Photoshop and Fireworks allow you to save a PNG-8 file with alpha, however, a Fireworks PNG-8 lets you combine color data with alpha much like a PNG-24.
To get a clearer understanding of what I mean, create a file with Adobe Photoshop and set the background to transparent. Next, create a new layer—fill it with content—then blur it to death. You will have created pixel data that has both color and alpha transparency. Use the “Save For Web” dialog and notice the differences between the PNG-24 and the PNG-8. The PNG-8 will be much smaller, but look much worse than the PNG-24. Click the image to see a larger version—it shows what I mean.
Next, take that PNG-24 and import it into Fireworks. In the “Optimize” panel, match the settings that I used and select File >> Export. You will be exporting a 256 color, PNG-8 with alpha transparency (you may not even need all 256 colors).

Finally, review the different options for image files that use transparency. As you can see, the PNG-8 created with Fireworks looks almost exactly the same as the Photoshop PNG-24, however, it is less than 1/3 the file size. This method of creating PNG-8 files with alpha will benifit any Web designer that creates Flash Web sites or banners.
Bluestreak Technology, Inc., the developer of the award-winning MachBlue™ platform for mobile phones and digital television, announced this week that MachBlue Mobile will be commercially available for J2ME-compatible mobile phones.
MachBlue Mobile implements a subset of the Flash 7 specification, supplemented with the MachBlue Mobile API enabling enhanced handset control and integration.
MachBlue’s unique APIs give complete control over device functionality, without the need for low-level coding. The platform also minimizes memory usage, maximizes execution speed, and retains application portability.
Developers use MachBlue Studio, in tandem with Adobe Flash to quickly create mobile applications. And the same developers can easily use MachBlue Studio to create companion applications for digital TV set-top boxes.
MachBlue™ Studio, Mobile Edition
- Enables live, one-click testing from the developer’s PC to the target handset
- Fully integrated with Flash® authoring tools, available from Adobe Systems
- Includes tutorials, integrated help, and code samples
- Includes Windows® emulator for easy content testing
- Supports standard image types, including GIF, PNG, and JPEG
- Includes robust extensibility layer for easy access to new hardware and software features
MachBlue™, MachBlue™ Studio, and the Bluestreak logo are trademarks of Bluestreak Technology, Inc. Adobe and Flash are registered trademarks of Adobe Systems, Inc. in the United States and/or other countries. Windows is a registered trademark of Microsoft Corporation.
Source: Flash Lite Yahoo User Group


