Convert Fist Letter in String to Uppercase With AS3

Tuesday, August 10th, 2010
var Title : String = "bLoG";
Title = CapitalizeFirstLetter(Title);
//Ouput: Blog

function CapitalizeFirstLetter(Str:String):String
{
	var converted:String = (Str.substr(0,1).toUpperCase() + (Str.substr(1,Str.length)).toLowerCase());		

        return converted;
}

Redirecting domains to www with .htaccess file

Monday, August 2nd, 2010

If you have Linux server on your web site, you can easily redirect your “domain.com” to “www.domain.com” with .htaccess file. Every Linux based servers have .htaccess file. However, because of the “.”, it’s a hidden file. So, you can’t view unless you set your ftp client’s “view” property to “show invisible files”. You can turn on “show invisible files” with most of the ftp clients such as FileZilla, Transmit and etc…Even if you enable “show invisble files”, can’t you see the file? So there is an easy way. Just create by yourself in one of the text edit software such as Textedit or Notpad.

1- Open a blank document file with Notepad or Text Edit.

2-

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

**change domain.com and www.domain.com with your domain name.

3- Save the file as .htaccess without any extension.

4- Upload the file to your server with your ftp client

that’s all. Now check your browser and it’ll work. If you type onto your browser “http://domain.com”, it will be redirected to “http://www.domain.com”

Convert AS3 Timeline Codes to Document Class Easily

Friday, July 23rd, 2010

Here is a great tool that you can convert Flash Timeline codes to the document classes. It works perfectly. The only thing you do is, just copy timeline code into the empty textarea below, then put a name for your document class. When you press “submit” button, a php script generates your document class code at once. Thanks to Zevan Rosser for this converter tool. By the way, he is a smart coder. Many of Zevan’s codes are too short, but also functional. You should check his blog also for some kind of unique tutorials.
AS3 Timeline Code to Document Class Converter

With keyword in Action Script 3.0

Monday, July 12th, 2010

I’ve been programming with as3 for two years and everyday I come across with a new stuff :) Today, I was checking a as class and encountered with “with” keyword. There is no magic about “with” keyword. But, it allows you to write cleaner codes. Here is a little example how it works;

with (graphics)
{
	clear();
	beginBitmapFill(_bitmapdata);
	moveTo(0, 0);
	lineTo(pWidth, 0);
        lineTo(pWidth, pHeight);
	lineTo(0, pHeight);
	lineTo(0, 0);
	endFill();
}

Flash Event Framework Tutorial

Sunday, June 20th, 2010

http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/

As3 multiloader class

Tuesday, January 26th, 2010

Loading multiple files with queueloader class in as3. here is a tutorial that how it works..

Auto format-comment plug-in for Flex

Friday, December 18th, 2009

Today, I’ve  found an awesome plug-in called “flex formatter” for Flex.  It allows you to reformat or add commentouts into your Flex project just as in Flash. For a long time, I were looking for such a feature for Flex. You can find how to install Flex Formatter into Flex.

  1. Start up FlexBuilder / FlashBuilder.
  2. From the Help menu, select ‘Software Updates > Find and Install…’
  3. Select ‘Search for new features to install’ and click ‘Next >’
  4. Click ‘New Remote Site…’
  5. Use name: ‘Flex Formatter’ and url: ‘http://flexformatter.googlecode.com/svn/trunk/FlexFormatter/FlexPrettyPrintCommandUpdateSite/’
  6. Click OK
  7. Make sure only ‘Flex Formatter’ is selected in the ‘Sites to search’ list, and click ‘Finish’
  8. Follow the prompts to install Flex Formatter, and restart the IDE

Note: This content was taken from gSkinner‘s web-site.

Mulltiple Image Loading in as3

Thursday, December 17th, 2009

I’ve been working on a Flash web site for a week. It has nearly finished. However, there some loading time problems at the gallery sections.At first, I tried to load thumbnails one by one, then I changed my mind. Because, there are only 8 thumbs at one time that will be loaded. So, it’s better to load these 8 images at one time and make a single loader. I encountered with Arthur Debert’s awesome as3 class which is called Bulk Loader. Bulk Loader is totally designed for multiple loading purpose. By the way, thanks to  him for his class. I want to share this wonderfull class with you. I have no time for a tutorial. At this point, I can recommend you to check Nick Handerman’s post about this multiple loading issue. Thanks to Nick for his tutorial and source files.

DeepLinking alternatives for Flash

Wednesday, December 2nd, 2009

The main problem for Flash designers and web-site are deep-linking problems. However, there are many solutions to get rid of the reference problem. The most known action script class is ASUAL’s SWFADRESS. It works fine for many designers and web sites. But, not for me!. Somehow, I got troubles with SWF ADRESS. So, I searched for new solutions and found Flurl deeplinking class. It’s a tiny little Java script file. Flurl gets parameters from Java and combine them with Action Script’s “ExternalInterface” parameter. I used Flurl for Murat Germen’s web-site for the main categories. For now it is working as I expected…I don’t update the web-site, it needs some performance and stability tests. You can check Flurl Java class from here.

And there are other resources which useful for deeplinking issue.

- Pixel Acres

- Bir Öğrenci Klasiği (This page is in Turkish. Çok güzel bir Türkçe kaynak)

- Flash works

I will post a tutorial about this issue. There are thousands of tutorial around the web. However, all of them tells same stuff. My tutorial is going to be more clear and useful. trust me :)

UPDATE: Flurl was working perfect on localy. But, when I moved files to the server, it stopped to work! I tried many thing to figure out the problem. But, I couldn’t handle it. So, I returned back to SWFAdress. For now everything is OK with SWFAdress.

How to create a folder and make its permission 0777 with PHP

Thursday, November 5th, 2009

Last day, I were testing my CMS interaface on several web browsers. It was working as I expected, except on Internet Explorer. Somehow, although I got “folder is created-file is uploaded” message, I couldn’t find the files and folder on server. This weird problem only occured on Internet Explorer. First, I thought that it can be a Mac OSX problem. So, I tried uplaoding stuff with a PC with Windows XP and Vista. But nothing was change!

Secondly, I checked my PHP files. I am requesting PHP files from Flash interface, and PHP tells to server what to do…etc… My problem was related with PHP file. My php code’s related section is as follows;

mkdir($folder, 0777);

I have no idea about that. When I changed it as follows, It started to work on Internet Explorer. Anyway. Hope it helps someone.

mkdir($folder);

chmod($folder, 0777);

Get Adobe Flash playerPlugin by wpburn.com wordpress themes