Beginning Of Event and EventListeners With Actionscript 3.0

August 16, 2008 – 9:42 pm

Event class had a big change with Actionscript 3.0. Those changes effect and make thins much easier for developers. The main idea behind that is having better controls on objects. Better control on codes it will decrease number of the errors. Also will help you too manipulate your code after while.

For example: You have made a project with Actionscript 3.0. Couple months after you finish project your costumer or employee wants to add a new functionality. Main problem over here will be adding code on a working system with out breaking functionality that is exist. Usually is hard to add some code on a system that is working. In this point is matter how good you can control your objects. If you can control your objects easily adding new codes will be easy. If is not you will have more serious problems about adding new functionality. And for more control you should definitely use the event class good.

What is Event?
Event is respond of an object to the other objects in Actionscript when some action happen. Best and easiest example is actions that happen when you click a button in Actionscript. But do not think of that only for buttons. Events can be in lots of types. Beginning of an animation, ending of animation, image that start to be load or anything like this can be an event. Any action that happens is beginning or ending of an event.

Event Listeners
Event listeners check or listen to object for any change or action. Event listeners give us information of did animation start, did some click button, did image loaded, did connect to server or any information like this. When expecting event occur event listeners run block of code which had been specified before.

Read the rest of this article »

Search Engines Will Be Able To Search Swf Files

July 1, 2008 – 10:05 am

The biggest problem of swf files at the moment is they can not be read from spiders of search engines. But Adobe is changing that. Adobe make it official announcement today which will make big change soon. Adobe start to work with Google and Yahoo for make the swf files readable to spiders of search engines.

Well, how will work? Actually at the moment no one doesn’t really know, but as I read search engines will be able to detect the buttons and links in swf files. You can think of this link as in HTML. This is just a small example. Off course still is open to discussion how will be the search engine optimization?

Or the classic question : How can we make our web site more visible in search engines?

Technically, there is no one can give you perfect answer. Search engines change there algorithm, they are always making better and is not only one. There are more than one effect of how search engines works.

I was trying to find an answer to those questions, and I was making test and experiments on web pages of my costumers. Basically at the moment it doesn’t matter Flash or HTML you can make search engines to index it. Of course this is a bit of painful, especially for flash. I hope Adobe, Google and Yahoo will solve that problem soon.

Shortly new generation of Flash Player will be able to open it self to spiders of Google and Yahoo. And spiders of search engines now will recognize swf files. So we can say Flash Players and Spiders soon will understand each other and hopefully Flash/Flex Developer doesn’t have to write hundred lines of extra codes.

Take Care
Engin!

RIA Talks Seminer Nots

June 30, 2008 – 2:07 am

First part of Riatalks is over yesterday. In RIA conference I made a presentation about Flash and Actionscript. Presentation was not so technical, it was more of structure of language, why we use Flash, what is to do with Actionscript and so on…

Ria Talks Etkinliğinden Bir Kare

An image from Riatlaks conference

Beyond that what I found interesting is presentations of Daron ise Daron Yöndem and Yağız Gürgül. DaronYöndem made a presentation about Silverlight. He explain the current situation, plus and minuses of Silverlight, also why Microsoft build up Silverlight. I didn’t have chance to work with Silverlight but if is true probably people working with live streaming and showing video content may prefer to Silverlight platform.

Read the rest of this article »

Checking HTTP Connection With AIR (Flash-Flex)

June 29, 2008 – 5:51 am

We have learned Adobe AIR as a platform which allows us to move internet application to desktop. Ok, what if there is no internet connection? Off course this is a low possibility but having internet connection is not mean is working with out problem. The AIR application you build it might need to download some files from internet, or as like web application may show some data. In that moment your application may want to figure the user computer has internet connection or not, this will help to figure out problems and show it to user.

We can reach that information by using the URLMonitor class. The basic idea behind that is, URLMonitor object is checking the port 80 with URLRequest so can figure out it is possible to make it HTTP request. If is possible the value return backs is true and if is not value will be false which means no internet connection available.

First we will see how we can check this in Flash CS3;

1-Open new AIR document
2-Get “AIR Service Monitor” from Components Panel and add to library.
3-Add a new dynamic text box to screen and write it “test_txt” as an instance name.
4-Add the code below in first key frame and test it.
Read the rest of this article »

Grayscale on Image With Color Channels in Bitmap

June 15, 2008 – 5:10 am

What you can do with Bitmap Class in Actionscript is not little. A lot of filters and effects that are being used by the image editing program’s can be used in Actionscript to. With Bitmap Class and bit of math knowledge you can make really good shapes and animation. In this article I will basically show an example how you can change color channels on Bitmap Data. In example we will add a image to stage and than we will change the color channels to gray depending on Mouse position. The main target is getting the specific color channels and replace with other color channels. For this example we will take green color channel as a source and we apply to red, green and blue. Result of this will be gray.

Read the rest of this article »

ActionScript 3.0 RIA Reference Guide

March 18, 2008 – 1:27 am

Adobe release a PDF file which is contains Actionscript 3.0 API listing for Flash, Flex and AIR. Personally I think it’s more useful and much easy to understand compare to do other reference guides. I believe will be helpful to people which is using Actionscript 3.0

Adobe RIA Reference Guide Platform Stack

Reference guide its around 50 pages and its free, you can download the file from link below.

http://www.adobe.com/devnet/actionscript/articles/atp_ria_guide.html

Take Care
Engin!

Basics of Animation with Physics

March 16, 2008 – 12:28 am

Basically things that move attract attention of the human eye. For example children when they first time see an object which they have never seen before awakens their attention, and even a greater deal if the object is moving. Maybe that doesn’t hold true for all but most of them that I see. This system works same for grown-up people too, for example when you enter a website which is decorated with nice animations, you pay attention to how things are moving. Actually not anyone is always aware of this action but as the brain very much got used to do so, those brain activities happen automatically and constantly. It’s like walking, you don’t need to think of how you have to move your foot one after another, you just walk because you all ready know how to walk.

Well, can we, therefore, program everything the way we know it from real life without any problems? What do you need to make move an object in Flash? How do we rotate an object, where is the point to begin and to stop a movement? What are the boundaries/limits? How do we set up the speed?

As there is no limit of question we can ask, there are consequently also many ways to give answer to those questions. In this article I will explain the basics of animation by drawing back to theoretical physics.

Motion means continuous change in the location of an object against time, which is applied force. Animation is motion. For an animation there must be a certain motion. What I mean is when an object changes its location over time than it becomes an animation.

First law of Newton is about inertia, which means; when there is no force to act on a single particle or an object, the object doesn’t move or the velocity of the object doesn’t change. It stays in the moment of inertia.

Read the rest of this article »