Creating a Class in actionscript 3.0
by omer on Mar.21, 2009, under Adobe, How Tos
Ever since Adobe flash cs3 and cs4 were released, i have been confused whether to shift all my code to actionscript 3.0 or not. Adobe did change the architecture a lot in actionscript 3.0, but is it easy for developers to port their existing code to get better performance results. So after a lot of experimenting with actionscript 3.0, I think it is possible to easily port your existing actionscript 2.0 files to actionscript 3.0. Let us see how.
The code for this example is available right here.
Lets start by creating a new ActionScript 3.0 fla by opening the Adobe Flash cs4 IDE.

After creating the sample.fla, lets create a new actionscript file.

Save this file as ‘myFirstMovieClip.as’.
Be sure to save this actionscript file in the same location as that of the fla file.
Now lets put some basic code into this actionscript file.
package
{
import flash.display.MovieClip;
public class myFirstMovieClip extends MovieClip
{
public function myFirstMovieClip()
{
trace( "Class Object is being created" );
}
}
}
Every class in actionscript 3.0 must be placed inside a package. In this case we don’t specify any package but still it needs to be inside package braces otherwise the compiler will give an error. If we do name this package like
package sampleClasses
then while accessing this class we will have to write code like
var myObj = new sampleClasses.myFirstMovieClip();
After package braces, we import the flash MovieClip class to this package because we want to inherit our class from MovieClip. This where actionscript 3.o is different. Leter when we add mouse events to our class, we would import the MouseEvents class to this package. After this we declare the class and define a contructor in which a string is being traced, jus to check when this contructor will be called.
At this point, if you write this code in actions panel in the fla file and hit CTRL+ENTER
var newobj = new myFirstMovieClip();
Then you should see the trace that comes from the class constructor.
Now lets create a new Symbol which we will associate with the class that we created.

You should check that flash has found the actionscript class that we want to associate with this movieClip by clicking the tick button right next to the class textbox.

Now lets drag a button from the components panel onto this newly created movieClip.

Now lets go back to root level. You can either create an instance of this movieClip by dragging it from library to the stage or by creating a new object and adding it to the childs of root. Lets do it through code. Write the following code in actions panel.

Hit CTRL+ENTER, and you should be able to see the trace from the class contructor as well as the button control from the movieClip. CONGRATULATIONS you have successfully linked a movieClip to actionscript 3.0 class.
Now lets add some mouse event handling code to our class.

As you can see, we imported the mouseevent class, and added event listeners to our class definition in the constructor. Now when you roll over you mouse to the button, you will see trace output.
You can add other events like rollout, click, doubleClick etc.

You can get the source code for this example right here.
Embed Font in ActionScript 3.0
by omer on Mar.18, 2009, under Adobe, How Tos
A few days back I talked about embedding fonts in actionscript 2.0. Since Adobe flash cs4 is out for a time now and people must be using actionscript 3.0, I thought why not discuss how to embed fonts in actionscript 3.0.
You can get the code for this example here.
Its a lot similar to actionscript 2.0.

You create a new font object in the library by right clicking and choosing new Font.

In the new font dialog, DONT forget to check the box for exporting the font for actionscript.

Its just going to show you a warning, no need to take any stress, just click OKAY.

Then you create an object for the font you just created in actionscript.

Create a text field on the movie using the text tool.

Assign this textfield an instance name.

Now you can use your embedded font in this newly created textfield by adding the following code.

Modify properties like rotation and alpha of the text field and you can see the effects when you hit CTRL + ENTER.
Hope it works
ColorSplash: An iPhone app that adds color to your life…
by admin on Mar.18, 2009, under Apple, Mobile Apps, iphone
The festive season of colors in India is being celebrated, so I decided to review an iPhone app related to colors – ColorSplash. I came across this simple yet appealing application recently. Explaining in simple words this app de-saturates a colored image on your iPhone and then lets you selectively restore the original colors in the photograph by your fingers. As you can notice in the image below how visually appealing it looks, allowing a part of image to pop up.

An example from ColorSplash.
Though the demo presented by the app represents crisply edited images, my experience is that getting precise edge selection is very difficult. You can improve your results by zooming in the image and select a thin stroke brush when saturating the edges. But let me warn you that precise strokes from your fingers may not be achieved.
ColorSplash has various usability issues. The button at the top of screen are just too hard to tap and they are also very congestidly placed. There are six button on the menu, starting from left to right, it has main menu, a help file, a two choice toggle between showing color or mask, a drawing-tool thickness pop-up and an undo button – which can be now replaced by shake to undo in the new iPhone OS 3.0.




The biggest UI issue is your own fingers. Unsteady fingers magnify an uneven environment that is not intended for the final result. After creating few images, I transferred them on to my MacBook but on the actual image scale the results were not very appealing. All my imprecisions were prominent in the final image. The effort I put in to it was many times more than achieving a similar effect, and mind you a precise one, in Photoshop.

