<?xml version="1.0" encoding="utf-8"?>

			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>TheRealTimeWeb.com - Tutorials</title>
			<link>http://www.therealtimeweb.com/index.cfm</link>
			<description>A technology blog with a special focus on real-time web technologies, web video and the Flash Platform.</description>
			<language>en-us</language>
			<pubDate>Thu, 23 May 2013 12:44:45 +0100</pubDate>
			<lastBuildDate>Wed, 16 May 2012 09:03:00 +0100</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>stefan@therealtimeweb.com</managingEditor>
			<webMaster>stefan@therealtimeweb.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>stefan@therealtimeweb.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			
			<itunes:explicit>no</itunes:explicit>
			
			<item>
				<title>Move An Existing Git Repository Into Bitbucket In 3 Steps</title>
				<link>http://www.therealtimeweb.com/index.cfm/2012/5/16/move-git-repo-to-bitbucket</link>
				<description>
				
				Thanks to my good friend Simon I&apos;ve been a happy git user for a few months now. I installed my own git server on &lt;a href=&quot;http://www.therealtimeweb.com/index.cfm/2012/2/13/git-gitolite-ec2-ubuntu&quot; target=&quot;_blank&quot;&gt;Amazon EC2 using Ubuntu, git and gitolite&lt;/a&gt; and just fired it up once or twice a day to push and pull. This worked out fine but with more and more easy to use git hosting services springing up I gave &lt;a href=&quot;http://www.atlassian.com/software/bitbucket/overview&quot; target=&quot;_blank&quot;&gt;Atlassian&apos;s bitbucket&lt;/a&gt; a try since it offers unlimited private repositories which is a bonus.&lt;p&gt;
It took me a little while to figure out how to move my existing repository into bitbucket, especially since it was already tracking the existing remote repo on my server. What follows are a few easy steps that describe the process - &lt;disclaimer&gt;but note that you follow along at your own risk.&lt;/disclaimer&gt;&lt;p&gt;&lt;strong&gt;1) Create a new bitbucket repo&lt;/strong&gt;&lt;br&gt;
Yes, I did not import my existing repo since I could not figure out how to do that. I connect via ssh to my git server yet bitbucket asks for a username andpassword when importing repos that require authentication. Maybe there&apos;s a way to do it, but I did not waste any more time on it, and the way outlined here also keeps your project history in tact, and it&apos;s simple.&lt;br&gt;
Once you created the new, empty repo on bitbucket simply leave that page open, we&apos;ll come back to it in step 3.&lt;img src=&quot;http://www.therealtimeweb.com/images/bitbucket1.jpg&quot; align=&quot;center&quot; id=&quot;blogimg&quot;&gt;&lt;p&gt;
&lt;strong&gt;2) Detach your existing local git repo from its remote&lt;/strong&gt;&lt;br&gt;
I&apos;m on OSX so I used Terminal to cd into my local project folder:
&lt;code&gt;
$ cd &apos;/Users/stefan/dev/projects/myproject&apos;
&lt;/code&gt;&lt;p&gt;
You can tell git to show you the remote aliases for your project:&lt;br&gt;
&lt;code&gt;
$ git remote
&lt;/code&gt;&lt;p&gt;
To see the actual URL for each alias use
&lt;code&gt;
$ git remote -v
&lt;/code&gt;&lt;p&gt;
I then detached my existing remote from the local repo:&lt;br&gt;
&lt;code&gt;
$ git remote rm origin
&lt;/code&gt;
&lt;p&gt;&lt;/p&gt;
&lt;strong&gt;3) Add your existing project code to the new remote repo on bitbucket&lt;/strong&gt;&lt;br&gt;
Back onto the bitbucket website where you still have the page open. You did leave it open, right? If you didn&apos;t then find the option I mention below, or just nuke the project and create it again.&lt;br&gt;
There&apos;s a big fat &apos;I have code I want to import&apos; showing under &apos;Add some code&apos;. Click it.
&lt;img src=&quot;http://www.therealtimeweb.com/images/bitbucket2.jpg&quot; align=&quot;center&quot; id=&quot;blogimg&quot;&gt;&lt;p&gt;
Simples. Bitbucket shows you the exact code you need to enter into Terminal to add your project to the new repo. It looks something like this:
&lt;br&gt;
&lt;code&gt;
$ cd /path/to/my/repo
$ git remote add origin ssh://git@bitbucket.org/username/myproject.git
$ git push -u origin master   # to push changes for the first time
&lt;/code&gt;
&lt;p&gt;
You&apos;re done. If you think I&apos;m out of my mind or have overlooked something then please feel free to have a moan in the comments. Or thank me if it helps :-)&lt;p&gt;
&lt;img src=&quot;http://www.therealtimeweb.com/images/awesomesauce.jpg&quot; id=&quot;blogimg&quot; align=&quot;center&quot;&gt;
				</description>
				
				<category>Tools</category>
				
				<category>Tutorials</category>
				
				<pubDate>Wed, 16 May 2012 09:03:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2012/5/16/move-git-repo-to-bitbucket</guid>
				
				
			</item>
			
			<item>
				<title>Easily Monitor Log File Output in OSX Terminal (tail -F)</title>
				<link>http://www.therealtimeweb.com/index.cfm/2012/2/28/debugging-using-tail</link>
				<description>
				
				Here&apos;s a quick tip that is a real time saver in some situations. As a developer you often come across programs, tools or servers that produce output in form of a log file. Or maybe - and this includes myself - you use logs for debugging purposes.&lt;p&gt;
In ColdFusion for example I regularly find myself adding cflog tags to my code in order to get a view into what my code is doing. Having to open and close log files constantly can be tedious at best, but luckily there is a really simple way of displaying a live view of the most recent entries using the standard Unix tail -F command.&lt;p&gt;
Whereas tail on its own simply displays the last part of a file, the -F option will not stop when the end of the file is reached but will keep monitoring the file for new lines and displaying them, thereby giving you effectively a live console view into the file.&lt;p&gt;
Taking ColdFusion logs as an example, here&apos;s how you&apos;d monitor a particular log file (mine are typically named according to the site or application I am working on):&lt;br&gt;
&lt;code&gt;
cd /Applications/ColdFusion9/logs/
tail -F playingornot.log 
&quot;Information&quot;,&quot;jrpp-4&quot;,&quot;02/21/12&quot;,&quot;17:40:30&quot;,&quot;PLAYINGORNOT&quot;,&quot;/index.cfm&quot;
&quot;Information&quot;,&quot;jrpp-5&quot;,&quot;02/21/12&quot;,&quot;17:40:33&quot;,&quot;PLAYINGORNOT&quot;,&quot;/index.cfm&quot;
&quot;Information&quot;,&quot;jrpp-5&quot;,&quot;02/21/12&quot;,&quot;17:40:35&quot;,&quot;PLAYINGORNOT&quot;,&quot;/cfc/Auth.cfc&quot;
&quot;Information&quot;,&quot;jrpp-5&quot;,&quot;02/21/12&quot;,&quot;17:40:35&quot;,&quot;PLAYINGORNOT&quot;,&quot;/cfc/Players.cfc&quot;
&quot;Information&quot;,&quot;jrpp-5&quot;,&quot;02/21/12&quot;,&quot;17:40:36&quot;,&quot;PLAYINGORNOT&quot;,&quot;/cfc/PlayTimes.cfc&quot;
&quot;Information&quot;,&quot;jrpp-1&quot;,&quot;02/28/12&quot;,&quot;09:37:37&quot;,&quot;PLAYINGORNOT&quot;,&quot;/index.cfm&quot;
&quot;Information&quot;,&quot;jrpp-1&quot;,&quot;02/28/12&quot;,&quot;09:37:40&quot;,&quot;PLAYINGORNOT&quot;,&quot;/cfc/Auth.cfc&quot;
&quot;Information&quot;,&quot;jrpp-1&quot;,&quot;02/28/12&quot;,&quot;09:37:41&quot;,&quot;PLAYINGORNOT&quot;,&quot;/cfc/Players.cfc&quot;
&quot;Information&quot;,&quot;jrpp-1&quot;,&quot;02/28/12&quot;,&quot;09:37:42&quot;,&quot;PLAYINGORNOT&quot;,&quot;/cfc/PlayTimes.cfc&quot;
&quot;Information&quot;,&quot;jrpp-2&quot;,&quot;02/28/12&quot;,&quot;09:40:30&quot;,&quot;PLAYINGORNOT&quot;,&quot;/cfc/PlayTimes.cfc&quot;
&lt;/code&gt;
&lt;p&gt;
As my application runs I can see new entries being displayed in real time in my log file - very handy. This particular log is produced by adding 
&lt;code&gt;
&lt;cflog file=&quot;#this.name#&quot; type=&quot;information&quot; text=&quot;#arguments.targetPage#&quot;&gt;
&lt;/code&gt;
to my Application.cfc&apos;s OnRequestStart handler.
&lt;p&gt;
This technique works for any kind of text based log file on operating systems that have the tail command or similar available.
				</description>
				
				<category>ColdFusion</category>
				
				<category>Tools</category>
				
				<category>Tutorials</category>
				
				<pubDate>Tue, 28 Feb 2012 08:34:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2012/2/28/debugging-using-tail</guid>
				
				
			</item>
			
			<item>
				<title>Installing git and gitolite on Ubuntu 11.10</title>
				<link>http://www.therealtimeweb.com/index.cfm/2012/2/13/git-gitolite-ec2-ubuntu</link>
				<description>
				
				Don&apos;t ask me how I did it (ok, you can ask, in fact I&apos;m going to tell you...), but somehow I now have a remote git server and gitolite for repo and user administration installed and running on Ubuntu 11.10 using an Amazon EC2 Micro instance.&lt;p&gt;
