Thursday, August 25, 2011

You want to change the case of a string or perform a case-insensitive comparison in action script

0 comments
In this post i will help you how to change a string to uppercase,to lower case and also capitalize a first letter of a words.
The "toUpperCase( )" and"toLowerCase( )" methods return new strings in which all the characters are uppercase or lowercase, respectively, without modifying the original string.

you can use toLowerCase( ) or toUpperCase( ) to perform case-insensitive searches within strings


// Displays: flash designer?
trace( ex.toLowerCase( ) );

// Displays: FLASH DESIGNER?
trace( ex.toUpperCase( ) );

// The original string value is unchanged: Flash designer?
trace( example );
//you want to change original string, reassign the return value to it, as follows:

var example:String = example.toLowerCase( );

The following will help you to change the any word for example "DeSigner" into "Designer" to capitalize the first letter of the word.The following is the code in the "main" class


public static function initialcap( theword:String ):String {
return theword.charAt( 0 ).toUpperCase( ) + theword.substr( 1 ).toLowerCase( );
}


//The following is an example usage of the method:

var example:String = "DeSigner";
trace( StringUtilities.toInitialCap( example ) ); // Displays: Designer

The "initialcap( )" method converts a string to so-called title case (initial letters capitalized). 

The following is the definition of the method:

public static function titleCase( originalword:String ):String
{
var words:Array = originalword.split( " " );
for (var i:int = 0; i < words.length; i++)
{
words[i] = initialcap( words[i] );
} return ( words.join( " " ) );
}
//And the following is a sample usage of the method:
var examp:String = " flash designer cochin";
trace( main.titleCase( examp ) );
// Displays: Flash Designer Cochin


Read more...

Wednesday, August 17, 2011

Google web fonts-easy to use different fonts in your site

0 comments

web desinger kannur,web desinger cochin

Google Web Fonts helps you use web fonts quick and easy for everyone, including professional designers and developers.Google provide the service free of charge.



Open source fonts

All of the fonts in the google web fonts are Open Source. This means that you are free to share . You can even improve or customize them and collaborate with the original designer.
Using the "add to Collection" you can add into your collection and using the "Use" button in the bottom you can use it.
When you click on the use button google give the link of style sheet and bottom of the style sheet gives the "css" (font-family example).
Click the link you will redirect to google fonts

Read more...

Friday, August 12, 2011

Shadows creating in photoshop easy steps

3 comments
web designer cochin
Creating shadow in photoshop is one of the easiest way.In this tutorial i will help you to create shadow using photoshop in easy steps.

  1. First you create a new layer.Then using Rectangular tool create  a box in the new layer.
    web designer cochin
  2. Then create an another layer with the name "shadow" and fill the gray color("#5e5e5e").Then using hte eraser tool(shortcut "E") select a smooth edged brush and then erase the left area.It will look like the following image.
    web designer cochin

  3. Send the image to the back of the previous layer and then go tho the "Filter" menu and select the "Blur" option and in that option go the "Gaussion Blur". Then give the blur to "5".
    web designer cochin

  4. Then "Skew" the erased area.See the following image.
    web designer cochin

  5. And take the copy of shadow layer pressing the alt tab and dragging.Then the rename it shadow2 then right click Flip Horizondal and adjust the shadow2 look like the following image.
    web designer cochin

  6. Then Merge the two layers pressing. "Ctrl+E".Finally adjust shadow image. Then transform the image pressing "Ctrl+T" or goto Edit-Free transform.Adjust the image good for you.
    web designer cochin


Read more...

Tuesday, August 9, 2011

Using JQuery create sliding toggle box

1 comments
This simple jquery tutorial i will trying to create jquey sliding box. First of all create a css file with the following classes
.box
{
width:500px;
height:200px;
background-color:#57C1EA;
margin:0px auto;
padding:20px;
font-family:Arial, Helvetica, sans-serif;
color:#FFFFFF
}
.container
{
width:500px;
height:250px;
margin:0px auto;
text-align:center;
}

The create a html file.In that file create a class with "container" and in that div create a another div with the class "box" out side the box div create a button with the id "anim" and then include a jquery header file inside the header and inside the script area copy paste the following code.


$(document).ready(function(){

$('#anim').click(function(){
$('.box').animate({
opacity:'toggle',
height:'toggle'
},'slow');

});

});
I think this will help the web designers.


Read more...

Thursday, August 4, 2011

How to access the information(id3 property)of the sound file

0 comments
MP3 audio files are contain metadata about the sound file. This is most often used in music files to record the name of the song, the artist, album, genre, year of release, composer, etc. The information is actually included in these tags depends on who encoded or tagged the file. I think the most of the  cases though, you'll at least get the songname and artist tag.
So, to read the song's name, you would access it as follows:

_sound.id3.songName
The following example creates a text field and lists all available id3(information)of mp3 file tags:
package {
import flash.display.Sprite;
import flash.media.Sound;
import flash.net.URLRequest;
import flash.events.Event;
import flash.text.TextField;

public class disp_ID3 extends Sprite {
private var _sound:Sound;

public function disp_ID3( ) {
_sound = new Sound(new URLRequest("song.mp3"));// the song name you want display the details
_sound.addEventListener(Event.ID3, onID3);
_sound.play( );
}

public function onID3(event:Event):void {
// Create a text field and display it
var id3Display:TextField = new TextField( );
addChild(id3Display);
id3Display.x = 10;
id3Display.y = 20;
id3Display.width = 200;
id3Display.height = 200;
id3Display.background = true;
id3Display.multiline = true;
id3Display.wordWrap = true;

// Add some info about the song to the text field
id3Display.text += _sound.id3.songName + "\n";
id3Display.text += _sound.id3.artist + "\n";
id3Display.text += _sound.id3.album + "\n";
id3Display.text += _sound.id3.year + "\n"; }
}
}
}

Read more...