Archive for the 'Flash' Category

Issue with PDO Adaptor wrt MySQL DateTime Datatypes in AMFPHP Remoting

Lately, during a project development involving PHP 5, MySQL 5 and AMFPHP 1.1 Remoting, we realized that there is an issue with the PDO Adaptor that comes with AMFPHP with respect to the MySQL DateTime datatypes. Well, we would like to term it more of a missing feature than a bug/issue and hope to see it included in the next release of AMFPHP with the updated PDO Adaptor bundled.

Basically AMFPHP comes with various recordset adaptors depending on what database/abstraction layer you are using, like mysqli, PDO etc. The adaptors that currently comes with it, do not convert datatypes correctly when returning the recordset to Flash. Selecting a datetime datatype returns a string date to flash as opposed to a date object.

And since the timezone offset is not included in the date string, the flash client parses the datetime with an incorrect timezone offset.

23HQ, The Flash 8 Multiple Photo Upload Feature

23hq is a web application which makes it easy to share your digital photos. They have tried to put together a mix of old and brand new ways of sharing stuff. You can share your photos via the web or with prints. You can share with blogs, use mail or subscription-based sharing and more. Share your photos with whom you want, private or public or both.

Recently 23hq contacted us so they can implement the multiple file upload feature of Flash Player 8. Finally, the result is a cool way of provinding the users the ability to upload single or multiple photo uploads and at the same time allowing them to preview uploaded photos, tag them while the remaining at still being uploaded. You will be experiencing the cool combination of Flash and Ajax.

23hq have a an article describing their new feature in details, Flashy Uploads. Test out their Upload Feature or keep a tap of their discussion on the topic.

Join the LSD Beta

We are ready to beta test LSD, an online Live Speed Dating Application. Sign Up for the same and start LiveSpeedDating online.

During the first phase, the LSD are event-based with events lined up every 30 minutes. There will be 24/7 LSDs and much more in the upcoming phases of deployment.

Currently, during the beta, all events are set to be “Gender Neutral”, so you might get paired with your own gender. Once user count grows, we will pair you with your choice mate – male-female, male-male, female-female et al.

We are looking for US-US, cross crountry, cross continent pairing test and to see how our FCS Load Balancer can balance the load/bandwidth.

Please sign up for Live Speed Dating to enjoy this unique dating experience and if you would be able to help test out and give us feedbacks, please sign up for the mailing discussion list separately at LSD Beta Mailing List.

Please remember to check your Junk Folder as we have received notifications from subscribers informing us that the confirmation mail were caught in Junk Folders.

More Details about LSD

We are open to criticism, suggestions, anything that you wish to say.

Namespace in ActionScript 3.0

In general Namespaces allow for group entities like classes, objects and functions under a name. In ActionScript 3.0, Namespaces works like namespaces in an XML. It allows for the control of the visibility of class members.

How to declare Namespace?

namespace ;
@ function @
(more…)

Polymorphism in ActionScript 3.0

The term Polymorphism describes multiple possible states for a single property. And for the computers geeks, programmers, coders in us describes it as “a mechanism allowing a given function to have many different specifications, depending on the type(s) to which it is applied”.

More aptly in the world of OOP, Polymorphism is extensively used in an Inheritance relationship. It may not be wrong to point out that Polymorphism in ActionScript 2.0 was not as clear as it should have been. With ActionScript 3.0, it is being clearly demarcated with the keyword Override.
(more…)

Access Modifiers in ActionScript 3.0

The Basic Access Modifiers are

  1. internal
  2. private
  3. public
  4. protected

internal is the default access modifier which is used if no other modifier is specified. It allows internal access and package-level access. Unlike in ActionScript 2.0 where it was treated as public, internal is not public but internal by default in ActionScript 3.0.

private is strictly private in ActionScript 3.0. Private is the most restrictive access modifier. It only allows internal access to members and it does not allow package-level access nor access from subclasses.

public is the least restrictive access modifier and thus allows access from anywhere.

protected allows internal access to members and access from subclasses but restricts package-level access.
(more…)

Unique, Random, Serial Movies, Image Loader

While doing a randomizer for our splashes, we decided to get this out to the public and make it open for people to use it. This is a Flash SWF or an Image Loader spiced with the ability to load a default SWF or a random/serial from a list listed in an xml nodes.

The SWF/Image Unique, Random, Serial Loader will try to load an SWF or an Image either randomly or in a serial order. In order to get to the next or a random SWF, the mother Splash looks up for the splashes with the method splashDone();. Thus all splashes will need to called the method _parent.splashDone() for this example to work. In the case of an Image, it is considered single frame and thus the method is automatically called. One may be able to customize the SWFs or the images in the splash.xml available in the download.

The SWF is published to version 6 to attain high compatibility with browser-flash-plugins. Coded in ActionScript 2.0 and adorned with Model View Presenter pattern. Well, you might as well look at it as a simple MVP sample.
(more…)

Flash Player 8 – ExternalInterface

Pre Flash Player 8 Era

In the times before the dawn of the Flash Player 8, Flash-Javascript communication, interaction was done with methods like, SetVariable and GetVariable. The technique however is not that browser-proof in some cases, and is a bit slow too. Nonthless, with the release of the Flash Javascript Integration Kit, it makes it possible to somehow seamlessly communicate between Flash and JavaScript. You can call JavaScript functions from Flash, and ActionScript functions from JavaScript.

In the time of Flash Player 8

Then, came Flash Player 8 and specifically ExternalInterface class; flash.external.ExternalInterface which extends Object. Now the entire approach of Flash-Javascript communication is realizing to a new awakening. The ExternalInterface enables straightforward communications between ActionScript and the Flash Player’s contrainer (for instance, the HTML page with Javascript or a C#, C++ or a Java wrapper). We can safely say that the olden days method of FSCommand() is replaced.

ActionScript – JavaScript

  • to invoke custom ActionScript functions from JavaScript and vice versa and that too with a much cleaner API
  • pass primitive (number, boolean, string) or complex (array, object, etc) data between ActionScript and JavaScript
  • function calls are synchronous and makes you feel as if you are invoking the functions withing same scripting engine (if you invoke a JavaScript function from ActionScript you get the return values instantly, same is true if you invoke ActionScript function from JavaScript).
    (more…)

Flash 8 File Upload Download

We have completed an example of one of the new feature in Flash Player 8, the File Upload/Download – FileReference. The current demo have a parameter to control the MAX size of the individual files that can be uploaded. This value is changeable via the FlashObject variables in the SWF embedded html. The current demo is also configured to save the uploaded files to a directory, “userUploads”.

(more…)