Register the necessary event listeners to the class and react to events such as dragging a file / element over your swf, dropping data or dropping a file on the swf.
You don’t need to add any extra javascript to your flash embed, the javascript necessary to add the drag and drop support is injected automatically.
You can detect the drag and drop events in the latest versions of Firefox, Safari and IE. Accessing the content of the dropped files only works in the latest version of Firefox (try dropping an image).
Some of my students are working on a project where they need a photo-booth-like keying application (take snapshot with somebody out of the picture, then step back in the picture and the background disappears). I’ve been experimenting with pixelbender the last week, and created some classes that do just that.
Check out the example, and play around with the parameters. Please note that it works best with a background without too much detail or similarities with the person in front. Also make sure there’s enough lighting.
Again, some release notes (same as FCKEditor actually :-)):
When you extract the zip file, you will find an swc file, an assets folder and de demos folder. If you want to use CKEditor in your own Flex or AIR projects, add the swc to your library path, and the assets folder to your src folder (just like the demo projects).
When you use the component in a Flex project, you need to ensure you set the wmode property to ‘opaque’. Also, if you run it on your local filesystem with Internet Explorer, you won’t see the component. It works fine if you run it on a webserver.
One of the most wanted features in Adobe Flex / AIR is a better Rich Text Editor. There are some great ones available for javascript, so why can’t we have an editor with the same featureset? Well, it is actually possible to incorporate existing javascript editors in your Flex / AIR applications.
When you extract the zip file, you will find an swc file, an assets folder and de demos folder. If you want to use FCKEditor in your own Flex or AIR projects, add the swc to your library path, and the assets folder to your src folder (just like the demo projects).
When you use the component in a Flex project, you need to ensure you set the wmode property to ‘opaque’. Also, if you run it on your local filesystem with Internet Explorer, you won’t see the component. It works fine if you run it on a webserver.
Currently it’s possible to get / set the htmlText, and change the toolbar set. I hope you enjoy this component, if you find any bugs or have feature request, feel free to post them in the comments.
I had to create bigger scrollbars, for a flex project which had to run on touchscreens. Their isn’t a real style or property which enables you to do this, but thanks to programmatic skinning, it is quite easy.
First of all, create a class which extends mx.skins.halo.ScrollTrackSkin. In this class, you override the measuredWidth() and updateDisplayList() functions:
The last class you have to create, is for the scrollbar arrows. This class extends mx.skins.halo.ScrollArrowSkin. Again, you have to override some methods: measuredWidth, measuredHeight and updateDisplayList:
Now and then, I have to use the drawing API to draw a gradient, or a bezier curve. Every time, I have to dig through the help, to check the meaning of the different parameters, and where they belong in the function call. To make this more easy, I created a little code generator for gradients, and for drawing bezier curves with Actionscript 3.0.
Last saturday I went to the Adobe Usergroup meeting in Gent (Belgium). It featured the Adobe Prerelease tour, Christophe’s presentation about Prana and, last but not least a presentation about lovely charts. Loverly Charts is an application to created flowcharts and diagrams online. This reminded me of a project I’ve been working on now and then the last 3 years. It doesn’t have a title / name yet, but it is a flowcharting application aswell.
You can created flowcharts, which are stored in a database. The flowcharts have metadata, like the perspon who is responsable for that chart, name, description, etc… Each step in a flowchart has metadata aswell. Charts can be linked to eachother, so you can describe a main proces which links to sub-processes aswell.
Cakeswxphp enables you to use the cakphp rapid application framework as your remoting backend. No longer writing complex sqls, escaping query strings,… As some of you have noticed, cake does slow your remoting down a bit, as more classes are loaded to give you this ease-of-use. I did some benchmarks, comparing amfphp and swx with cakeswxphp 1.1 and cakeswxphp 1.2. I ran the echoData service 10 times, and took the average speed of those calls. These are the results:
As we already know, AMFPHP is fast as hell. The CakePHP version is 2x slower because of the extra classes & functions cakephp executes. The difference between SWX and CakeSWX isn’t that big.
After that, I turned out eaccelerator (PHP caching / accelerator system) and ran the benchmark again:
Not much difference between the first results without the caching, except for the Cake AMF gateway: it seems like using a php accelerator makes the cakeamfphp almost as fast as the native amfphp!
Recent Comments