So if you are not looking for very precise and high quality results, ColorSplash is worth the money you spend. For $2 it’s not a bad iPhone toy. Its fun to experiment with the images you have on your iPhone and it will certainly be a good pastime activity. If you are planning to move the edited images from iPhone and mailing it to your friends, you might be disappointed. But with the incorporation of MMS functionality in the new iPhone 3.0 update, you will be able to send your “masterpiece” to your friend
View the developer website here
iPhone OS 3.0: Rumors Come to reality!
by admin on Mar.17, 2009, under How Tos
Apple has showcased iPhone OS 3.0 media event today at the Town Hall on Apple’s Cupertino campus. There have been few leaked reports as well as rumors going around about the new features that will be incorporated in this new version. The feature that’s been highlighted by quite few sources is the functionality of copy and paste (shake to undo).
List of supposed functions include: tethering - which is a complete no brainer as it has already been announced by AT&T, full Blue-tooth support (Stereo), external keyboards, file transfers, WiFi auto login for hotspots, compatibility with Apple’s new advanced in-line controls on new headphones, push notification, Note sync - notes now synchronize with a Mac or PC using iTunes, Anti-phishing for mobile safari, Search in various native apps, Shake to shuffle and MMS.

iPhone OS 3.0 media event - Town Hall ( Cupertino campus ). Source: GIZMODO
SDK is an integral part of the iPhone app development. Keeping its value in focus, Apple has also introduced major changes in the new SDK. Improved AVFoundation and CFNetwork frameworks would make it easier for developers to add enhanced functionality to their apps. A superior Interface Builder would allow developers to improve usability of apps, as well. Coca touch support for text is also included to achieve copy and paste functionality. About 1000 additional APIs are included in the new iPhone SDK.
iPhone availability is also extended from 62 to 77 countries. iPhone 3.0 will ship this summer free for all iPhone 3G users and with $9.95 update for iPod touch. Still no announcement about Flash though. These are really cool feature additions; most of them have been included in customers’ wish list since iPhone was released two years ago.
Please comment if you were looking for a feature that’s been added or left out!
Sixth Sense by Pattie Maes & Pranav Mistry
by omer on Mar.14, 2009, under How Tos
Pattie Maes, who is an associate professor in MIT’s Program in Media Arts and Sciences, unveiled a revolutionary User Interface design, which doesn’t have a surface to interact but it can use any surface that comes in front of it. It could be a wall, a newspaper or even a person’s hand. The device that her team has invented comprises of a cellphone, primarily used for connecting to Internet, a camera and a projector hung from a persons neck. The way of interacting with this device is much like Microsoft surface but the genius of this device is simply that it can use any surface that isn’t even part of it. You can watch the presentation by Pattie Maes on how useful this device can be which in her own words, she calls “Sixth Sense”.
Best iPHONE Apps
by omer on Mar.14, 2009, under Adobe, How Tos, Web, iphone
iPhone apps are really changing the world, making young entrepreneurs richer by the day. You can read about a 21 year old kid who made over $100,000 dollars through the iphone app store. iPhone apps are the real money maker according to Carla Thornton of PC world who writes in her post
According to a new study, some smartphone owners spent as much on applications for their cell phones last year as they did on the devices themselves.
Call it the Apple App Store effect, says the ABI Research study on mobile storefronts. Despite having one of the smallest catalogs of all the development platforms — now around 15,000 app titles compared to 85,000 each for Palm and RIM — Apple’s iPhone App Store has generated significant sales across the board.
Lets look at the top ten most popular paid iPhone apps.
|
1 - 99 Names of ALLAH: $0.99 A well established tradition in Islam anumerates 99 names of God, each representing certain attributes or descriptions of God. The essence of all attributes, descriptions and name are unified in this one name, ALLAH, which denotes the ultimate perfection of love, harmony and beauty. 99 Names allows you to learn more about these names and keep them close to your hear at all times. ![]() |
|
2 - Night Stand: $1.99 Night Stand displays a beautiful digital clock on your iPhone or iPod touch. You don’t have to buy a night stand clock for your bedroom anymore: you get a gorgeous alaarm clock right under your fingertips.
|
|
3 - ISteam - Hot and Steamy Entertainment: $0.99 Treat yourself now to this innovative high-quality fun app for just $0.99 and see how impressed you and your friends will be.
|
|
4 - Easy Message: $0.99 Tired of picking the wrong button in the small keyboard? Want to excahnge message between your friends’ mobile phone and your ipod touch? Now with Easy Message, you can use wide landscape keyboard to write your messages and send them for free. Messages are sent as email.
|
|
6 - Eye Test: $0.99 Eye Test ia a portable testing tool for near visual acuity, color test and visul illusion, Its very useful for people who need to do visual acuity testing routinely. You can record the testing results and see how your vision changes over time. You can easily conduct color test and understand the difference between what you see and what different type of colorblinders see.
|
|
7 - Relax Alarm Clock: $0.99 Tired of waiting up to the frightening sound of a traditional alarm? Do you want a peaceful break from your busy scheduleor work day ? Use your iPhone to create a soothing ambiance and anvironment when you wake up, throughout your day, and when you fall asleep.
|
|
8 - Violin: $0.99 Violin lets you filddle with 5 high quality non-clashing notes for an easy user experience. Anyone can pick this up and create music. Switch from legato, Pizzicato and Tremolo with a quick tap. Sounds great with headphone, iPhone/iPod speakers or home theatre!
|
|
9 - Fake-an-Excuse : Hangup Now: $0.99 Have you ever been in a phone conversation that just wouldnt end? Download Fake-an-Excuse today , and let your iPhone excuse you from any situation. It comes with over 45 reealistic sounds to help you escape from prolonged calls. Killer bee attack, being pulled over, wek signal, government wire-taps. Fake-an-Excuse will get you off the phone in no time.
|
|
10 - Swat: $0.99 Flies, flies, flies; there’s flies everywhere. Your job is to kill as many flies as you can by swatting them with your finger before the timer runs out on you. But make sure you don’t kill the bees by mistake, because they will punish you. And when you see those lovely butterflies, try not to swat them. Pick them off the screen with your two fingers to reveal a swatter and/ or flashlight which will give a temporary jolt to your fly-swatting mojo. With 10 levels of increasingly challenging game play, Swat is a game you’ve gotta check out.
|
Apple introducing wii mote type “wand controller” for next generation Apple TV
by admin on Mar.13, 2009, under Apple
Idea introduced by wii-mote and then first time used by logitech for PC i.e. Logitech Air, now apple has jumped in to make something similiar. Apple’s remote wand controller will be used to control the mouse pointer on the screen.

