Archive for October, 2008
Advanced Flex 3.0 Contact Form
To make things a bit different, I decided to create a Flex 3 Contact form just to show all the “anti-Flex” people out there that Flex is not only for hardcore development and ugly graphics. With a bit of effort and time, anyone can produce really good looking applications in Flex Builder too ( and I didn’t even bother using graphics with this example, I only edited the look of the component and I think that the results is quite good ).
Final result ( sneak peek ):

I didn’t want to complicate stuff to badly with this example, my goal was to create a good looking and clean Flex 3 contact form ( I’m sure that many of you guys out there are really bored of all those simple Flash contact forms ) and obviously, to add more “advanced” features. To spice things up a bit, I played around with Shared Objects too. Once the user sends the E-mail he’ll be provided with an option “Save personal information or Not”. Ok, what does this do ? Well, it simply creates a shared object and stores your personal information on your computer for later use. This way, whenever you open your PC and visit this site, you’ll always have certain fields filled out, saving you time.
Obviously, this can be done more complexly too, shared objects aren’t really hard to use but it’s a decent example on how to use them and once you understand how they work then you can experiment with your own stuff ( for example: create a shared object for your games so that when users revisit the game then they’ll already have the Name filled out… or any other features ), it’s really up to everyone’s imagination.
The working example can be viewed here: Working Example
You can download the source files from here: Advanced Flex 3 Contact Form
Of course, the source files contain both .mxml and .php files that were used when I created the example. I really hate downloading examples that are only partially working ( although they have their ups and down ) so I decided to always provide all my files when posting an example so that anyone can easily play around with it and hopefully learn something from my examples.
Enjoy.
Simple Flex 3 File Downloader
The title kinda says it all. Here’s a simple example on how to track the progress of a downloading file with Flex 3. The cool thing about this example is that it can be easily reproduced to work in CS3 ( or CS4 ) too. The code part is essentially the same just that in CS3 you can create your own progress bar and update that instead of the progress bar component ( that I’ve used with Flex 3 ).
This little file downloader can come really handy when your visitors are downloading larger files. You can keep your visitor busy with some interactive animations while the file is downloading and at the same time you’ll have a progress bar telling your visitor how long must he wait until the download is complete.
The working example can be viewed here: Working Example
You can download the source code from here: Flex 3 File Downloader
Simply copy-paste the code into a new Flex 3 Project and make sure that you have a folder called “assets” in your source folder and inside your “assets” folder, you have an mp.3 file called “example.mp3″. Simple as that.
Enjoy.
Ease and Blur in AS 3.0
This is a simple example on how to apply easing and blur to an object.
The code is fairly simple, I just created a container that will hold our text field ( I don’t like working on object directly so I usually add each and every object into a container ), I defined a simple TextFormat to format our text and added everything to the stage. Once all this was done, I simply added an ENTER_FRAME event listener to the stage that will handle all the easing and blurring ( this is the essential part since this function has all the math that handles the easing ).
The example can be downloaded from here: Ease And Blur
Simple Drag in AS 3.0
Here’s a really simple and fast example on how to use Drag in ActionScript 3.0. Not much has changed since ActionScript 2.0 when it comes to dragging objects around, just that now, things are much easier to use and we can write much more organized code when taking advantage of ActionScript 3.0’s OOP features.
Reusable AS 3.0 ScrollBar Class
Hi everyone and welcome to the newly launched Wisebisoft WebLog.
If you have been visiting the old blog then you know that I had a reusable ActionScript 3.0 scrollbar class there which was a kinda out of date. Although I created a new version, I decided not to upload it there but wait until this new WebLog is launched.
I didn’t bother adding fancy graphics to it but of course it can be done. The scrollbar has additional features too that can be disabled or enabled, one such feature is the “blurring feature” which will blur the content on scroll. You can play around with these features yourself and even add new ones if you like.
You can download the source files from here: Custom ScrollBar
It’s as efficient as it can get and certain features can be changed at runtime too ( with the help of the defined setter functions ).
Enjoy and don’t forget to report the bugs you find.
EDIT ( March 09.2009 ): The horizontal scrolling version of the class is available for download too: Horizontal Scroll Class and great thanks to aSnO© for making these changes.

