The first beta of the new version of SWX was released yesterday. This new version brings AS3 and Flash Player 10 support. I decided to update CakeSWXPHP, to support this new version of SWX. You can download a new version, from my CakeSWXPHP page.
Archive for the 'Actionscript 2.0' Category
I took the time today to add a simple code generator to the SWX service explorer. Right now, it spits out inline AS2 code for your service methods. I’ll add AS2 class generation and ARP code generation in the near future…
Download the source code
or
Try it online
Enjoy!
So, you want to learn how to create a sexy blog in flash, creating posts, comments, database storage, …? Are you afraid of spending hours writing complex queries, parsing XML data or writing loads of php files? Don’t be, and see the power of cakephp and SWX combined. CakePHP being a rapid development framework for PHP and SWX, the native data format for the flash platform! Continue reading ‘flash remoting with SWX and CakePHP’
Aral Balkan released SWX version 1.0 a few weeks ago. I finally found the time to incorporate the changes into CakeSWXPHP! The changes include the swxAssembler class (instead of the old swfCompiler) and the rebranded service explorer.
Go to the cakeswxphp page for the latest downloads!
I took some time updating my cakeswxphp package to the SWX beta 1.3. One of the new features is the new service explorer from SWX.
You can test your cake gateway, pointing your browser to the /explorer/ directory, gateway location being: cake_amf_gateway.php
Go to the cakeswxphp page for the latest downloads!
Enjoy!
As some of you might know, I’m a great fan of the cakephp framework. It is a rapid application framework for php. Cakephp already had a subproject called cakeamfphp. Looking at the code from cakeamfphp, I was able to get SWX running and call the cake controllers as remoting services.
Go to the cakeswxphp page for the latest downloads…
Just copy/past in your cake directory! Gateway locations are:
swx.php (SWX)
amf.php (AMFPHP)
json.php (JSON)
Currently it uses an adjusted version of SWX, based on SWX beta 1.0. I will try to update it to future versions of SWX when I get the time…
More info about SWX and cakephp at:
http://www.swxformat.org/
http://www.aralbalkan.com/ (Aral Balkan, SWX author)
http://www.cakephp.org/
Enjoy!
Had a difficult time with ExternalInterface today. Ok, swfs work nicely together with javascript on a webserver, but when you access them locally, there are some security issues you have to deal with. The app I needed to created needed communication in both ways, so from swf to javascript and vice versa.
When you run the app locally through your browser, you get the security warning. In the security settings, you can add locations of local trusted files. Thing is: if you need communication in both ways, you need to specify the directory of the swf file, not just the file itself. Otherwise, only swf to javascript communication would work!
For a recent company site, I wanted to build in browser history support, to make the site more accessible. I used robert penner’s browser history before, but it never felt quite good: it requires an html hidden frame setup that communicates with flash & vice versa, using getURL to communicate with the javascript functions,…
So I searched for an alternative method, and found one which doesn’t use frames, uses ExternalInterface to communicate with the javascript code AND it supports deeplinking! Flash & accessibility, another milestone reached?
Just finished a little experiment to load flv’s from YouTube into your own swf files…
Every YouTube video has a unique id. You can find this id, using the public YouTube API. However, you’ll need more than this simple id to play the video’s in your own flash/flex/… application.
Continue reading ‘Playing videos from YouTube’
Have you ever tried extending the MovieClip class? The standard way is to create your actionscript class extending from MovieClip, adding a MovieClip symbol to the library, setting a Linkage Identifier and specify the Actionscript 2 class. To create an instance of your class on the stage, you have to use attachMovie(). Problems of this method are: it requires a great deal of “work” to create class file, create library symbol & set it up and your code is more difficult to port between projects (recreate the library stuff in each projects). However, there are ways to extend MovieClip, without using the library directly.


Recent Comments