I&apos;ve spent all morning on this, tested it on 3 different instances (I love it how you can just throw away an EC2 instance and start again with a new one in a matter of minutes) and have kept a log of the steps which got me there. Please note that there may be errors or illogical jumps in this summary, but maybe it will be helpful nonetheless - or it may even work outright, who knows.&lt;p&gt;
BEfore we get started, here are some links that helped me (but note I had to pick some steps from some links, and other steps from others...). In particular I did not clone gitolite to my local machine (&lt;a href=&quot;http://www.bigfastblog.com/install-gitolite-to-manage-your-git-repositories&quot; target=&quot;_blank&quot;&gt;as this post suggests&lt;/a&gt; but ended up using &lt;code&gt;sudo apt-get install git&lt;/code&gt;&lt;p&gt;
Links I used:
&lt;br&gt;
&lt;a href=&quot;http://computercamp.cdwilson.us/git-gitolite-git-daemon-gitweb-setup-on-ubunt&quot; target=&quot;_blank&quot;&gt;git + gitolite + git-daemon + gitweb setup on Ubuntu 11.10 server&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://cisight.com/how-to-setup-git-server-using-gitolite-in-ubuntu-11-10-oneiric/&quot; target=&quot;_blank&quot;&gt;How to setup git server using gitolite in Ubuntu 11.10 Oneiric&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://www.bigfastblog.com/install-gitolite-to-manage-your-git-repositories&quot; target=&quot;_blank&quot;&gt;Install Gitolite To Manage Your Git Repositories&lt;/a&gt;&lt;p&gt;
&lt;img src=&quot;http://www.therealtimeweb.com/images/git1.jpg&quot; align=&quot;left&quot; id=&quot;blogimg&quot;&gt;&lt;p&gt;
First of all, get yourself an instance of Ubuntu (you may swap this for your preferred Linux distro). If you are in love with EC2 then head over to &lt;a href=&quot;http://www.alestic.com&quot; target=&quot;_blank&quot;&gt;alestic.com&lt;/a&gt; and click the selection at the top of the page (I&apos;m using the us-east region), and then pick your preferred image. 
&lt;p&gt;
The neat thing is that if you already have an Amazon Web Services account you can launch your instance with virtually one click, very neat. I picked the &lt;a href=&quot;https://console.aws.amazon.com/ec2/home?region=us-east-1#launchAmi=ami-6fa27506&quot; target=&quot;_blank&quot;&gt;Ubuntu 11.10 Oneiric
EBS boot&lt;/a&gt; image, 64 bit.&lt;p&gt;&lt;p&gt;&lt;p&gt;&lt;p&gt;
Once booted, SSH into your instance (consult other blogs for details on this if you need help).&lt;br&gt;I then ran the following commands first:&lt;br&gt;
&lt;code&gt;
sudo apt-get update
sudo apt-get upgrade
&lt;/code&gt;
&lt;br&gt;
Then create a tmp folder
&lt;br&gt;
&lt;code&gt;
mkdir tmp
&lt;/code&gt;
&lt;br&gt; which is where you will copy your public key into. Now open another local Terminal window and copy your public key - consult the steps for generating new keys from other sources if needed.&lt;br&gt;
&lt;code&gt;
# local machine
scp ~/.ssh/id_rsa.pub yourEC2server.com:/tmp/stefan.pub
&lt;/code&gt;&lt;br&gt;
Note that SCP is not always straight forward - I struggle with the syntax at times - and EC2 complicates it a bit. So the format may in fact look more like this:
&lt;code&gt;
scp -i ~/.ec2/yourEC2pair.pem ubuntu@ec2-999-239-176-93.compute-1.amazonaws.com:/tmp
&lt;/code&gt;&lt;br&gt;
I then installed git, gitolite and some stuff which I am not sure is strictly needed:&lt;br&gt;
&lt;code&gt;
sudo apt-get install git gitolite git-daemon-run git-doc
&lt;/code&gt;
&lt;br&gt;
Then added my git user details and added the git user&lt;br&gt;
&lt;code&gt;
git config --global user.name &quot;Stefan Richter&quot;
git config --global user.email &quot;my@domain.com&quot;
sudo adduser --system --shell /bin/bash --gecos &apos;git version control&apos; --group --disabled-password --home /home/git git
&lt;/code&gt;
&lt;br&gt;
The system should reply with&lt;br&gt;
&lt;code&gt;
Adding system user `git&apos; (UID 105) ...
Adding new group `git&apos; (GID 111) ...
Adding new user `git&apos; (UID 105) with group `git&apos; ...
Creating home directory `/home/git&apos; ...
&lt;/code&gt;
&lt;br&gt;
I then switched to the git user account, added a PATH variable and then actually ran the gitolite setup.
&lt;br&gt;
&lt;code&gt;
sudo su git
echo &quot;PATH=$HOME/bin:$PATH&quot; &gt; ~/.bashrc
# run gitolite setup, passing a reference to the .pub file we uploaded earlier. In my case this file was in the ubuntu/tmp folder.
gl-setup /home/ubuntu/tmp/stefan.pub
&lt;/code&gt;
&lt;br&gt;
Hit enter when asked, and quit the file that opens in VIM with :wq.&lt;br&gt;
I was now able to exit the remote SSH session and could now clone a the remote gitolite-admin repository:
&lt;br&gt;
&lt;code&gt;
git clone git@ec2-999-239-176-93.compute-1.amazonaws.com:gitolite-admin.git
&lt;/code&gt;
&lt;p&gt;
Amazingly this worked. Please note that I may well have left out a step, or got the order slightly wrong. If needed I could create a screencast sometime (please shout), I think this would make things clearer. Make sure you read the &lt;a href=&quot;http://sitaramc.github.com/gitolite/pictures.html&quot; target=&quot;_blank&quot;&gt;gitolite instructions&lt;/a&gt; for how you add users and repos. One mistake I made was to not push my changes to the remote and then was left wondering why my new repos were not showing... Git newbie, I know.
&lt;p&gt;
Lastly I downloaded a trial of &lt;a href=&quot;http://www.git-tower.com/&quot; target=&quot;_blank&quot;&gt;Tower&lt;/a&gt;, a GUI based git client that comes highly recommended - they even have a 25% off offer running right now.&lt;p&gt;
Good luck.
				</description>
				
				<category>Tools</category>
				
				<category>Amazon AWS</category>
				
				<category>Tutorials</category>
				
				<pubDate>Mon, 13 Feb 2012 11:19:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2012/2/13/git-gitolite-ec2-ubuntu</guid>
				
				
			</item>
			
			<item>
				<title>Uploading Files To Amazon S3 With ColdFusion</title>
				<link>http://www.therealtimeweb.com/index.cfm/2011/11/25/cf-upload-to-s3</link>
				<description>
				
				Since version 9.0.1 (if I am not mistaken) ColdFusion supports Amazon&apos;s S3 file storage pretty much out of the box. The complexities of access control to your bucket is abstracted away and you can use S3 almost like a local file system. You can read more about it in the CF docs and on &lt;a href=&quot;http://www.coldfusionjedi.com/index.cfm/2010/7/15/CF901-Guide-to-Amazon-S3-support-in-ColdFusion-901&quot; target=&quot;_blank&quot;&gt;Ray Camden&apos;s blog&lt;/a&gt;.&lt;p&gt;
My task at hand was to accept user submitted file uploads and store them in S3. According to the CF documentation the full set of cffile operations is supported, however I could not get it to work. &lt;br&gt;
The following failed for me with a &apos;destination invalid&apos; error:&lt;br&gt;
&lt;code&gt;
&lt;cfset mydir = &quot;s3://media.mysite.com/logos&quot;&gt;
&lt;cffile action=&quot;upload&quot; filefield=&quot;logo&quot; destination=&quot;#mydir#&quot; nameconflict=&quot;makeunique&quot; charset=&quot;utf-8&quot; /&gt;
&lt;/code&gt;&lt;p&gt;
Please note that in order for the s3:// syntax to resolve to your bucket you need to follow &lt;a href=&quot;http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSd160b5fdf5100e8f-4439fdac128193edfd6-7f08.html&quot; target=&quot;_blank&quot;&gt;some setup steps&lt;/a&gt; which I won&apos;t cover here. Also watch out for a &lt;a href=&quot;http://www.coldfusionjedi.com/index.cfm/2011/2/7/ColdFusion-S3-Implementation-bug-with-metadata-and-ACLs&quot; target=&quot;_blank&quot;&gt;bug related to setting metadata&lt;/a&gt;.&lt;p&gt;
The way I managed to work around the bug related to not being able to upload files directly into S3 I uploaded to my CF server first and then effectively moved the image into S3. This seemed to work:&lt;br&gt;
&lt;code&gt;
&lt;cfset mydir = &quot;s3://media.mysite.com/logos&quot;&gt;

&lt;!--- upload to own server ---&gt;
&lt;cffile action=&quot;upload&quot; filefield=&quot;logo&quot; destination=&quot;#expandpath(&apos;./&apos;)#&quot; nameconflict=&quot;makeunique&quot; charset=&quot;utf-8&quot; /&gt;
&lt;!--- create a unique name to save the image as ---&gt;
&lt;cfset logoImage = &quot;#createUUID()#.#cffile.serverFileExt#&quot; /&gt;
    
&lt;cfset imgPathLocal = &quot;#expandpath(&apos;./&apos;)#/#cffile.serverFile#&quot;&gt;
    
&lt;!--- open local image, then write to S3 ---&gt;
&lt;cfset localImage = imageRead(&quot;#imgPathLocal#&quot;)&gt;
&lt;cfset imageWrite(localImage, &quot;#mydir#/#logoImage#&quot;)&gt;
     
&lt;!--- set permissions on the newly created file on S3 ---&gt;
 &lt;cfset perms = [
      {group=&quot;all&quot;, permission=&quot;read&quot;}
  ]&gt;
&lt;cfset StoreAddACL(&quot;#mydir#/#logoImage#&quot;,&quot;#perms#&quot;)&gt;	
        
&lt;!--- delete the local image now ---&gt;
&lt;cfif fileexists(&quot;#imgPathLocal#&quot;)&gt;
	 &lt;cffile action=&quot;delete&quot; file=&quot;#imgPathLocal#&quot;&gt;
&lt;/cfif&gt;

&lt;/code&gt;
&lt;p&gt;
Note that this code is untested in its current form but should give you the idea. Hope it helps.
				</description>
				
				<category>ColdFusion</category>
				
				<category>Tutorials</category>
				
				<pubDate>Fri, 25 Nov 2011 09:52:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2011/11/25/cf-upload-to-s3</guid>
				
				
			</item>
			
			<item>
				<title>Shorthand For Sorting ArrayCollections In ActionScript &amp; Flex</title>
				<link>http://www.therealtimeweb.com/index.cfm/2011/11/7/arraycollection-sorting</link>
				<description>
				
				Here is a tip containing a quicker way to sort an ArrayCollection in ActionScript by using the underlying Array sortOn method. By quick I mean less code - I make no statement about performance.&lt;p&gt;
Normally to sort an ArrayCollection you would need to create instances of both the Sort and SortField classes to arrive at something like this (untested code to give you an idea):&lt;br&gt;
&lt;code&gt;
var sort:Sort = new Sort();
var sortField:SortField = new SortField();
sortField.name = &quot;myFieldName&quot;;
sortField.numeric = true;
sortField.descending = true;

myCollection.sort = sort;
myCollection.refresh();
&lt;/code&gt;
&lt;br&gt;
However since the source property of the ArrayCollection class points to the Array that acts as the source of the Arraycollection&apos;s data you can mess with it if you like (it&apos;s a bit naughty as you are not meant to do this and your mileage may vary).&lt;p&gt;
So therefore to sort the above example &apos;myCollection&apos; numerically by &apos;myFieldName&apos; you could to this:
&lt;br&gt;
&lt;code&gt;
myCollection.source.sortOn(&apos;myFieldName&apos;, Array.DESCENDING | Array.NUMERIC );
myCollection.refresh();
&lt;/code&gt;
&lt;br&gt;
I&apos;m sure someone will tell me off for this but here you go. This worked for me for my purposes and it seems a lot simpler. And I like simple things.
				</description>
				
				<category>Flex</category>
				
				<category>Tutorials</category>
				
				<pubDate>Mon, 07 Nov 2011 14:51:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2011/11/7/arraycollection-sorting</guid>
				
				
			</item>
			
			<item>
				<title>Converting And Editing AVCHD (.mts) Files On OSX</title>
				<link>http://www.therealtimeweb.com/index.cfm/2011/11/3/rewrapping-mts-avchd</link>
				<description>
				
				&lt;img src=&quot;/images/avchd.jpg&quot; align=&quot;left&quot; id=&quot;blogimg&quot;&gt;
A quick note about this article: I chose a slightly misleading title in order to help people find it more easily as most would not know that a search for &apos;rewrapping .mts files&apos; is what they may be after.&lt;p&gt;
This post is about rewrapping .mts files to make them compatible with QuickTime; it is not about re-encoding or editing .mts files (but rewrapping will make them editable using most common video editing tools).&lt;p&gt;
Many common camcorders and digital cameras - in particular Panasonic and Sony models - produce video files in AVCHD format, with file extension .mts, .m2ts or .m2t. These files often do not play back natively unless you install a third party video player such as &lt;a href=&quot;http://www.videolan.org/vlc/&quot; target=&quot;_blank&quot;&gt;VLC&lt;/a&gt;.
&lt;p&gt;
I was getting a bit annoyed at the fact that quick preview in Finder would not work with .mts files and that the format is generally a bit of a nuisance (iMovie for example won&apos;t find any compatible files if you tell it to look in a folder that only contains .mts files). Moreover I was looking to stitch some clips together which in turn was made more difficult by the .mts format.&lt;p&gt;So what does one do? Of course it is possible to convert the .mts file into a different format (although despite what I read I was unable to open my .mts files in HandBrake), but converting usually means to re-encode which commonly results in a loss of quality. I also did not want to re-encode dozens of videos - it would have taken a considerable amount of time.&lt;p&gt;  
I noticed that some tools (including one called Clipwrap) are able to rewrap the .mts file into formats such as .mov which iMovie is happy to open. Rewrapping basically means changing the container format of the file but leaving everything &apos;inside&apos; intact. This works because AVCHD uses compatible video and audio codecs (video is H.264) which will play fine in QuickTime once rewrapped.&lt;br&gt;
Now tools such as Clipwrap work fine - but its price point is $50 which is a bit steep when all you need to do is rewrap some files. I&apos;ve also noticed that the free FFMPEG can do the same (and I suspect that Clipwrap may use it under the hood).&lt;p&gt;
So I grabbed myself a FFMPEG binary for OSX (I can&apos;t recall which program had it bundled but you can download the binary I used &lt;a href=&quot;/enclosures/ffmpeg%2Ezip&quot; target=&quot;_blank&quot;&gt;from here&lt;/a&gt;) and used the following commandline option to rewrap my files: 
&lt;code&gt;
./ffmpeg -i test.mts -vcodec copy -acodec aac -ab 512k -strict experimental testoutput.m4v
&lt;/code&gt;
This is an extremely quick process since the file is not being re-encoded. I did so far found one issue related to scrubbing the resulting file; it seems to somehow hang for a few seconds. I&apos;d love to know a fix for this - please leave a comment if you know one.
				</description>
				
				<category>Tools</category>
				
				<category>Tutorials</category>
				
				<pubDate>Thu, 03 Nov 2011 08:59:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2011/11/3/rewrapping-mts-avchd</guid>
				
				
				<enclosure url="http://www.therealtimeweb.com/enclosures/ffmpeg.zip" length="7323308" type="application/zip"/>
				
			</item>
			
			<item>
				<title>Enable Ping ICMP Replies For Amazon EC2 Windows Instances</title>
				<link>http://www.therealtimeweb.com/index.cfm/2011/10/28/amazon-ec2-ping</link>
				<description>
				
				Here&apos;s a quick tip on how to configure a Windows Amazon instance to successfully respond to ping requests.
&lt;p&gt;
By default an EC2 security group does not allow ICMP ping requests, and in some cases the internal Windows firewall will also block it. You therefore should check both settings if you want to be able to ping your EC2 Windows instance.
&lt;/p&gt;&lt;p&gt;
&lt;b&gt;Step 1: Check Windows Firewall Settings&lt;/b&gt;&lt;br&gt;
To enable the Windows firewall to allow ping request check that under &apos;Inbound Rules&apos; the setting &apos;File and Printer Sharing (Echo Request - ICMPv4-In)&apos; is enabled. The icon should turn green if the rule is enabled. &lt;br&gt;
Alternatively you can use the commandline option:&lt;br&gt;
&lt;code&gt;netsh advfirewall firewall add rule name=&quot;ICMP Allow incoming V4 echo request&quot; protocol=icmpv4:8,any dir=in action=allow&lt;/code&gt;&lt;p&gt;
This should take care of the Windows firewall.&lt;b&gt;Step 2: Configure EC2 Security Group&lt;/b&gt;&lt;br&gt;
EC2 security groups use the so-called Classless Inter-Domain Routing method to configure IPs and routes. You can read more about it &lt;a href=&quot;http://en.wikipedia.org/wiki/CIDR&quot; target=&quot;_blank&quot;&gt;on Wikipedia&lt;/a&gt; and I will not pretend that I know all the details, but what I do know is that the syntax to specify a single IP as part of whichever rule you are trying to set up is [the_IP]/32. The /32 part means that the first 32 bits (which in case of IPv4 addresses means all of them) have to match for the rule to match. So just remember: to create a particular rule for one IP address only just specify the IP followed by a forward slash.&lt;p&gt;
On the other hand to allow all IPs (I tend to grant access to services normally to one IP or all) you would specify 0.0.0.0/0.&lt;p&gt;
So first you should create a custom ICMP rule of type Echo Request as shown in the first image. 
&lt;img src=&quot;/images/echorequest.jpg&quot; id=&quot;blogimg&quot;&gt;&lt;p&gt;
Next you specify the IP address (or optional CIDR blocks) and then apply your rule as shown in the second image.&lt;p&gt;
&lt;img id=&quot;blogimg&quot; src=&quot;http://www.therealtimeweb.com/images/echoip.jpg&quot; margin=&quot;8&quot;&gt;
&lt;p&gt;
Your pings to the instance should now work.
				</description>
				
				<category>Amazon AWS</category>
				
				<category>Tutorials</category>
				
				<pubDate>Fri, 28 Oct 2011 05:23:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2011/10/28/amazon-ec2-ping</guid>
				
				
			</item>
			
			<item>
				<title>Adding event sounds to the Chat Component (by Gani)</title>
				<link>http://www.therealtimeweb.com/index.cfm/2004/3/1/event-sounds-peoplelist</link>
				<description>
				
				In this tutorial we will be explaining how to add a sound in the chat
          component so that when a message is received or sent it will be played.&lt;br&gt;
            &lt;br&gt;
    First of all, open up your application and in the first frame create the
    code for the sound object that will be played.&lt;br&gt;
            &lt;img src=&quot;/images/tutorials/linkage.gif&quot; width=&quot;179&quot; height=&quot;183&quot; hspace=&quot;6&quot; align=&quot;right&quot;&gt; &lt;br&gt;
    You are going to need a sound to play, so go ahead and bring a sound into
    your library that you would like to be played when you send and/or receive
    a message . Once you have the sound file imported, right click on it in the
    library and choose linkage. Enter a name for your sound and press ok.&lt;br&gt;
            &lt;br&gt;
            &lt;br&gt;
    In this example the name of our sound is &apos;chimes&apos;&lt;br&gt;
    &lt;br&gt;
    Now we need to create the sound object.&lt;br&gt;
    &lt;br&gt;
    &lt;span class=&quot;codeview&quot;&gt;chatSound = new Sound();&lt;br&gt;
    chatSound.attachSound(&amp;quot;chimes&amp;quot;);&lt;/span&gt;&lt;/p&gt;
        &lt;p&gt;The next thing we need to do is make the function that will play the
          sound.&lt;br&gt;
            &lt;br&gt;
            &lt;span class=&quot;codeview&quot;&gt;function playSound(){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;chatSound.start();&lt;br&gt;
    }&lt;/span&gt;&lt;br&gt;
    &lt;br&gt;
    Click an instance of the chat component onto the stage, rightClick on it,
    select &apos;edit in place&apos; and find the layer called actions. Select the first
    frame to reveal its code in the actionscript editor.&lt;br&gt;
            &lt;br&gt;
    You have to find the following two functions&lt;br&gt;
    &lt;span class=&quot;codeview&quot;&gt;FCChatClass.prototype.receiveMessage = function( mesg
    )&lt;/span&gt; and&lt;br&gt;
            &lt;span class=&quot;codeview&quot;&gt;FCChatClass.prototype.sendMessage = function(mesg) &lt;/span&gt;&lt;/p&gt;
        &lt;p&gt;You need to add the following line of code to the sendMessage function:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;codeview&quot;&gt;&amp;nbsp;_root.playSound();&lt;/span&gt;&lt;br&gt;
    &lt;br&gt;
    You should also place the following piece of code inside the receiveMessage
    function. This will check to make sure that the sound does not play when
    the message is coming from yourself but only when it comes for another user.&lt;br&gt;
            &lt;span class=&quot;codeview&quot;&gt;if(mesg.slice(25,this.username.length+25)!=this.username){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;_root.playSound();&lt;br&gt;
    }&lt;/span&gt;&lt;br&gt;
    &lt;br&gt;
    The completed code should look like this:&lt;br&gt;
    &lt;span class=&quot;codeview&quot;&gt;FCChatClass.prototype.receiveMessage = function( mesg
    ) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;this.history_txt.htmlText += mesg;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;this.history_txt.scroll = this.history_txt.maxscroll;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;if(mesg.slice(25,this.username.length+25)!=this.username){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_root.playSound();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
    }&lt;br&gt;
    &lt;br&gt;
    FCChatClass.prototype.sendMessage = function(mesg) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;this.nc.call( &amp;quot;FCChat.&amp;quot; + this.name + &amp;quot;.sendMessage&amp;quot;,
null, &amp;nbsp;&amp;nbsp;&amp;nbsp;this.message_txt.text );&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;this.message_txt.text = &amp;quot;&amp;quot;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;_root.playSound();&lt;br&gt;
    };&lt;/span&gt;&lt;/p&gt;
        &lt;p&gt;You&apos;re done. (and keep the sounds subtle or we won&apos;t visit your app
          ;-)&lt;br&gt;
        &lt;/p&gt;
				</description>
				
				<category>Tutorials</category>
				
				<pubDate>Mon, 01 Mar 2004 17:25:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2004/3/1/event-sounds-peoplelist</guid>
				
				
			</item>
			
			<item>
				<title>Running Flashcom Server alongside IIS</title>
				<link>http://www.therealtimeweb.com/index.cfm/2004/2/2/Running-Flashcom-Server-alongside-IIS</link>
				<description>
				
				If you are running your own webserver and maybe have bought a Flashcom license alongside it then you might be tempted to run both your webserver and flashcom apps on the same box. And why not, after all we don&apos;t all have multiple machines at our disposal.&lt;br&gt;
        &lt;br&gt;
        The following configuration is one that I have set up several times.
        I am running IIS (Microsoft&apos;s Internet Information Server) and FCS (Flash
        Communication Server 1.5.2) on the same server which uses Windows 2000
        Server as its OS.&lt;br&gt;
        It&apos;s possible to use other webservers like Apache for this but in this tutorial I will focus on IIS and FCS on Windows so keep that in mind if your setup is different. &lt;br&gt;
        &lt;br&gt;
        The principles behind it are the same on any server: we want FCS to use other ports than the standard 1935 because we want to use http tunneling. As you might know tunneling uses port 80 (usually used for &apos;normal&apos; http website traffic) or port 443 which is common for SSL traffic. Both ports are often open on firewalls hence the tunneling there ;-)&lt;br&gt;
        &lt;br&gt;
        The problem is that no two services on one IP address (read: our machine) can use the same port - we would end up having FCS and IIS competing for port 80, and one service would win. Should FCS start up before IIS then it might grab  port 80 and not allow any website (IIS) traffic through it, effectively making any website unavailable. that&apos;s when you would get the alert in IIS saying &apos;address is already in use&apos;. Let that be your warning sign.&lt;br&gt;
        &lt;br&gt;
        The whole problem is easily solved in a few steps.&lt;br&gt;
        &lt;br&gt;
        &lt;span&gt;Step 1 - Assign a second IP address to your server&lt;br&gt;
        If your server is hosted remotely simply ask your hosting provider for a second IP. Sometimes they charge for this but it&apos;s usually a $10 one off fee, that&apos;s all. Your host might ask you why you want the secondary IP, tell them you want to run 2 services on port 80.&lt;br&gt;
      If you are running your own server then assign a secondary IP yourself, how this is done is beyond the scope of this article. You&apos;ll find this information on the net. &lt;br&gt;
      &lt;br&gt;
      &lt;b&gt;Step 2 - Stop IIS grabbing all available IPs&lt;/b&gt;&lt;br&gt;
      By default IIs will bind to all IP addresses it can find. To prevent this from happening you need to disable socket pooling in IIS. This is quite easily done and you can &lt;a href=&quot;http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q238/1/31.ASP&amp;NoWebContent=1&quot; target=&quot;_blank&quot;&gt;see a full description in this article&lt;/a&gt;. &lt;br&gt;
      &lt;br&gt;
      &lt;span class=&quot;redtext&quot;&gt;Addition: since this tutorial was released I have also installed FCS on
      Windows 2003 Server and the process of stopping IIS grabbing all IPs is
      different to Windows 2000. You need to use a utility called httpcfg.exe,
      &lt;a href=&quot;http://www.microsoft.com/resources/documentation/WindowsServ/2003/all/techref/en-us/Default.asp?url=/resources/documentation/windowsServ/2003/all/techref/en-us/httpcfg.asp&quot; target=&quot;_blank&quot;&gt;read
      about it here&lt;/a&gt;.&lt;br&gt;
      The following steps apply to Windows 2000 as well as Windows 2003.
      &lt;/p&gt;
      &lt;p&gt;&lt;b&gt;Step 3 - Bind IIS to one IP address &lt;/b&gt;&lt;br&gt;
        For example say your host has assigned the following two IP addresses to your server: 123.123.123.1 and 123.123.123.2. We decide we want to bind 123.123.123.1 to IIS.&lt;br&gt;
      To do this open Internet Information Services Manager (start &amp;gt; control panel &amp;gt; Administrative Tools &amp;gt; Internet Information Services). Right-click on the first website listed and select &apos;Properties&apos;. The following panel (or similar) should pop up:&lt;br&gt;
      &lt;img src=&quot;/images/tutorials/iis.gif&quot; width=&quot;435&quot; height=&quot;190&quot;&gt;      &lt;br&gt;
        &lt;br&gt;
        In the dropdown next to &apos;IP Address&apos; you can now select one of all IP addresses available on this machine. You should select the one of the two you have available. Also add any host headers if necessary and repeat this process for every site on your server, always making sure that no site has (All Unassigned) selected. Each site should bind to the same IP address, we will later bind FCS to the other.&lt;br&gt;
        For information on host headers consult the Microsoft website. You should know how these work if you run your own webserver.&lt;br&gt;
        &lt;br&gt;
        &lt;span&gt;Step 4 - Bind FCS to the other IP address &lt;br&gt; 
        We are almost done. IP addresses in FCS are configured via a file called Adaptor.xml. You can bind FCS to any IP or all IPs available. By default FCS  tries to bind to all IPs available so we need to edit the Adaptor.xml file to change this. Adaptor.xml is inside the &lt;span class=&quot;codeview&quot;&gt;conf\_defaultRoot_directory. Open it for edit.&lt;br&gt;
        Find the &amp;lt;HostPort&amp;gt;:1935&amp;lt;/HostPort&amp;gt; tag. In this case FCS binds to port 1935 on any IP address. In our example we want it to bind to 123.123.123.2 on port 1935, 80 and 443.&lt;br&gt;
        &lt;br&gt;
        Therefore our host tag should look like this:&lt;br&gt;
        &amp;lt;HostPort&amp;gt;123.123.123.2:1935,80,443&amp;lt;/HostPort&amp;gt;&lt;br&gt;
        &lt;br&gt;
        &lt;/span&gt;Save the file, restart FCS, restart IIS and you are done.
        You can now run websites and FCS on the same machine with http tunneling fully functional.&lt;br&gt;
        &lt;br&gt;
        &lt;/span&gt;I *think* that the admin port 1111 for FCS 
        will still bind to both IPs but this won&apos;t affect IIS in any way. Also I you do not want to use tunneling then IIS and FCS live happily alongside on a single IP. &lt;br&gt;
				</description>
				
				<category>Tutorials</category>
				
				<pubDate>Mon, 02 Feb 2004 18:55:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2004/2/2/Running-Flashcom-Server-alongside-IIS</guid>
				
				
			</item>
			
			<item>
				<title>Configuring Flashcom Server with multiple vhosts</title>
				<link>http://www.therealtimeweb.com/index.cfm/2004/2/2/Configuring-Flashcom-Server-with-multiple-vhosts</link>
				<description>
				
				Time for a new tutorial and this time I will try and explain how you
        set up and configure your Flashcom Server with multiple vhosts. It should
        be noted that &lt;span class=&quot;maincopybold&quot;&gt;only the Professional Edition
        supports vhosts&lt;/span&gt; so if you run the Developer or Personal Edition
        then you will not be able to add additional vhosts. Dev and Personal
        Edition will only run apps under the _defaultVhost_ &lt;br&gt;
        &lt;br&gt;
        The following steps apply to the &lt;span class=&quot;maincopybold&quot;&gt;Windows version of Flashcom Server&lt;/span&gt; but apart from Windows style filepaths you can take a lot away from this tutorial for Linux installations, too. &lt;br&gt;
        &lt;br&gt;
        Flashcom Server uses XML files for configuration and these work in several levels starting at the server level (Server.xml) down to adapter (Adapter.xml) and vhost level (Vhost.xml) The last level is Application.xml which as the name says is responsible for configurations on an Application level.&lt;br&gt;
        The XML files are well commented and essentially pretty easy to maintain.
        To set up a working vhost you will normally need to edit 3 files:&lt;br&gt;
        - &lt;span class=&quot;maincopybold&quot;&gt;Server.xml, Vhost.xml and Application.xml&lt;/span&gt;&lt;br&gt;
        &lt;br&gt;
        Server.xml can be found in the root of the /conf directory; Adapter.xml can be found inside the _defaultRoot_ directory and both Application.xml and Vhost.xml can be found under _defaultVHost_&lt;br&gt;
        &lt;br&gt;
        This is how your file structure would look like after a standard Flashcom installation in Windows (only _defaultVHost_ is available) &lt;br&gt;
        &lt;img src=&quot;/images/tutorials/vhost1.gif&quot; width=&quot;500&quot; height=&quot;133&quot; vspace=&quot;3&quot; border=&quot;1&quot;&gt;        &lt;br&gt;
        &lt;br&gt;
        &lt;span class=&quot;maincopybold&quot;&gt;Server.xml
        &lt;/span&gt;&lt;br&gt;
        Strictly speaking you do not have to edit server.xml to add a vhost.
        This is because the vhost entry in server.xml is only needed so that
        you can later add vhost administrators via the admin console. Adding
        a vhost to server.xml does NOT actually add the vhost to the server config.
        This might be a bit confusing but it&apos;s actually the process of creating
        the necessary folders under your adapter level which creates the vhost. &lt;br&gt;
        &lt;br&gt;
        Having said that I would always recommend you add your vhost to server.xml
        to keep things organised. This will also allow you later to modify the
        vhost admins via the admin console. So here&apos;s how you add the entry to
        Server.xml. you need to copy the entire &amp;lt;VirtualHost....&amp;gt;...&amp;lt;/Virtualhost&amp;gt; entry,
        basically the whole chunk that you see in the pic below. &lt;br&gt;
        &lt;img src=&quot;/images/tutorials/vhost2.gif&quot; width=&quot;377&quot; height=&quot;380&quot; vspace=&quot;5&quot; border=&quot;1&quot;&gt;        &lt;/p&gt;
      &lt;p&gt;Next you need to give your new vhost a name. This is important and you should always name it after the domain (or subdomain) the you use to later access it. Say for example your main domain is myflashcomhost.com then why not call this vhost vhost1.myflashcomhost.com. It is important to understand that this new subdomain must resolve to your Flashcomserver IP address. If it doesn&apos;t then you&apos;ll never be able to connect! &lt;br&gt;
        &lt;br&gt;
        So for this example I will call my vhost &lt;span class=&quot;maincopybold&quot;&gt;vhost1.myflashcomhost.com&lt;/span&gt; and this is how the entry in server.xml should look like:&lt;span class=&quot;maincopybold&quot;&gt;&lt;br&gt;
        &lt;img src=&quot;/images/tutorials/vhost3.gif&quot; width=&quot;479&quot; height=&quot;102&quot; vspace=&quot;5&quot; border=&quot;1&quot;&gt;        &lt;br&gt;
        &lt;/span&gt;&lt;span class=&quot;maincopybold&quot;&gt;Adding the vhost folder&lt;/span&gt;&lt;br&gt; 
        This next step is important as it will actually create your vhost. You
        have to create a new folder under your adapter level (in our example
        under ...\conf\_defaultRoot_), on the same level as _defaultVHost_. I
        sometimes just copy the entire _defaultVHost_ and then rename it. &lt;span class=&quot;maincopybold&quot;&gt;Warning:
        The name of this folder needs to correspond to your domain that you will
        use to access this vhost, in our example vhost1.myflashcomhost.com.&lt;/span&gt;&lt;br&gt; 
        &lt;br&gt;
        Your folder structure under /conf/_defaultRoot_ should now look like
        this:&lt;br&gt;
        &lt;img src=&quot;/images/tutorials/vhost4.gif&quot; width=&quot;398&quot; height=&quot;105&quot; vspace=&quot;3&quot; border=&quot;1&quot;&gt;&lt;br&gt;
        This has in effect created the new vhost on your server.&lt;br&gt;
        &lt;br&gt; 
        But in order
        to be able to actually use the vhost you need to configure the &amp;lt;ScriptLibPath&amp;gt; in
        Application.xml and also the &amp;lt;AppsDir&amp;gt; in Vhost.xml. If you have
        created your new folder by copying _defaultVHost_ then those 2 files
        already exist inside your new vhost folder. If they don&apos;t then you need
        to copy them over from an existing vhost. You should also create a folder
        called &apos;admin&apos; inside vhost1.myflashcomhost.com if
        you want this vhost to be able to accept admin connections. Have a look
        inside _defaultVHost_ for an example. &lt;br&gt;
        &lt;br&gt;
        &lt;span class=&quot;maincopybold&quot;&gt;Adding the corresponding applications folder for your vhost
        &lt;/span&gt;&lt;br&gt;
        The Flashcom Server configuration is usually split up in 2 parts: the
        admin files under /conf to which only the server admin has access to
        and the vhost folders themselves (yet to be created) which will host
        your actual serverside scripts such as main.asc. The vhost folders can
        be made available via FTP for example to allow access for vhost admins.
        It is also a good idea to add a dedicated scriptlib to each running vhost. &lt;br&gt;
        &lt;br&gt;
        In a nutshell what you have to do is create another folder to which you
        map your appsdir and scriptlib. &lt;span class=&quot;maincopybold&quot;&gt;This folder
        should not reside under /conf and it should not be accessible from the
        web, only via FTP. This applications folder is not the place from which
        you serve your swf files!&lt;br&gt;
        &lt;/span&gt;If you are planning on running a webserver on the same machine as your
        Flashcom Server then I recommend you read my &lt;a href=&quot;fcs_iis.cfm&quot;&gt;tutorial
        on IIS and Flashcom&lt;/a&gt;,
        it gives some tips in regards to IP addresses and ports. &lt;span class=&quot;maincopybold&quot;&gt;&lt;br&gt; 
        &lt;/span&gt;&lt;br&gt;
In my example the applications folder lives under C:\Inetpub\flashcom\applications
(note that it is not under wwwroot and therefore not accessible from the web)
but you can basically map it to wherever you see fit.&lt;br&gt;
I
call my new folder &apos;vhost1&apos; and create 2 more folders inside it called &apos;apps&apos;
and &apos;scriptlib&apos;. I then copy my scriptlib files from abother vhost into the scriptlib
folder. My folder structure now looks like this:&lt;br&gt;
        &lt;img src=&quot;/images/tutorials/vhost5.gif&quot; width=&quot;425&quot; height=&quot;88&quot; vspace=&quot;5&quot; border=&quot;1&quot;&gt;        &lt;/p&gt;
      &lt;p&gt; Now we need to map appsdir to C:\Inetpub\flashcom\applications\vhost1\apps
        and map scriptlibdir to C:\Inetpub\flashcom\applications\vhost1\scriptlib        &lt;br&gt;
        &lt;br&gt;
        The correct XML entry therefore
        look like this for Application.xml &lt;br&gt; 
        &lt;img src=&quot;/images/tutorials/vhost6.gif&quot; width=&quot;340&quot; height=&quot;65&quot; vspace=&quot;5&quot; border=&quot;1&quot;&gt;&lt;br&gt;
        and like this for Vhost.xml        &lt;br&gt; 
        &lt;img src=&quot;/images/tutorials/vhost7.gif&quot; width=&quot;320&quot; height=&quot;51&quot; vspace=&quot;4&quot; border=&quot;1&quot;&gt;&lt;br&gt;
        &lt;br&gt;
        And that is pretty much all there is to it. It sounds a lot more complicated
        than it really is and I recommend you just try it out. I always restart
        my server just for good measure although I have been told that this is
        not strictly necessary. &lt;br&gt;
        &lt;br&gt;
        a coomon problem oftne is that the new vhost domain (in our example        vhost1.myflashcomhost.com)
        doesn&apos;t actually resolve correctly to the FCS IP and in that case you
        will never successfully connect. I therefore always open my admin console
        and check if my connection attempt actually hits the server - and I keep
        a particular close eye on the fact that the connection attempt does not
        connect to _defaultVHost_. If it does connect to _defaultVHost_ instead
        of your new vhost then you might have a config problem.&lt;br&gt;
        &lt;br&gt;
        If your connection does not hit the server at all then the problem is
        likely DNS related. &lt;br&gt;
        &lt;br&gt;
        If your connection does hit the Flashcom box but fails in some other
        way then nine times out of ten the admin console will give you some clues
        as to what is going wrong. &lt;br&gt;
        &lt;br&gt;
        If you are still stuck after that then I recommend reading 
        the Flashcom Server docs at &lt;a href=&quot;http://www.macromedia.com/support/flashcom/documentation.html&quot; target=&quot;_blank&quot;&gt;http://www.macromedia.com/support/flashcom/documentation.html&lt;/a&gt; and
      in particular the first 2 PDF&apos;s called Installing Flash Communication Server
        and Managing Flash Communication Server.&lt;br&gt;
        &lt;br&gt;
        There are also some interesting Live Docs available at &lt;a href=&quot;http://www.macromedia.com/livedocs/flashcom/mx2004/index.html&quot; target=&quot;_blank&quot;&gt;http://www.macromedia.com/livedocs/flashcom/mx2004/index.html
        &lt;/a&gt;&lt;br&gt;
				</description>
				
				<category>Tutorials</category>
				
				<pubDate>Mon, 02 Feb 2004 18:51:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2004/2/2/Configuring-Flashcom-Server-with-multiple-vhosts</guid>
				
				
			</item>
			
			<item>
				<title>Displaying FLV video previews in a listbox</title>
				<link>http://www.therealtimeweb.com/index.cfm/2004/2/1/Displaying-FLV-video-previews-in-a-listbox</link>
				<description>
				
				&lt;a href=&quot;/downloads/flv_list.zip&quot; target=&quot;_blank&quot;&gt;Download Source&lt;/a&gt;
&lt;p&gt;
This video tutorial will explain how you can create an XML-driven listbox component which displays thumbnail previews of a series of flv files. The download of each flv file is stopped as soon as the preview is displayed, allowing for a large amount of flv files to be previewed, scrolled through and played.&lt;br&gt;
          &lt;br&gt;
          Requirements: &lt;a href=&quot;/expressinstall/&quot; target=&quot;_blank&quot;&gt;You need Player 8&lt;/a&gt; and tolerance for a heavy german accent  :-P&lt;br&gt;
        &lt;br&gt;
   
&lt;object width=&quot;563&quot; height=&quot;640&quot;&gt;
&lt;param name=&quot;movie&quot; value=&quot;/flash/flvlistbox_videotutorial.swf&quot;&gt;&lt;/param&gt;
&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;
&lt;embed src=&quot;/flash/flvlistbox_videotutorial.swf&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; width=&quot;563&quot; height=&quot;640&quot;&gt;&lt;/embed&gt;
&lt;/object&gt;

        &lt;br&gt;
        &lt;/p&gt;
        &lt;p&gt;Credits&lt;br&gt;
          &lt;a href=&quot;http://www.goo-e.com/&quot; target=&quot;_blank&quot;&gt;Lisa Larson&lt;/a&gt; for the &lt;a href=&quot;http://www.macromedia.com/devnet/mx/flash/articles/video_player.html&quot; target=&quot;_blank&quot;&gt;original article&lt;/a&gt; &lt;br&gt;
        Srinivas Manapragada of Macromedia for the cellrenderer&lt;br&gt;
        Craig Goodman  of Macromedia&lt;br&gt;
          &lt;a href=&quot;http://www.akamai.com&quot; target=&quot;_blank&quot;&gt;Akamai&lt;/a&gt; for hosting the video&lt;br&gt;
          &lt;br&gt;
				</description>
				
				<category>Tutorials</category>
				
				<pubDate>Sun, 01 Feb 2004 19:04:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2004/2/1/Displaying-FLV-video-previews-in-a-listbox</guid>
				
				
			</item>
			
			<item>
				<title>Clearing the Chat History (Part 2)</title>
				<link>http://www.therealtimeweb.com/index.cfm/2004/2/1/Clearing-the-Chat-History-Part-2</link>
				<description>
				
				As promised here is the second part of our tutorial. We will now take a
    closer look at how we can clear the chat history by clearing the server-side
    shared object that holds it and broadcasting this change to all connected
    users.&lt;br&gt;
            &lt;br&gt;
    This tutorial presumes that you are using the &lt;a href=&quot;http://www.macromedia.com/software/flashcom/download/components/&quot; target=&quot;_blank&quot;&gt;pre-build
    communication components from Macromedia&lt;/a&gt;.&lt;br&gt;
            &lt;br&gt;
    A fortunate fact is that all functionality to do what we are trying to achieve
    is already built into the components, all we need to take care of is how
    to call upon these functions.&lt;br&gt;
            &lt;br&gt;
    Step one: Make sure clients are allowed to clear the history.&lt;br&gt;
    Take a look at the chat.asc file, it includes all the server-side code that
    works alongside your chat component (and after all that&apos;s where the chat
    history is displayed).&lt;br&gt;
            &lt;br&gt;
    Line 35 of chat.asc should look like this&lt;br&gt;
    &lt;span class=&quot;codeview&quot;&gt;FCChat.prototype.allowClear = true; // Allow clients
    to clear history &lt;/span&gt;&lt;br&gt;
            &lt;br&gt;
    If &lt;span class=&quot;codeview&quot;&gt;allowClear&lt;/span&gt; is set to &lt;span class=&quot;codeview&quot;&gt;false&lt;/span&gt; then
    make sure you change it to &lt;span class=&quot;codeview&quot;&gt;true&lt;/span&gt;.&lt;br&gt;
    &lt;br&gt;
    Step two: Making sure you know what you are doing ;-)&lt;br&gt;
    The function that you will be calling in a minute is located from line 90
    of chat.asc, it starts like this:&lt;br&gt;
            &lt;span class=&quot;codeview&quot;&gt;FCChat.prototype.clearHistory = function(
            client ) {&lt;br&gt;
    ...&lt;br&gt;
    } &lt;br&gt;
    &lt;br&gt;
            &lt;/span&gt;If you (somehow, anyhow) call this function it will first
            check if allowClear is set to true (which it is now), then it will
            clear the chat history by running these four lines of code&lt;br&gt;
            &lt;span class=&quot;codeview&quot;&gt;this.history_so.setProperty( &amp;quot;history&amp;quot;,
            null );&lt;br&gt;
    this.history_so.flush();&lt;br&gt;
    delete this.history;&lt;br&gt;
    this.history = new Array; &lt;br&gt;
            &lt;/span&gt;&lt;br&gt;
    and finally it will broadcast this change to all connected clients.&lt;br&gt;
    &lt;span class=&quot;codeview&quot;&gt;// Broadcast a clearHistory command to all clients&lt;br&gt;
    this.message_so.send( &amp;quot;clearHistory&amp;quot; );&lt;br&gt;
    return true;&lt;/span&gt;&lt;br&gt;
    &lt;br&gt;
    So far that&apos;s very easy, you don&apos;t even have to write any code at all. &lt;br&gt;
    &lt;br&gt;
    Step three: call the clearHistory() method&lt;br&gt;
    Easier said than done... but then again it&apos;s not that hard. I will show you
    one way of doing this very easily and it will allow you to clear the chat
    history by typing a &apos;secret&apos; string into the input field of your application&apos;s
    chat window.&lt;br&gt;
            &lt;br&gt;
    Line 73 of chat.asc contains the method &lt;span class=&quot;codeview&quot;&gt;sendMessage()&lt;/span&gt; and
    here it takes two parameters, one of which is &lt;span class=&quot;codeview&quot;&gt;mesg&lt;/span&gt; -
    the message string that has just been received and will now be sent to all
    clients. However before it gets sent we will intercept &lt;span class=&quot;codeview&quot;&gt;mesg&lt;/span&gt;,
    parse it and if the string matches our secret command then we will call the &lt;span class=&quot;codeview&quot;&gt;clearHistory()&lt;/span&gt; method.&lt;br&gt;
            &lt;br&gt;
    This is easily done by simply adding the following piece of code on line
    74 (and inside the sendMesage() method:&lt;br&gt;
            &lt;span class=&quot;codeview&quot;&gt;if (mesg.toLowerCase() == &amp;quot;secretstring&amp;quot;){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;this.clearHistory();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
    else { &lt;br&gt;
    ...&lt;br&gt;
    } &lt;/span&gt;&lt;br&gt;
    &lt;br&gt;
    Basically all the original code will now be inside the else statement and
    will only be executed if the string does not match our secret command. However
    if you were to type &amp;quot;secretstring&amp;quot; (or whatever you have hard coded
    on line 74) then only &lt;span class=&quot;codeview&quot;&gt;this.clearHistory();&lt;/span&gt; would
    run, resulting in the deletion of the chat history and a broadcast of this
    change to all connected users. &lt;br&gt;
            &lt;br&gt;
    Moreover, none of the connected clients will ever see the secret string because
    it will not be broadcasted. &lt;br&gt;
            &lt;br&gt;
    Remember that you must restart your application from the application inspector,
    this will reload the modified chat.asc file. &lt;br&gt;
            &lt;br&gt;
    Hopefully this little tutorial will get you started. There are loads of other
    ways of calling &lt;span class=&quot;codeview&quot;&gt;clearHistory()&lt;/span&gt;, for example
    you could call it every time a user connects (but then again that&apos;s a bit
    silly) or every time the last user disconnects (makes more sense).&lt;br&gt;
            &lt;br&gt;
    I leave that part up to you but the most obvious option is probably writing
    your own server-side function which you can call by pressing a pushbutton
    inside your client movie - for example you could have some kind of admin
    movie that is different to all the &apos;public&apos; ones. For more information take
    a closer look at the &lt;span class=&quot;codeview&quot;&gt;call()&lt;/span&gt; method of the &lt;a href=&quot;http://download.macromedia.com/pub/flashcom/documentation/FlashCom_CS_ASD.pdf&quot; target=&quot;_blank&quot;&gt;client-side
    communication actionscript dictionary&lt;/a&gt;. &lt;br&gt;
            &lt;br&gt;
    Good luck and keep those suggestions coming in.&lt;br&gt;
    &lt;a href=&quot;/index.cfm/2004/2/1/Clearing-the-Chat-History-Part-1&quot;&gt;&lt;br&gt;
    Check the first part of this tutorial&lt;/a&gt;. &lt;br&gt;
				</description>
				
				<category>Tutorials</category>
				
				<pubDate>Sun, 01 Feb 2004 18:38:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2004/2/1/Clearing-the-Chat-History-Part-2</guid>
				
				
			</item>
			
			<item>
				<title>Clearing the Chat History (Part 1)</title>
				<link>http://www.therealtimeweb.com/index.cfm/2004/2/1/Clearing-the-Chat-History-Part-1</link>
				<description>
				
				This is one of those subjects that keep coming up again and again: How to
    clear the chat history. &lt;br&gt;
            &lt;br&gt;
    Most commonly known chat systems do not show you the conversations that have
    gone on before the user logs in. Developers therefore often like to emulate
    this behaviour in their FlashCom applications. &lt;br&gt;
            &lt;br&gt;
    There are several ways of clearing a chat. The chat history is held in a
    server side persistent shared object (SSPSO) by default. If you clear the
    contents of this object then all clients will reflect this change immediately
    through their onSync event. &lt;br&gt;
            &lt;br&gt;
    The following tutorial presumes that you are using Macromedia&apos;s Communication
    Components. &lt;br&gt;
            &lt;br&gt;
            &lt;br&gt;
    Option 1: Clearing the history on the client side only - the lazy way&lt;br&gt;
    Lazy way meaning you are not actually clearing the shared object which holds
    the history on the server but you are simply resetting the chat text field
    inside one client&apos;s movie to an empty string, effectively clearing it. &lt;br&gt;
            &lt;br&gt;
    All you need to do is for example to add the following code to frame one
    of your movie (in this case your chat component instance must be called chat_mc):&lt;br&gt;
            &lt;span&gt;chat_mc.history_txt = &amp;quot;&amp;quot;;&lt;/span&gt;&lt;br&gt;
            &lt;br&gt;
    To make it more robust you can also put this line of code into an onLoad()
    event of the chat_mc movie or provide a function that can be called by the
    user, for example when clicking a button.&lt;br&gt;
    Your function on frame 1 of the main timeline could be:&lt;br&gt;
    &lt;span class=&quot;codeview&quot;&gt;function clearHistory() {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.chat_mc.clearHistory();&lt;br&gt;
    };&lt;/span&gt;&lt;br&gt;
    &lt;br&gt;
    and all you then need is a pushbutton, it will call the function clearHistory()
    when clicked by a user:&lt;br&gt;
            &lt;img src=&quot;/images/tutorials/clear_hist.gif&quot; width=&quot;209&quot; height=&quot;119&quot; vspace=&quot;3&quot;&gt; &lt;br&gt;
            &lt;br&gt;
    Hopefully this will point you in the right direction for integrating it with
    your own application. Next week we will look at how to clear the server side
    shared object on the server and broadcasting this change to all connected
    users, clearing the chat on each client. &lt;br&gt;
            &lt;a href=&quot;/index.cfm/2004/2/1/Clearing-the-Chat-History-Part-2&quot;&gt;&lt;br&gt;
    Make sure to also check the second part of this tutorial&lt;/a&gt;.&lt;br&gt;
				</description>
				
				<category>Tutorials</category>
				
				<pubDate>Sun, 01 Feb 2004 18:37:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2004/2/1/Clearing-the-Chat-History-Part-1</guid>
				
				
			</item>
			
			<item>
				<title>Live Screen capture with Camtasia and Flashcom (by Brajeshwar)</title>
				<link>http://www.therealtimeweb.com/index.cfm/2004/2/1/Live-Screen-capture-with-Camtasia-and-Flashcom-by-Brajeshwar</link>
				<description>
				
				All the way long, I had been thinking that &lt;a href=&quot;http://www.techsmith.com/products/studio/default.asp&quot; target=&quot;_blank&quot;&gt;Camtasia
  Studio Recorder&lt;/a&gt; can output only a max of 320 x 240 res. But I am wrong,
  now you can broadcast whatever dimension you wish. As there is no easy way
  to do an app sharing or a desktop sharing directly with Macromedia Flash Communication
  Server MX 1.0 (or indeed 1.5 - ed.), Camtasia Studio comes to the rescue with
  its live record output feature.&lt;br&gt;
        &lt;br&gt;
  First you may &lt;a href=&quot;/downloads/camtasia.zip&quot; target=&quot;_blank&quot;&gt;download the file&lt;/a&gt; (I
  was playing with) so that you can skip everything and start playing.&lt;br&gt;
  &lt;br&gt;
  Steps :&lt;br&gt;
  (a) create a video object on your stage and size it to 640 x 480, give an instance
  name of say &amp;quot;camtasia_mc&amp;quot;.&lt;br&gt;
  (b) add the following frame script
  &lt;p&gt;&lt;/p&gt;
  &lt;p&gt;&lt;span class=&quot;codeview&quot;&gt;//let us get the Camtasia Studio Video Capture Driver&lt;br&gt;
    //you may throw up an array of camera source available and&lt;br&gt;
    //let the user choose from them&lt;br&gt;
    //for this, we know what we are doing, so let us get it&lt;br&gt;
    for (i = 0; i &amp;lt; camera.names.length; i++) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;if (camera.names[i] == &amp;quot;Camtasia Studio Video Capture
Driver&amp;quot;) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
    }&lt;br&gt;
    // Get the camera&lt;br&gt;
    mycamera = camera.get(i);&lt;br&gt;
    mycamera.setMode(640, 480, 5, true);&lt;br&gt;
    mycamera.setQuality(0, 50);&lt;br&gt;
    //show the live output&lt;br&gt;
    camtasia_mc.attachVideo(mycamera);&lt;/span&gt;&lt;br&gt;
    &lt;br&gt;
    (c) start live recorder and remember to set the video format to 640 x 480&lt;br&gt;
    (d) run your Flash document.&lt;br&gt;
    &lt;br&gt;
    There you see your live feed coming out in the Flash document.&lt;br&gt;
    This same technique cam be used for any camera source, like a TV Tuner card
    which can in turn broadcast a TV channel live using Flashcom Server.&lt;br&gt;
            &lt;br&gt;
    External link: &lt;a href=&quot;http://www.techsmith.com/products/studio/default.asp&quot; target=&quot;_blank&quot;&gt;Camtasia
    Studio&lt;/a&gt;&lt;br&gt;
				</description>
				
				<category>Tutorials</category>
				
				<pubDate>Sun, 01 Feb 2004 18:34:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2004/2/1/Live-Screen-capture-with-Camtasia-and-Flashcom-by-Brajeshwar</guid>
				
				
			</item>
			
			<item>
				<title>Flash Communication Server-Side framework (by Fernando Florez)</title>
				<link>http://www.therealtimeweb.com/index.cfm/2004/2/1/serverside-framework</link>
				<description>
				
				This subject sounds really advanced but it is not. There isn&amp;rsquo;t much info about the Flash Communication Server Server-Side framework but along this tutorial I&amp;rsquo;ll try to document some interesting parts of it that hopefully will help you with some common tasks you could have on your daily development. 
      &lt;br&gt;
      &lt;BR&gt; 
      I think this framework was created not as a utility but as a manager for flashcom server-side components (something like the UIComponent class for Client-Side components) but it also has some nice utilities we can take advantage of. 
      &lt;br&gt;
      &lt;br&gt;
      &lt;span class=&quot;maincopybold&quot;&gt;The normal .asc structure
      &lt;/span&gt;&lt;BR&gt; 
      Normally an .asc (ActionScript Communication) file will have this structure: 
      &lt;BR&gt; &lt;textarea name=&quot;textarea&quot; cols=&quot;60&quot; rows=&quot;17&quot; wrap=&quot;OFF&quot;&gt;application.onAppStart = function(){
	// this will be executed when the application instance it&apos;s initialized
}

application.onConnect = function(clientRef){
	// this will be executed each time a new user connects to the application instance
	// &quot;clientRef&quot; is a Client instanceof the new connected user
	// here we need to acceptConnection or rejectConnection
	// if any of these commands are called then the client is in &quot;lurker&quot; mode
	// and can&apos;t interact with the application instance or clients
}

application.onDisconnect = function(clientRef){
	// this will be executed each time a user disconnects from the application instance
	// this could be because a NetConnection.close call or if the user closed the browser
	// &quot;clientRef&quot; is a Client instance of the disconnected user
}
&lt;/textarea&gt;
      &lt;br&gt;
      &lt;BR&gt; This is the basic structure, we have more server-side events but they are used in specific occasions and are not really common as these ones are. 
      &lt;br&gt;
      &lt;br&gt;
      &lt;span class=&quot;maincopybold&quot;&gt;Server-side event declaration&lt;/span&gt;&lt;BR&gt;     
      We can only specify one server-side event declaration, if we specify more than one then only the last one will remain. 
       So is it possible to have more than one server-side event declaration and make them all work? 
      &lt;BR&gt; Not really but this is when the server-side framework is useful. 
      &lt;BR&gt; This feature is not supported and I sincerely haven&amp;rsquo;t tested it much so it may have some wrong behaviors. 
      &lt;br&gt;
      &lt;BR&gt; First of all we need to load the framework into our .asc file. 
      &lt;BR&gt; 
      &lt;span class=&quot;codeview&quot;&gt;load(&amp;quot;framework.asc&amp;quot;); &lt;/span&gt;&lt;BR&gt; The framework.asc file is on our scriptlib folder so we can load it this way without specifying any path (I extremely recommend not modifying or moving this file if we don&amp;rsquo;t have an idea of what we are doing exactly). 
      &lt;br&gt;
      &lt;BR&gt; Then just create your server-side events like you normally do but instead of making them inside your application object create them inside other objects created by you. For example: 
      &lt;br&gt;
      &lt;textarea name=&quot;textarea&quot; cols=&quot;60&quot; rows=&quot;14&quot; wrap=&quot;OFF&quot;&gt;this.myFirstObject = new Object(); 
this.myFirstObject.onConnect = function(newClient){ 
trace (&quot;onConnect: myFirstObject&quot;); 
} 
this.myFirstObject.onDisconnect = function(oldClient){ 
trace (&quot;onDisconnect: myFirstObject&quot;); 
} 
this.mySecondObject = new Object(); 
this.mySecondObject.onConnect = function(newClient){ 
trace (&quot;onConnect: mySecondObject&quot;); 
} 
this.mySecondObject.onDisconnect = function(oldClient){ 
trace (&quot;onDisconnect: mySecondObject&quot;); 
} &lt;/textarea&gt;
      &lt;br&gt;
      &lt;BR&gt;  
      You can have as many objects as you want/need and each one of these objects can have any of the server-side methods. We have the &amp;ldquo;&lt;span class=&quot;codeview&quot;&gt;onConnectAccept&lt;/span&gt;&amp;rdquo; and &amp;ldquo;&lt;span class=&quot;codeview&quot;&gt;onConnectReject&lt;/span&gt;&amp;rdquo; events too if you have already used them with components. 
      &lt;br&gt;
      &lt;BR&gt; Now we only need to subscribe our objects into the gFrameworkFC object which is the base instance of the framework. 
      &lt;br&gt;
      &lt;BR&gt; &lt;span class=&quot;codeview&quot;&gt;gFrameworkFC.addListener(this.myFirstObject); 
      &lt;BR&gt; 
      gFrameworkFC.addListener(this.mySecondObject);
      &lt;/span&gt;&lt;BR&gt; &lt;br&gt;
      Run the code and Voila!&lt;br&gt;
      &lt;BR&gt; The framework was intended to work with components, it&amp;rsquo;s our base class for server-side components but there are so many nice things in there so why not use it with non-component application? 
      &lt;BR&gt; We use it a lot here at &lt;a href=&quot;http://www.funciton.com/&quot;&gt;funciton communications.&lt;/a&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;span class=&quot;maincopybold&quot;&gt;Why have a Server-side framwork &lt;/span&gt;&lt;BR&gt; The first question that came to my mind was the purpose of the server-side framework, in flash remoting we don&amp;rsquo;t have a server-side framework and we still have components for it so what&amp;rsquo;s the real purpose of this framework? 
      &lt;br&gt;
      &lt;BR&gt; The reason for this is that flashcom is pure event callbacks, we have the onConnect, the onDisconnect, the onStatus, etc, etc. but we only have one &amp;ldquo;application&amp;rdquo; object and the possibility for only one main.asc file. I bet the flashcom team asked themselves this question: &amp;ldquo;How can we execute these events for different objects?&amp;rdquo; and the answer is with an event manager that should be able to broadcast the events to all subscribed objects. 
      &lt;br&gt;
      &lt;BR&gt; The first part of this tutorial explains on how to use it (see above). This is done by the framework each time we subscribe our component class via the FCComponent constructor. 
      &lt;BR&gt; Now the problem is that each component should have it&amp;rsquo;s own room in where it can rest, this room depends on the component type (the type can be a simpleconnect, peoplelist, etc.). 
      &lt;br&gt;
      &lt;BR&gt; The object gFrameworkFC object has another object named &amp;ldquo;components&amp;rdquo; and this is the *hotel* for all the components. 
      &lt;BR&gt; Inside this object new objects are created for each component type (what we call rooms before, remember?) 
      &lt;br&gt;
      &lt;BR&gt;      For example, if we use the FCChat component then it will be placed like this in the framework: 
       &lt;span class=&quot;codeview&quot;&gt;gFrameworkFC.components.FCChat.componentInstance&lt;br&gt;
       &lt;/span&gt;&lt;BR&gt; &amp;ldquo;componentInstance&amp;rdquo; is the instance of our client-side component on stage. Any symbol on stage has a unique instance name even if we didn&amp;rsquo;t give it one Flash will give one for us to it. 
      &lt;BR&gt; Each &amp;ldquo;room&amp;rdquo; can have any amount of components subscribed to it, each of those properties point to our server-side component class instance. 
       Now everything is getting clear, huh? 
      &lt;br&gt;
      &lt;BR&gt; Anyway, let&amp;rsquo;s continue by reviewing one framework method that appeared in one of the dot releases for flashcom 1.5 (it was for flashcom 1.5.1 if I remember right). 
      &lt;br&gt;
      &lt;BR&gt; We all know that &amp;ldquo;arguments&amp;rdquo; in flashcom is not really an array but an object. &amp;ldquo;What a great bug!&amp;rdquo; you may say but not really, it&amp;rsquo;s not Macromedia&amp;rsquo;s fault or even decision it&amp;rsquo;s something specified on the ECMA in which the flashcom engine is based. To avoid this uncomfortable thing the framework has this method that will convert any object into an array. It can convert any object into an array but it&amp;rsquo;s used only for arguments conversion (this does not mean that you can&amp;rsquo;t use it for other things). 
      &lt;br&gt;
      &lt;BR&gt; The method is named &amp;ldquo;&lt;span class=&quot;codeview&quot;&gt;__toarray__&lt;/span&gt;&amp;rdquo; and is placed in the gFrameworkFC object. 
      &lt;br&gt;
      &lt;BR&gt; An example of it could be: 
      &lt;br&gt;
      &lt;BR&gt; &lt;span class=&quot;codeview&quot;&gt;var obj = new Object(); 
      &lt;BR&gt;
      trace (obj.length); //Error! I don&amp;rsquo;t have that property, that is an array property &lt;BR&gt; 
      obj = gFrameworkFC.__toarray__(obj); 
      &lt;BR&gt;
      trace (obj.length); // Look Ma&amp;rsquo;! It&amp;rsquo;s working&lt;/span&gt;&lt;br&gt;
      &lt;BR&gt; Now we can do whatever we want with &amp;ldquo;&lt;span class=&quot;codeview&quot;&gt;obj&lt;/span&gt;&amp;rdquo;, this means we can apply an splice, pop, shift, etc. to it. 
      &lt;br&gt;
      &lt;BR&gt; Ok, last thing in this tutorial before I get too boring. How many times you had the need to give each client instance a unique id or how many times have you seen people doing it? Lots, right? 
      &lt;br&gt;
      &lt;BR&gt; 
      Normally a developer will do something like: 
      (Editor: yes, I do it all the time...)&lt;br&gt;      &lt;BR&gt; &lt;span class=&quot;codeview&quot;&gt;application.onAppStart = function(){ 
      &lt;BR&gt; 
      this.uniqueID = 0; 
      &lt;BR&gt; 
      } 
      &lt;BR&gt; 
      application.onConnect = function(newClient){ &lt;br&gt;
      newClient.id = this.uniqueID++; &lt;br&gt;
      }
      &lt;/span&gt;&lt;br&gt;
      &lt;BR&gt; So every client instance will have a unique identifier. &amp;ldquo;uniqueID&amp;rdquo; will return to 0 when the application is restarted. 
      &lt;br&gt;
      &lt;BR&gt; We can avoid these steps and just include the framework.asc file on our main.asc file (if we haven&amp;rsquo;t done it yet). The framework creates a unique identifier that you can access with the &amp;ldquo;__ID__&amp;rdquo; property. For example: 
      &lt;br&gt;
      &lt;BR&gt; 
      &lt;span class=&quot;codeview&quot;&gt;load(&amp;quot;framework.asc&amp;quot;); &lt;br&gt;
      &lt;/span&gt;&lt;span class=&quot;codeview&quot;&gt; &amp;nbsp;&amp;nbsp;application.onConnect = function(newClient){ &lt;br&gt;
      &amp;nbsp;&amp;nbsp;trace (newClient.__ID__); &lt;br&gt;
      } &lt;/span&gt;
      &lt;br&gt;
      &lt;BR&gt; That&amp;rsquo;s all for this tutorial, I hope you like it. 
      &lt;BR&gt; Don&amp;rsquo;t forget to visit our blog at: &lt;a href=&quot;http://blog.funciton.com/en/&quot;&gt;http://blog.funciton.com/en/&lt;/a&gt;
      &lt;br&gt;
      &lt;BR&gt; 
      Take care, have fun and keep flashing.&lt;br&gt;
				</description>
				
				<category>Tutorials</category>
				
				<pubDate>Sun, 01 Feb 2004 17:35:00 +0100</pubDate>
				<guid>http://www.therealtimeweb.com/index.cfm/2004/2/1/serverside-framework</guid>
				
				
			</item>
			</channel></rss>