<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>K a r t h i K</title>
	<atom:link href="http://shanmukarthik.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://shanmukarthik.wordpress.com</link>
	<description>&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124; Think Possible, Do Impossible &#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;</description>
	<lastBuildDate>Wed, 17 Sep 2008 08:44:32 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='shanmukarthik.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/96480f251a0c9450d901fcba945a4cb8?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>K a r t h i K</title>
		<link>http://shanmukarthik.wordpress.com</link>
	</image>
			<item>
		<title>MP3 Player in AS3</title>
		<link>http://shanmukarthik.wordpress.com/2008/09/17/mp3-player-in-as3/</link>
		<comments>http://shanmukarthik.wordpress.com/2008/09/17/mp3-player-in-as3/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 08:44:32 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=27</guid>
		<description><![CDATA[This the code which you may use it to create a MP3 player using AS3. Copy these scripts in a class called Mp3Player and use this class in your flash cs3 as follows.
var player:Mp3Player =  new Mp3Player();
player.play('blah.mp3');
or
var player:Mp3Player =  new Mp3Player();
player.playlist = ['item1.mp3','item2.mp3'];
player.next();
package {
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.media.Sound;
	import flash.media.SoundChannel;
	import flash.media.SoundTransform;
	import flash.net.URLRequest;
	import flash.utils.clearInterval;
	import flash.utils.setInterval;		

	public class [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=27&subd=shanmukarthik&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><code>This the code which you may use it to create a MP3 player using AS3. Copy these scripts in a class called </code>Mp3Player and use this class in your flash cs3 as follows.</p>
<p><em><code>var player:Mp3Player =  new Mp3Player();<br />
player.play('blah.mp3');<br />
or<br />
var player:Mp3Player =  new Mp3Player();<br />
player.playlist = ['item1.mp3','item2.mp3'];<br />
player.next();</code></em></p>
<pre>package {
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.media.Sound;
	import flash.media.SoundChannel;
	import flash.media.SoundTransform;
	import flash.net.URLRequest;
	import flash.utils.clearInterval;
	import flash.utils.setInterval;		

	public class Mp3Player extends EventDispatcher {

		static public const EVENT_TIME_CHANGE:String = 'Mp3Player.TimeChange';
		static public const EVENT_VOLUME_CHANGE:String = 'Mp3Player.VolumeChange';
		static public const EVENT_PAN_CHANGE:String = 'Mp3Player.PanningChange';
		static public const EVENT_PAUSE:String = 'Mp3Player.Pause';
		static public const EVENT_UNPAUSE:String = 'Mp3Player.Unpause';
		static public const EVENT_PLAY:String = 'Mp3Player.Play';
		//
		public var playing:Boolean;
		public var playlist:Array;
		public var currentUrl:String;
		public var playlistIndex:int = -1;
		//
		protected var sound:Sound;
		protected var soundChannel:SoundChannel;
		protected var soundTrans:SoundTransform;
		protected var progressInt:Number;

		public function play( url:String ):void {
			clearInterval(progressInt);
			if ( sound ) {
				soundChannel.stop();
			}
			currentUrl = url;
			sound = new Sound();
			sound.addEventListener(Event.COMPLETE, onLoadSong);
			sound.addEventListener(Event.ID3, onId3Info);

			sound.load(new URLRequest(currentUrl));

			soundChannel = sound.play();
			if ( soundTrans ) {
				soundChannel.soundTransform = soundTrans;
			} else {
				soundTrans = soundChannel.soundTransform;
			}
			soundChannel.addEventListener(Event.COMPLETE, onSongEnd);
			playing = true;
			clearInterval(progressInt);
			progressInt = setInterval(updateProgress, 30);
			dispatchEvent(new Event(EVENT_PLAY));
		}
		public function pause():void {
			if ( soundChannel ) {
				soundChannel.stop();
				dispatchEvent(new Event(EVENT_PAUSE));
				playing = false;
			}
		}
		public function unpause():void {
			if ( playing ) return;
			if ( soundChannel.position &lt; sound.length ) {
				soundChannel = sound.play(soundChannel.position);
				soundChannel.soundTransform = soundTrans;
			} else {
				soundChannel = sound.play();
			}
			dispatchEvent(new Event(EVENT_UNPAUSE));
			playing = true;
		}
		public function seek( percent:Number ):void {
			soundChannel.stop();
			soundChannel = sound.play(sound.length * percent);
		}
		public function prev():void {
			playlistIndex--;
			if ( playlistIndex &lt; 0 ) playlistIndex = playlist.length - 1;
			play(playlist[playlistIndex]);
		}
		public function next():void {
			playlistIndex++;
			if ( playlistIndex == playlist.length ) playlistIndex = 0;
			play(playlist[playlistIndex]);
		}
		public function get volume():Number {
			if (!soundTrans) return 0;
			return soundTrans.volume;
		}
		public function set volume( n:Number ):void {
			if ( !soundTrans ) return;
			soundTrans.volume = n;
			soundChannel.soundTransform = soundTrans;
			dispatchEvent(new Event(EVENT_VOLUME_CHANGE));
		}
		public function get pan():Number {
			if (!soundTrans) return 0;
			return soundTrans.pan;
		}
		public function set pan( n:Number ):void {
			if ( !soundTrans ) return;
			soundTrans.pan = n;
			soundChannel.soundTransform = soundTrans;
			dispatchEvent(new Event(EVENT_PAN_CHANGE));
		}
		public function get length():Number {
			return sound.length;
		}
		public function get time():Number {
			return soundChannel.position;
		}
		public function get timePretty():String {
			var secs:Number = soundChannel.position / 1000;
			var mins:Number = Math.floor(secs / 60);
			secs = Math.floor(secs % 60);
			return mins + ":" + (secs &lt; 10 ? "0" : "") + secs;
		}
		public function get timePercent():Number {
			if ( !sound.length ) return 0;
			return soundChannel.position / sound.length;
		}
		protected function onLoadSong( e:Event ):void {
		}
		protected function onSongEnd( e:Event ):void {
			if ( playlist )
				next();
		}
		protected function onId3Info( e:Event ):void {
			dispatchEvent(new Event(Event.ID3, e.target.id3));
		}
		protected function updateProgress():void {
			dispatchEvent(new Event(EVENT_TIME_CHANGE));
			if ( timePercent &gt;= .99 ) {
				onSongEnd(new Event(Event.COMPLETE));
				clearInterval(progressInt);
			}
		}
	}
}</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shanmukarthik.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shanmukarthik.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=27&subd=shanmukarthik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2008/09/17/mp3-player-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffe7733a0eb48a37e62e0afe22a0741d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Current System Time using Timer()</title>
		<link>http://shanmukarthik.wordpress.com/2008/09/11/current-system-time-using-timer/</link>
		<comments>http://shanmukarthik.wordpress.com/2008/09/11/current-system-time-using-timer/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 06:07:44 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=23</guid>
		<description><![CDATA[This is about basically how to get your current system time using Timer() function using AS3.
 
For this you need to create four dynamic text boxes and name those as txtHrs, txtMins, txtSecs, and txtDate.
 
Put the following actions in your movie frame and create a class and use these.
 
var time:Timer = new Timer(10);
tm.addEventListener(TimerEvent.TIMER, update);
function update(tevt:TimerEvent):void {
           [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=23&subd=shanmukarthik&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is about basically how to get your current system time using Timer() function using AS3.</p>
<p> </p>
<p>For this you need to create four dynamic text boxes and name those as <em>txtHrs</em>, <em>txtMins</em>, <em>txtSecs</em>, and <em>txtDate</em>.</p>
<p> </p>
<p>Put the following actions in your movie frame and create a class and use these.</p>
<p> </p>
<p style="text-align:left;"><em>var time:Timer = new Timer(10);</em></p>
<p style="text-align:left;"><em>tm.addEventListener(TimerEvent.TIMER, update);</em></p>
<p style="text-align:left;"><em>function update(tevt:TimerEvent):void {</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         var now:Date = new Date();</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         var hr:Number = now.hours;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         var min:Number = now.minutes;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         var sec:Number = now.seconds;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         if (hr &gt; 12) {</em></p>
<p style="text-align:left;"><span><em></em></span><em>                                                  hr -= 12;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         }</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         txtHrs.text = String(hr);</em></p>
<p style="text-align:left;"><span><em> </em></span></p>
<p style="text-align:left;"><span><em></em></span><em>                         if (min &lt; 10) {</em></p>
<p style="text-align:left;"><span><em></em></span><em>                                                  txtMins.text = &#8220;0&#8243;;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         }</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         else {</em></p>
<p style="text-align:left;"><span><em></em></span><em>                                                  txtMins.text = &#8220;&#8221;;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         }</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         txtMins.appendText(String(min));</em></p>
<p style="text-align:left;"><span><em> </em></span></p>
<p style="text-align:left;"><span><em></em></span><em>                         if (sec &lt; 10) {</em></p>
<p style="text-align:left;"><span><em></em></span><em>                                                  txtSecs.text = &#8220;0&#8243;;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         }</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         else {</em></p>
<p style="text-align:left;"><span><em></em></span><em>                                                  txtSecs.text = &#8220;&#8221;;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         }</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         txtSecs.appendText(String(sec));</em></p>
<p style="text-align:left;"><span><em> </em></span></p>
<p style="text-align:left;"><span><em></em></span><em>                         txtDate.text = now.toDateString();</em></p>
<p style="text-align:left;"><em>}</em></p>
<p style="text-align:left;"><em><br />
</em></p>
<p style="text-align:left;"><em>time.start();</em></p>
<p> </p>
<p>Now test your movie and you can see your system time on your movie display.</p>
<p>Try this!.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shanmukarthik.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shanmukarthik.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=23&subd=shanmukarthik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2008/09/11/current-system-time-using-timer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffe7733a0eb48a37e62e0afe22a0741d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Mac OSX Commands</title>
		<link>http://shanmukarthik.wordpress.com/2008/08/21/mac-osx-commands/</link>
		<comments>http://shanmukarthik.wordpress.com/2008/08/21/mac-osx-commands/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 10:38:09 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[MAC]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=19</guid>
		<description><![CDATA[Here are the commands that have been used in Mac OSX based Darwin open source kernel.
alias     Create an alias
alloc     List used and free memory
awk       Find and Replace text within file(s)

basename  Convert a full pathname to just a folder path
bash  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=19&subd=shanmukarthik&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here are the commands that have been used in Mac OSX based Darwin open source kernel.</p>
<pre>alias     Create an alias
alloc     List used and free memory
awk       Find and Replace text within file(s)

basename  Convert a full pathname to just a folder path
bash      Bourne-Again SHell (Linux)
bless     Set volume bootability and startup disk options.
break     Exit from a loop

cal       Display a calendar
case      Conditionally perform a command
cat       Display the contents of a file
cd        Change Directory
chflags   Change a file or folder's flags.
chgrp     Change group ownership
chmod     Change access permissions
chown     Change file owner and group
chroot    Run a command with a different root directory
cksum     Print CRC checksum and byte counts
clear     Clear terminal screen
cmp       Compare two files
comm      Compare two sorted files line by line
complete  Edit a command completion [word/pattern/list]
continue  Resume the next iteration of a loop
cp        Copy one or more files to another location
cron      Daemon to execute scheduled commands
crontab   Schedule a command to run at a later date/time
cut       Divide a file into several parts

date      Display or change the date &amp; time
dc        Desk Calculator
dd        Data Dump - Convert and copy a file
defaults  The Mac OS X user defaults system.
df        Display free disk space
diff      Display the differences between two files
diff3     Show differences among three files
dig       DNS lookup
dirname   Convert a full pathname to just a path
dirs      Display list of remembered directories
diskutil  Disk utilities - Format, Verify, Repair
ditto     Copy files and folders
dot_clean Remove dot-underscore files
dscacheutil Query or flush the Directory Service/DNS cache
dscl      Directory Service command line utility
du        Estimate file space usage

echo      Display message on screen
ed        A line-oriented text editor (edlin)
enable    Stop or start printers and classes.
env       Set environment and run a utility
eval      Evaluate several commands/arguments
exec      Execute a command
exit      Exit the shell
expect    Programmed dialogue with interactive programs
          Also see AppleScriptexpand    Convert tabs to spaces
expr      Evaluate expressions

false     Do nothing, unsuccessfully
fdisk     Partition table manipulator for Darwin UFS/HFS/DOS
find      Search for files that meet a desired criteria
fmt       Reformat paragraph text
fold      Wrap text to fit a specified width
for       Expand <var>words</var>, and execute <var>commands</var>
foreach   Loop, expand <var>words</var>, and execute <var>commands</var>
fsck      Filesystem consistency check and repair
fsaclctl  Filesystem enable/disable ACL support
fs_usage  Filesystem usage (process/pathname)
ftp       Internet file transfer program

GetFileInfo Get attributes of HFS+ files
getopt    Parse positional parameters
goto      Jump to label and continue execution
grep      Search file(s) for lines that match a given pattern
groups    Print group names a user is in
gzip      Compress or decompress files

head      Display the first lines of a file
hdiutil   Manipulate iso disk images
history   Command History
hostname  Print or set system name

id        Print user and group names/id's
if        Conditionally perform a command
info      Help info
install   Copy files and set attributes

jobs      List active jobs
join      Join lines on a common field

kextfind  List kernel extensions
kill      Stop a process from running

l         List files in long format (ls -l)
ll        List files in long format, showing invisible files (ls -la)
less      Display output one screen at a time
ln        Make links between files (hard links, symbolic links)
locate    Find files
logname   Print current login name
login     log into the computer
logout    Exit a login shell (bye)
lpr       Print files
lprm      Remove jobs from the print queue
lpstat    Printer status information
ls        List information about file(s)
lsbom     List a bill of materials file
lsof      List open files

man       Help manual
mkdir     Create new folder(s)
mkfifo    Make FIFOs (named pipes)
more      Display output one screen at a time
mount     Mount a file system
mv        Move or rename files or directories

net       Manage network resources
networksetup Network and System Preferences
nice      Set the priority of a command
nohup     Run a command immune to hangups

onintr    Control the action of a shell interrupt
open      Open a file/folder/URL/Application
osascript Execute AppleScript

passwd    Modify a user password
paste     Merge lines of files
pbcopy    Copy data to the clipboard
pbpaste   Paste data from the Clipboard
pico      Simple text editor
ping      Test a network connection
pkgutil   List installed packages
pmset     Power Management settings
popd      Restore the previous value of the current directory
pr        Convert text files for printing
printenv  Print environment variables
printf    Format and print data
ps        Process status
pushd     Save and then change the current directory
pwd       Print Working Directory

quota     Display disk usage and limits

rcp       Copy files between machines.
repeat    Execute a command multiple times
rm        Remove files
rmdir     Remove folder(s)
rpm       Remote Package Manager
rsync     Remote file copy - Sync file tree (also RsyncX)

say       Convert text to audible speech
sched     Schedule a command to run at a later time.
screen    Multiplex terminal, run remote shells via ssh
screencapture Capture screen image to file or disk
sdiff     Merge two files interactively
security  Administer Keychains, keys, certificates and the Security framework
sed       Stream Editor
set       Set a shell variable = value
setenv    Set an environment variable = value
setfile   Set attributes of HFS+ files
shift     Shift positional parameters
shutdown  Shutdown or restart OS X
sleep     Delay for a specified time
softwareupdate System software update tool
sort      Sort text files
split     Split a file into fixed-size pieces
stop      Stop a job or process
su        Substitute user identity
sudo      Execute a command as another user
sum       Print a checksum for a file
switch    Conditionally perform a command
systemsetup Computer and display system settings

tail      Output the last part of files
tar       Tape ARchiver
tee       Redirect output to multiple files
test      Condition evaluation
textutil  Manipulate text files in various formats
time      Measure Program Resource Use
touch     Change file timestamps
traceroute Trace Route to Host
tr        Translate, squeeze, and/or delete characters
true      Do nothing, successfully
tty       Print filename of terminal on stdin
type      Describe a command

umask     Users file creation mask
umount    a device
unalias   Remove an alias
uname     Print system information
unexpand  Convert spaces to tabs
uniq      Uniquify files
units     Convert units from one scale to another
unset     Remove variable or function names
unsetenv  Remove environment variable
users     Print login names of users currently logged in
uuencode  Encode a binary file
uudecode  Decode a file created by uuencode

vi        Text Editor

wc        Print byte, word, and line counts
where     Report all known instances of a command
which     Locate a program file in the user's path
while     Execute commands
who       Print all usernames currently logged on
whoami    Print the current user id and name (`id -un')

xargs     Execute utility - passing arguments
yes       Print a string until interrupted

Hope you get known all the OSX commands</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shanmukarthik.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shanmukarthik.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=19&subd=shanmukarthik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2008/08/21/mac-osx-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffe7733a0eb48a37e62e0afe22a0741d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Beginning MAC Development</title>
		<link>http://shanmukarthik.wordpress.com/2008/08/21/beginning-mac-development/</link>
		<comments>http://shanmukarthik.wordpress.com/2008/08/21/beginning-mac-development/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 10:24:45 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[MAC]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=17</guid>
		<description><![CDATA[Why Develop On The Mac?
If you need answer to this, please take a look into MacZealots.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=17&subd=shanmukarthik&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h3>Why Develop On The Mac?</h3>
<p>If you need answer to this, please take a look into <a title="Mac Development" href="http://maczealots.com/articles/development/" target="_self">MacZealots</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shanmukarthik.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shanmukarthik.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=17&subd=shanmukarthik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2008/08/21/beginning-mac-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffe7733a0eb48a37e62e0afe22a0741d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>EFI</title>
		<link>http://shanmukarthik.wordpress.com/2008/08/21/efi/</link>
		<comments>http://shanmukarthik.wordpress.com/2008/08/21/efi/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 10:17:58 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[EFI]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=15</guid>
		<description><![CDATA[EFI
The Extensible Firmware Interface (EFI) is a specification that defines a software interface between an operating system and platform firmware. EFI is intended as a significantly improved replacement of the old legacy BIOS firmware interface historically used by all IBM PC-compatible personal computers. The EFI specification was originally developed by Intel, and is now managed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=15&subd=shanmukarthik&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h3><span class="mw-headline">EFI</span></h3>
<p>The Extensible Firmware Interface (EFI) is a specification that defines a software interface between an operating system and platform firmware. EFI is intended as a significantly improved replacement of the old legacy BIOS firmware interface historically used by all IBM PC-compatible personal computers. The EFI specification was originally developed by Intel, and is now managed by the Unified EFI Forum and is officially known as Unified EFI (UEFI).</p>
<h3><span class="mw-headline">Services</span></h3>
<p>EFI defines <em>boot services</em>, which include text and graphical console  support on various devices, bus, block and file services, and <em>runtime  services</em>, such as date, time and <span class="mw-redirect">NVRAM</span> services.</p>
<h3><span class="mw-headline">Device drivers</span></h3>
<p>In addition to standard architecture-specific device drivers, the EFI  specification provides for a processor-independent device driver environment,  called <strong>EFI Byte Code</strong> or <strong>EBC</strong>. System firmware is required by the  UEFI specification to carry an interpreter for any EBC images that reside in or  are loaded into the environment. In that sense, EBC is similar to Open Firmware, the  hardware-independent firmware used in PowerPC-based <span class="mw-redirect">Apple Macintosh</span> and Sun Microsystems SPARC computers, amongst others.</p>
<p>Some architecture-specific (non-EBC) EFI device driver types can have  interfaces for use from the operating system. This allows the OS to rely on EFI  for basic graphics and network support until OS specific drivers are loaded.</p>
<h3><span class="mw-headline">Boot manager</span></h3>
<p>An <strong>EFI boot manager</strong> is also used to select and load the operating  system, removing the need for a dedicated boot loader mechanism (the OS boot loader  is an EFI application).</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shanmukarthik.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shanmukarthik.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=15&subd=shanmukarthik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2008/08/21/efi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffe7733a0eb48a37e62e0afe22a0741d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Car race game in AS3</title>
		<link>http://shanmukarthik.wordpress.com/2008/08/19/car-race-game-in-as3/</link>
		<comments>http://shanmukarthik.wordpress.com/2008/08/19/car-race-game-in-as3/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 05:25:22 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=13</guid>
		<description><![CDATA[Here is the car race game that I have just started in AS3.
/*
*    File        :    Main.as
*    Author        :    Karthik
*    Date        :    12 Aug 2008
*
*
*/
package {
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.ui.Keyboard;
import flash.display.Stage;
public class Main extends Sprite {
/*
*    Declerations
*/
var mcRoad            :MovieClip;
var mcCheckPoint    :MovieClip;
var mcLastCheckPoint:MovieClip;
var mcRoadLine        :MovieClip;
var mcLineContainer    :MovieClip;
var mcCar        [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=13&subd=shanmukarthik&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here is the car race game that I have just started in AS3.</p>
<p>/*<br />
*    File        :    Main.as<br />
*    Author        :    Karthik<br />
*    Date        :    12 Aug 2008<br />
*<br />
*<br />
*/</p>
<p>package {<br />
import flash.display.Sprite;<br />
import flash.display.MovieClip;<br />
import flash.events.Event;<br />
import flash.events.KeyboardEvent;<br />
import flash.events.MouseEvent;<br />
import flash.ui.Keyboard;<br />
import flash.display.Stage;</p>
<p>public class Main extends Sprite {</p>
<p>/*<br />
*    Declerations<br />
*/<br />
var mcRoad            :MovieClip;<br />
var mcCheckPoint    :MovieClip;<br />
var mcLastCheckPoint:MovieClip;<br />
var mcRoadLine        :MovieClip;<br />
var mcLineContainer    :MovieClip;<br />
var mcCar            :MovieClip;<br />
var mcPlayButton    :MovieClip;<br />
var mcSpeedoMeter    :MovieClip;<br />
var mcGameOver        :MovieClip;<br />
var i                :Number;<br />
var trackLength        :Number        =    100;<br />
var speedX             :Number        = 0;<br />
var speedY             :Number        = 0;<br />
var acceleration     :Number        = 0.75;<br />
var friction         :Number        = 0.98;</p>
<p>/*<br />
*    Function    :    Main<br />
*    Param        :    NIL<br />
*    Return        :    NIL<br />
*    Description    :    Constructor method.<br />
*/<br />
public function Main() {<br />
this.init();<br />
}</p>
<p>/*<br />
*    Function    :    EnterFrame<br />
*    Param        :    NIL<br />
*    Return        :    NIL<br />
*    Description    :    Initialization method that adds all the required graphics,events to stage.<br />
*/<br />
public function init() {<br />
//     Add the road graphics to the center of the stage.<br />
mcRoad         =     new Road();<br />
mcRoad.x     =     stage.stageWidth * 0.5;<br />
mcRoad.y     =     stage.stageHeight * 0.5;<br />
addChild(mcRoad);<br />
//    Add the raod lines to the stage by duplicating it into multiple up to its track length<br />
mcLineContainer        =    new MovieClip();<br />
for(i=0;i&lt;trackLength*0.5;i++) {<br />
mcRoadLine        =    new Roadline();<br />
mcRoadLine.x    =    stage.stageWidth * 0.5;<br />
mcRoadLine.y    =    stage.stageHeight &#8211; i * 150;<br />
mcLineContainer.addChild(mcRoadLine);<br />
}<br />
mcLastCheckPoint    = new Checkpoint();<br />
mcLastCheckPoint.x    =    stage.stageWidth * 0.5;<br />
mcLastCheckPoint.y    =    stage.stageHeight &#8211; i * 150;<br />
mcLineContainer.addChild(mcLastCheckPoint);<br />
addChild(mcLineContainer);<br />
//    Add the checkpoint graphics to the center of the stage<br />
mcCheckPoint    =    new Checkpoint();<br />
mcCheckPoint.x    =    stage.stageWidth * 0.5;<br />
mcCheckPoint.y    =    stage.stageHeight * 0.5;<br />
addChild(mcCheckPoint);<br />
//     Add the car graphic to the center of the stage.<br />
mcCar         =     new Car();<br />
mcCar.x     =     stage.stageWidth * 0.5;<br />
mcCar.y     =     stage.stageHeight * 0.5;<br />
addChild(mcCar);<br />
//    Add the play button to the stage and make it to be clicked to start the game.<br />
mcPlayButton                 =     new Playbutton();<br />
mcPlayButton.buttonMode     =     true;<br />
mcPlayButton.x                 =     stage.stageWidth * 0.80;<br />
mcPlayButton.y                 =     stage.stageHeight * 0.5;<br />
mcPlayButton.addEventListener(MouseEvent.CLICK, PlaybuttonClicked);<br />
addChild(mcPlayButton);<br />
}</p>
<p>/*<br />
*    Function    :    EnterFrame<br />
*    Param        :    Any Event<br />
*    Return        :    NIL<br />
*    Description    :    This EnterFrame function is equalent to onEnterFrame function.<br />
*/<br />
private function EnterFrame(event:Event):void {<br />
/*if (Key.isDown(Keyboard.UP)) {<br />
mcLineContainer.y     += 15;<br />
mcCheckPoint.y        += 15;<br />
}*/<br />
if (Key.isDown(Keyboard.LEFT)) {<br />
//speedX = speedX-acceleration;<br />
mcCar.x -= 4;<br />
if(mcCar.x &lt;= stage.stageWidth * 0.39) {<br />
mcCar.x += 4;<br />
}<br />
}<br />
if (Key.isDown(Keyboard.RIGHT)) {<br />
//speedX = speedX+acceleration;<br />
mcCar.x += 4;<br />
if(mcCar.x &gt;= stage.stageWidth * 0.61) {<br />
mcCar.x -= 4;<br />
}<br />
}<br />
if (Key.isDown(Keyboard.UP)) {<br />
speedY = speedY-acceleration;<br />
}<br />
if (Key.isDown(Keyboard.DOWN)) {<br />
speedY = speedY+acceleration;<br />
}<br />
speedX                 = speedX*friction;<br />
speedY                 = speedY*friction;<br />
mcLineContainer.y     -= speedY;<br />
mcCheckPoint.y         -= speedY;<br />
mcSpeedoMeter.speedHand.rotation -= speedY/60;<br />
if(mcCar.hitTestObject(mcLastCheckPoint)) {<br />
stage.removeEventListener(Event.ENTER_FRAME, EnterFrame);<br />
mcGameOver        =    new Gameover();<br />
mcGameOver.x    =    stage.stageWidth * 0.5;<br />
mcGameOver.y    =    stage.stageHeight * 0.5;<br />
addChild(mcGameOver);<br />
}<br />
}</p>
<p>/*<br />
*    Function    :    StartRace<br />
*    Param        :    NIL<br />
*    Return        :    NIL<br />
*    Description    :    Start race function will activate keyboard event to stage and invokes the EnterFrame function<br />
*                    to the stage Enter_Frame event.<br />
*/<br />
private function StartRace():void {<br />
stage.addEventListener(Event.ENTER_FRAME, EnterFrame);<br />
Key.initialize(stage);<br />
}</p>
<p>/*<br />
*    Function    :    PlaybuttonClicked<br />
*    Param        :    Mouse Event<br />
*    Return        :    NIL<br />
*    Description    :    Function will invoke the start race function up on Play button clicked<br />
*/<br />
private function PlaybuttonClicked(event:MouseEvent):void {<br />
StartRace();<br />
mcPlayButton.play();<br />
mcSpeedoMeter         =     new Speedometer();<br />
mcSpeedoMeter.x     =     stage.stageWidth * 0.15;<br />
mcSpeedoMeter.y     =     stage.stageHeight * 0.9;<br />
mcSpeedoMeter.speedHand.rotation    =    0;<br />
addChild(mcSpeedoMeter);<br />
}<br />
}<br />
}</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shanmukarthik.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shanmukarthik.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=13&subd=shanmukarthik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2008/08/19/car-race-game-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffe7733a0eb48a37e62e0afe22a0741d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Get days between two given dates</title>
		<link>http://shanmukarthik.wordpress.com/2008/08/08/get-days-between-two-given-dates/</link>
		<comments>http://shanmukarthik.wordpress.com/2008/08/08/get-days-between-two-given-dates/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 08:50:54 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=11</guid>
		<description><![CDATA[public static function getDaysBetweenDates(date1:Date,date2:Date):int
{
var one_day:Number = 1000 * 60 * 60 * 24
var date1_ms:Number = date1.getTime();
var date2_ms:Number = date2.getTime();
var difference_ms:Number = Math.abs(date1_ms &#8211; date2_ms)
return Math.round(difference_ms/one_day);
}
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=11&subd=shanmukarthik&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>public static function getDaysBetweenDates(date1:Date,date2:Date):int<br />
{<br />
var one_day:Number = 1000 * 60 * 60 * 24<br />
var date1_ms:Number = date1.getTime();<br />
var date2_ms:Number = date2.getTime();<br />
var difference_ms:Number = Math.abs(date1_ms &#8211; date2_ms)<br />
return Math.round(difference_ms/one_day);<br />
}</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shanmukarthik.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shanmukarthik.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=11&subd=shanmukarthik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2008/08/08/get-days-between-two-given-dates/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffe7733a0eb48a37e62e0afe22a0741d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Key.isDown in AS3</title>
		<link>http://shanmukarthik.wordpress.com/2008/08/05/keyisdown-in-as3/</link>
		<comments>http://shanmukarthik.wordpress.com/2008/08/05/keyisdown-in-as3/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 11:30:11 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=9</guid>
		<description><![CDATA[I have given the easy way to implement Key.isDown in AS3 here. This is the duplicated version from the original senocular&#8217;s post in KirupaForum (here)

Thanks to senocular
In ActionScript 2, you could use Key.isDown(keyCode) to determine whether or not a key was being pressed on the keyboard. This command is no longer available in ActionScript 3. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=9&subd=shanmukarthik&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><em>I have given the easy way to implement Key.isDown in AS3 here. This is the duplicated version from the original senocular&#8217;s post in KirupaForum (<a title="Key.isDown" href="http://www.kirupa.com/forum/showpost.php?p=2098269&amp;postcount=319" target="_blank">here</a>)<br />
</em></p>
<p><em>Thanks to senocular</em></p>
<p>In ActionScript 2, you could use Key.isDown(keyCode) to determine whether or not a key was being pressed on the keyboard. This command is no longer available in ActionScript 3. In fact, there is no Key object in ActionScript 3. You can still access keyCodes by name, but through the Keyboard (flash.ui.Keyboard) class. For key recognition in ActionScript 3, you have to use keyboard events or, more specifically the KeyboardEvent.KEY_DOWN and KeyboardEvent.KEY_UP events. When a key is pressed on the keyboard, the KeyboardEvent.KEY_DOWN is dispatched and you can tell which key was pressed by checking KeyboardEvent.keyCode in the event handler. Same applies to keys being released in the KeyboardEvent.KEY_UP.</p>
<p>Using these events, you could recreate the functionality provided by the Key class in ActionScript 2. However, you should know that the KeyboardEvents only work when the Flash player has focus. This means a key could be pressed in Flash and released outside of Flash without Flash knowing that it was released (not having received the KEY_UP event). As a result, you should assume all keys released upon deactivation (loss of focus) of the Flash player. The following recreation of the Key class takes that into consideration.</p>
<pre class="alt2" style="border:1px inset;overflow:auto;width:500px;height:516px;margin:0;padding:6px;">
<div style="text-align:left;" dir="ltr">
<div class="actionscript"><span style="font-style:italic;color:#808080;">// Key.as</span>
package <span style="color:#000000;">{</span>

    <span style="color:#0000ff;">import</span> flash.<span style="color:#000080;">display</span>.<span style="color:#0000ff;">Stage</span>;
    <span style="color:#0000ff;">import</span> flash.<span style="color:#000080;">events</span>.<span style="color:#000080;">Event</span>;
    <span style="color:#0000ff;">import</span> flash.<span style="color:#000080;">events</span>.<span style="color:#000080;">KeyboardEvent</span>;

    <span style="font-style:italic;color:#808080;">/**
     * The Key class recreates functionality of
     * Key.isDown of ActionScript 1 and 2. Before using
     * Key.isDown, you first need to initialize the
     * Key class with a reference to the stage using
     * its Key.initialize() method. For key
     * codes use the flash.ui.Keyboard class.
     *
     * Usage:
     * Key.initialize(stage);
     * if (Key.isDown(Keyboard.LEFT)) {
     *    // Left key is being pressed
     * }
     */</span>
    <span style="color:#0000ff;">public</span> <span style="font-weight:bold;color:#000000;">class</span> <span style="color:#0000ff;">Key</span> <span style="color:#000000;">{</span>

        <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">static</span> <span style="font-weight:bold;color:#000000;">var</span> initialized:<span style="color:#0000ff;">Boolean</span> = <span style="font-weight:bold;color:#000000;">false</span>;  <span style="font-style:italic;color:#808080;">// marks whether or not the class has been initialized</span>
        <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">static</span> <span style="font-weight:bold;color:#000000;">var</span> keysDown:<span style="color:#0000ff;">Object</span> = <span style="font-weight:bold;color:#000000;">new</span> <span style="color:#0000ff;">Object</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;  <span style="font-style:italic;color:#808080;">// stores key codes of all keys pressed</span>

        <span style="font-style:italic;color:#808080;">/**
         * Initializes the key class creating assigning event
         * handlers to capture necessary key events from the stage
         */</span>
        <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="font-weight:bold;color:#000000;">function</span> initialize<span style="color:#000000;">(</span><span style="color:#0000ff;">stage</span>:Stage<span style="color:#000000;">)</span> <span style="color:#000000;">{</span>
            <span style="color:#0000ff;">if</span> <span style="color:#000000;">(</span>!initialized<span style="color:#000000;">)</span> <span style="color:#000000;">{</span>
                <span style="font-style:italic;color:#808080;">// assign listeners for key presses and deactivation of the player</span>
                <span style="color:#0000ff;">stage</span>.<span style="color:#000080;">addEventListener</span><span style="color:#000000;">(</span>KeyboardEvent.<span style="color:#000080;">KEY_DOWN</span>, keyPressed<span style="color:#000000;">)</span>;
                <span style="color:#0000ff;">stage</span>.<span style="color:#000080;">addEventListener</span><span style="color:#000000;">(</span>KeyboardEvent.<span style="color:#000080;">KEY_UP</span>, keyReleased<span style="color:#000000;">)</span>;
                <span style="color:#0000ff;">stage</span>.<span style="color:#000080;">addEventListener</span><span style="color:#000000;">(</span>Event.<span style="color:#000080;">DEACTIVATE</span>, clearKeys<span style="color:#000000;">)</span>;

                <span style="font-style:italic;color:#808080;">// mark initialization as true so redundant</span>
                <span style="font-style:italic;color:#808080;">// calls do not reassign the event handlers</span>
                initialized = <span style="font-weight:bold;color:#000000;">true</span>;
            <span style="color:#000000;">}</span>
        <span style="color:#000000;">}</span>

        <span style="font-style:italic;color:#808080;">/**
         * Returns true or false if the key represented by the
         * keyCode passed is being pressed
         */</span>
        <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="font-weight:bold;color:#000000;">function</span> <span style="color:#0000ff;">isDown</span><span style="color:#000000;">(</span>keyCode:uint<span style="color:#000000;">)</span>:<span style="color:#0000ff;">Boolean</span> <span style="color:#000000;">{</span>
            <span style="color:#0000ff;">if</span> <span style="color:#000000;">(</span>!initialized<span style="color:#000000;">)</span> <span style="color:#000000;">{</span>
                <span style="font-style:italic;color:#808080;">// throw an error if isDown is used</span>
                <span style="font-style:italic;color:#808080;">// prior to Key class initialization</span>
                <span style="color:#0000ff;">throw</span> <span style="font-weight:bold;color:#000000;">new</span> <span style="color:#0000ff;">Error</span><span style="color:#000000;">(</span><span style="color:#ff0000;">"Key class has yet been initialized."</span><span style="color:#000000;">)</span>;
            <span style="color:#000000;">}</span>
            <span style="color:#0000ff;">return</span> <span style="color:#0000ff;">Boolean</span><span style="color:#000000;">(</span>keyCode <span style="color:#0000ff;">in</span> keysDown<span style="color:#000000;">)</span>;
        <span style="color:#000000;">}</span>

        <span style="font-style:italic;color:#808080;">/**
         * Event handler for capturing keys being pressed
         */</span>
        <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">static</span> <span style="font-weight:bold;color:#000000;">function</span> keyPressed<span style="color:#000000;">(</span>event:KeyboardEvent<span style="color:#000000;">)</span>:<span style="color:#0000ff;">void</span> <span style="color:#000000;">{</span>
            <span style="font-style:italic;color:#808080;">// create a property in keysDown with the name of the keyCode</span>
            keysDown<span style="color:#000000;">[</span>event.<span style="color:#000080;">keyCode</span><span style="color:#000000;">]</span> = <span style="font-weight:bold;color:#000000;">true</span>;
        <span style="color:#000000;">}</span>

        <span style="font-style:italic;color:#808080;">/**
         * Event handler for capturing keys being released
         */</span>
        <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">static</span> <span style="font-weight:bold;color:#000000;">function</span> keyReleased<span style="color:#000000;">(</span>event:KeyboardEvent<span style="color:#000000;">)</span>:<span style="color:#0000ff;">void</span> <span style="color:#000000;">{</span>
            <span style="color:#0000ff;">if</span> <span style="color:#000000;">(</span>event.<span style="color:#000080;">keyCode</span> <span style="color:#0000ff;">in</span> keysDown<span style="color:#000000;">)</span> <span style="color:#000000;">{</span>
                <span style="font-style:italic;color:#808080;">// delete the property in keysDown if it exists</span>
                <span style="color:#0000ff;">delete</span> keysDown<span style="color:#000000;">[</span>event.<span style="color:#000080;">keyCode</span><span style="color:#000000;">]</span>;
            <span style="color:#000000;">}</span>
        <span style="color:#000000;">}</span>

        <span style="font-style:italic;color:#808080;">/**
         * Event handler for Flash Player deactivation
         */</span>
        <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">static</span> <span style="font-weight:bold;color:#000000;">function</span> clearKeys<span style="color:#000000;">(</span>event:Event<span style="color:#000000;">)</span>:<span style="color:#0000ff;">void</span> <span style="color:#000000;">{</span>
            <span style="font-style:italic;color:#808080;">// clear all keys in keysDown since the player cannot</span>
            <span style="font-style:italic;color:#808080;">// detect keys being pressed or released when not focused</span>
            keysDown = <span style="font-weight:bold;color:#000000;">new</span> <span style="color:#0000ff;">Object</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;
        <span style="color:#000000;">}</span>
    <span style="color:#000000;">}</span>
<span style="color:#000000;">}</span></div>
</div>
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shanmukarthik.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shanmukarthik.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=9&subd=shanmukarthik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2008/08/05/keyisdown-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffe7733a0eb48a37e62e0afe22a0741d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Recording and streaming video with FM2 and AS3</title>
		<link>http://shanmukarthik.wordpress.com/2008/08/04/recording-and-streaming-video-with-fm2-and-as3/</link>
		<comments>http://shanmukarthik.wordpress.com/2008/08/04/recording-and-streaming-video-with-fm2-and-as3/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 05:06:59 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[FMS]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=6</guid>
		<description><![CDATA[I took this article from a site by Google search, I couldn&#8217;t remember the site name, but the credit goes to the author of the site. I took this useful information to your reviews.
For some reason all of the code examples for using FM2 are in AS2. Converting the examples to AS3 can be a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=6&subd=shanmukarthik&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><em>I took this article from a site by Google search, I couldn&#8217;t remember the site name, but the credit goes to the author of the site. I took this useful information to your reviews.</em></p>
<p>For some reason all of the code examples for using FM2 are in AS2. Converting the examples to AS3 can be a bit challenging, especially since there is one really key piece of information that is left out that is new to AS3 and specific to the use of FM2. The problem is the that FM2 only supports AMF0, but in AS3 the default setting for the NetConnection class&#8217; defaultObjectEncoding property is AMF3. Without changing this setting to AMF0, your code will seem to be correct, but will fail to connect without really telling you why. Check out the class that I created from the Adobe example and the MXML to use it.<br />
package<br />
{<br />
import flash.events.*;<br />
import flash.media.Microphone;<br />
import flash.media.Camera;<br />
import flash.media.Video;<br />
import flash.net.NetConnection;<br />
import flash.net.NetStream;<br />
import mx.controls.VideoDisplay;</p>
<p>public class StreamingFLV extends EventDispatcher {<br />
private var cam:Camera;<br />
private var mic:Microphone;<br />
private var rtmp:String;<br />
private var nc:NetConnection;<br />
private var ns:NetStream;<br />
private var local_video:VideoDisplay;<br />
private var _rtmp:String;<br />
private var _source:String;</p>
<p>public function StreamingFLV(_lv:VideoDisplay,_r:String,_s:String) {<br />
_rtmp = _r;<br />
_source = _s;</p>
<p>cam = Camera.getCamera();<br />
cam.addEventListener(ActivityEvent.ACTIVITY, activityHandler);<br />
cam.addEventListener(StatusEvent.STATUS, handleCameraStatus);</p>
<p>mic = Microphone.getMicrophone();<br />
mic.addEventListener(ActivityEvent.ACTIVITY, activityHandler);<br />
mic.addEventListener(StatusEvent.STATUS, handleCameraStatus);</p>
<p>local_video = _lv;</p>
<p>NetConnection.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0;<br />
nc = new NetConnection();<br />
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);<br />
nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);<br />
nc.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);<br />
nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);<br />
nc.connect(_rtmp);<br />
}</p>
<p>public function startRecordFLV():void {<br />
local_video.attachCamera(cam);<br />
ns.attachAudio(mic);<br />
ns.attachCamera(cam);<br />
ns.publish(_source, &#8220;record&#8221;);<br />
}</p>
<p>public function stopRecordFLV():void {<br />
ns.close();<br />
local_video.close();<br />
}</p>
<p>public function startPlayback():void {<br />
local_video.source = _rtmp +&#8221;/&#8221;+ _source + &#8220;.flv&#8221;;<br />
}</p>
<p>public function stopPlayback():void {<br />
local_video.close();<br />
}</p>
<p>private function connectStream():void {<br />
ns = new NetStream(nc);<br />
ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);<br />
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);<br />
ns.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);<br />
ns.client = this;</p>
<p>dispatchEvent(new Event(&#8220;onVideoReady&#8221;));<br />
}</p>
<p>private function handleCameraStatus(event:StatusEvent):void {<br />
trace(&#8220;handleCameraStatus: &#8221; + event);<br />
}</p>
<p>private function activityHandler(event:ActivityEvent):void {<br />
trace(&#8220;activityHandler: &#8221; + event);<br />
}</p>
<p>private function netStatusHandler(event:NetStatusEvent):void {<br />
trace(event.info.code);<br />
switch (event.info.code) {<br />
case &#8220;NetConnection.Connect.Success&#8221;:<br />
connectStream();<br />
trace(&#8220;Connected&#8221;);<br />
break;<br />
case &#8220;NetStream.Play.StreamNotFound&#8221;:<br />
trace(&#8220;No Connection!&#8221;);<br />
break;<br />
}<br />
}<br />
private function securityErrorHandler(event:SecurityErrorEvent):void {<br />
trace(&#8220;securityErrorHandler: &#8221; + event);<br />
}<br />
private function ioErrorHandler(event:AsyncErrorEvent):void {<br />
trace(&#8220;ioErrorHandler: &#8221; + event);<br />
}<br />
private function asyncErrorHandler(event:AsyncErrorEvent):void {<br />
trace(&#8220;asyncErrorHandler: &#8221; + event);<br />
}<br />
private function onMetaData(info:Object):void {<br />
trace(&#8220;metadata: duration=&#8221; + info.duration + &#8221; width=&#8221; + info.width + &#8221; height=&#8221; + info.height + &#8221; framerate=&#8221; + info.framerate);<br />
}<br />
private function onCuePoint(info:Object):void {<br />
trace(&#8220;cuepoint: time=&#8221; + info.time + &#8221; name=&#8221; + info.name + &#8221; type=&#8221; + info.type);<br />
}<br />
private function onPlayStatus(info:Object):void {<br />
trace(info.toString());<br />
}</p>
<p>}<br />
}<br />
And now the MXML:<br />
&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;mx:Application xmlns:mx=&#8221;http://www.adobe.com/2006/mxml &#8220;<br />
paddingTop=&#8221;0&#8243;<br />
paddingLeft=&#8221;0&#8243;<br />
paddingBottom=&#8221;0&#8243;<br />
paddingRight=&#8221;0&#8243;<br />
horizontalAlign=&#8221;center&#8221;<br />
verticalAlign=&#8221;middle&#8221;<br />
backgroundGradientAlphas=&#8221;[0,0]&#8220;<br />
backgroundColor=&#8221;#CCCCCC&#8221;<br />
applicationComplete=&#8221;init();&#8221;&gt;<br />
&lt;mx:Script&gt;<br />
&lt;![CDATA[<br />
import StreamingFLV;<br />
import flash.media.Camera;<br />
import flash.display.StageAlign;<br />
import flash.display.StageScaleMode;</p>
<p>private var rFLV:StreamingFLV;<br />
private var pFLV:StreamingFLV;<br />
private var isPlaying:Boolean = false;<br />
private var isRecording:Boolean = false;</p>
<p>private function init():void {<br />
stage.scaleMode = StageScaleMode.NO_SCALE;<br />
stage.align = StageAlign.TOP_LEFT;<br />
}</p>
<p>private function initRecordStream():void {<br />
rFLV = new StreamingFLV(video_record,"rtmp://los1aps-flash/zflv/test","recordSample");<br />
rFLV.addEventListener("onVideoReady",initUI);<br />
}</p>
<p>private function initPlayStream():void {<br />
pFLV = new StreamingFLV(video_play,"rtmp://los1aps-flash/zflv/test","recordSample");<br />
pFLV.addEventListener("onVideoReady",initUI);<br />
}</p>
<p>private function recordToggle():void {<br />
if (!isPlaying) {<br />
record.label = "RECORDING";<br />
rFLV.startRecordFLV();<br />
} else {<br />
record.label = "RECORD";<br />
rFLV.stopRecordFLV();<br />
}<br />
isPlaying = !isPlaying;<br />
}</p>
<p>private function playToggle():void {<br />
if (!isPlaying) {<br />
play.label = "PLAYING";<br />
pFLV.startPlayback();<br />
} else {<br />
play.label = "PLAY";<br />
pFLV.stopPlayback();<br />
}<br />
isPlaying = !isPlaying;<br />
}</p>
<p>private function initUI(evt:Event):void {<br />
record.enabled = true;<br />
play.enabled = true;<br />
}<br />
]]&gt;<br />
&lt;/mx:Script&gt;<br />
&lt;mx:VBox horizontalAlign=&#8221;center&#8221;&gt;<br />
&lt;mx:HBox&gt;<br />
&lt;mx:VBox horizontalAlign=&#8221;right&#8221;&gt;<br />
&lt;mx:VideoDisplay id=&#8221;video_record&#8221; width=&#8221;320&#8243; height=&#8221;240&#8243; creationComplete=&#8221;initRecordStream();&#8221; /&gt;<br />
&lt;mx:Button id=&#8221;record&#8221; label=&#8221;record&#8221; enabled=&#8221;false&#8221; click=&#8221;recordToggle();&#8221; /&gt;<br />
&lt;/mx:VBox&gt;<br />
&lt;mx:VBox horizontalAlign=&#8221;left&#8221;&gt;<br />
&lt;mx:VideoDisplay id=&#8221;video_play&#8221; width=&#8221;320&#8243; height=&#8221;240&#8243; creationComplete=&#8221;initPlayStream();&#8221; /&gt;<br />
&lt;mx:Button id=&#8221;play&#8221; label=&#8221;play&#8221; enabled=&#8221;false&#8221; click=&#8221;playToggle();&#8221; /&gt;<br />
&lt;/mx:VBox&gt;<br />
&lt;/mx:HBox&gt;<br />
&lt;/mx:VBox&gt;<br />
&lt;/mx:Application&gt;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shanmukarthik.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shanmukarthik.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=6&subd=shanmukarthik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2008/08/04/recording-and-streaming-video-with-fm2-and-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffe7733a0eb48a37e62e0afe22a0741d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>ActionScript Function calls</title>
		<link>http://shanmukarthik.wordpress.com/2008/08/01/actionscript-function-calls/</link>
		<comments>http://shanmukarthik.wordpress.com/2008/08/01/actionscript-function-calls/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 10:55:37 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=3</guid>
		<description><![CDATA[var correctCallback:Function;
var incorrectCallback:Function;
enable.call();
function setCorrectCallbackFunction(funct:Function) {
correctCallback = funct;
}
function setIncorrectCallbackFunction(funct:Function) {
incorrectCallback = funct;
}
function enable():void {
[ code ....]
}
function checkClick(event:MouseEvent) {
if (event.target.name == &#8220;button&#8221;) {
correctCallback.call();
} else if (event.target.name == &#8220;buttonIncorrect&#8221;) {
incorrectCallback.call();
}
}
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=3&subd=shanmukarthik&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>var correctCallback:Function;<br />
var incorrectCallback:Function;</p>
<p>enable.call();</p>
<p>function setCorrectCallbackFunction(funct:Function) {<br />
correctCallback = funct;<br />
}</p>
<p>function setIncorrectCallbackFunction(funct:Function) {<br />
incorrectCallback = funct;<br />
}</p>
<p>function enable():void {<br />
[ code ....]</p>
<p>}<br />
function checkClick(event:MouseEvent) {<br />
if (event.target.name == &#8220;button&#8221;) {<br />
correctCallback.call();<br />
} else if (event.target.name == &#8220;buttonIncorrect&#8221;) {<br />
incorrectCallback.call();<br />
}<br />
}</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shanmukarthik.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shanmukarthik.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&blog=4386605&post=3&subd=shanmukarthik&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2008/08/01/actionscript-function-calls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ffe7733a0eb48a37e62e0afe22a0741d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
	</channel>
</rss>