This controller will be able to do different functionalities like, zooming, keyboard functionality, image applications, illustration applications and media applications. With the addition of this wand controller with next version of Apple TV, Apple will unlock a lot number of functionalities on Apple TV.

I think most of the functionalities will be similiar to logitech air, i.e if user wants to zoom in, hhe/she w=shud move the controller towards the TV and vice versa. To change the program or song, user will be moving the controller left right and so on.

I think controller will be using same sensors that are used in wii-mote and logitech air, i.e. infra red and motion sensors. There is currently no release date off the product but the patent is the latest in the huge list of apple’s patents.

Apple netbook ?
by admin on Mar.12, 2009, under Apple

There are some rumors going-on on the internet that apple is planning to release a netbook in the 3rd quarter of 2009. Adding to the mysteries is the rumor that apple will be providing the touch-based interface for its netbook. There is a news that touchscreen manufacturers, Wintek, has claimed that it has received orders for 10 inch touchsreens from apple. It is the same company which makes touch screens for iPhones. Company however said that it doesnot know what will be the end product. There is no news on the price of the netbook but it is said that it will be around $300-$500.
Apple has officially released iTunes 8.1
by admin on Mar.12, 2009, under How Tos
Apple has release update 8.1 to iTunes yesterday. As Apple claims, iTunes gets a speed boost in loading large libraries, browsing iTunes Store and syncing devices. There are also some feature additions to Genius sidebar, as it now also collects movie and TV recommendations for you. Parental controls are also improved. But the most coolest feature added is - iTune DJ. According to iTunes feature page:
The iTunes DJ feature automatically picks songs from your entire library or from a specific playlist to create a continuous mix of music. Review upcoming songs to reorder or remove on the fly, or add songs to the playlist at any time.

iTunes 8.1 Released
Download it now and have fun DJ’ing!
Don’t forget to let us know if you find any other gems.
An advanced preview of what Apple has been doing lately!
by admin on Mar.12, 2009, under Apple, Mobile Apps, iphone

iPhone OS 3.0 Event - March 17
Apple is organizing an invite-only media event on March 17 to introduce new iPhone SDK. Apple says, that it will give media a “sneak peek” at the iPhone OS 3.0 software. Another interesting thing is that the event will take place at Apple’s Town Hall building in Cupertino at 10am Pacific Time, which will provide attendees quite an intimate experience.
There were rumors of an event taking place on March 24 and we were speculating that it will be about new Macs, but Apple released updates to the Mac mini, Mac Pro, and iMac soon subsequently. The suspense was torturous for all us Apple fans and now the news of iPhone 3.0 just gets us even more excited.
You can count on Techbite to cover the event for you. So Ladies and Gentlemen get your speculation started!
