Embedding a Flex Facebook application in an IFrame

I started, like a lot of people following the excellent tutorial:
Create your first Facebook application with Flex
Sure enough, you are able to create an application in Flex that opens a popup window to login to Facebook and add your new Facebook application. You can then access your photos, friends, profile info, etc. and do what you will.

The obvious next step is to embed the application right in Facebook, like most Facebook apps. So, on to the next tutorial:
Deploy your first Flex application on Facebook

The only problem, is that it doesn’t work. The application will be embedded in Facebook, but will still open up that annoying popup window to add the application to the user profile.

The reason being is that if the logged in user has not already added the application, then the variables passed to the SWF by Facebook does not include the session key, and other information needed to create a WebSession directly. From looking through the FacebookSessionUtil code, I believe that the popup window is the result on this code trying to open a JSSession instead of a WebSession.

The solution that I have found is to handle the application approval through the Facebook PHP Client Library.
What you need to do is: Read the rest of this entry »

Errors #2044/#2036 loading image in Flex with Loader object

I ran into a situation that had me pulling my hair out a little this weekend and the solution ended up being very simple.  I thought I would share in case someone runs into the same situation.
I had some simple code to load an image using the Loader object.  Here is a simplified version of the code:
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” creationComplete=”init()”>
private var imgLoader:Loader;
private function init():void{
imgLoader = new Loader();
imgLoader.load(new URLRequest(encodeURI(“testImages/test1.jpg”)));
private function imageLoaded(e:Event):void{
img1.source = e.currentTarget.content;
<mx:Image x=”83″ y=”74″ id=”img1″/>
I added the “testimages” directory to the project with the “test1.jpg” file in that folder and tested it.  In worked great.  So, I built my release version and uploaded it to my server to test.  But on executing it I get the following error message:
Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.
What the heck?  Everything works fine running locally, permissions seem to be ok.
for (i=0; i<15 minutes; i++){
I finally figured out my problem.  The “testimages” folder needed to be the “testImages” folder (notice the capitalized ‘I’).  It was working fine locally because I am on windows where the paths are case-insensitive.  But when I uploaded it to my case-sensitive Linux server, the penguin would not excuse my sloppiness.
So, I renamed the folder and everything worked like a dream.  Hope this helps someone.

Removal of Antivirus 2010

Antivirus 2010 is a rogue anti-spyware program from the same family as Antivirus 2008 and Antivirus 2009. Like its previous incarnations, Antivirus 2010 is advertised through the use of advertisements on the Web pretending to be online anti-malware scanners. These advertisements pretend to scan your computer and then state that your computer is infected and that you should download and install Antivirus 2010 to remove these infections. These rogues are also known to be advertised and installed through Trojans that display fake security alerts in your Windows taskbar stating you are infected. Once you click on one of these alerts, it will bring you to the download page for Antivirus 2010, or even download and install it without your permission.

Once Antivirus 2010 is installed on your computer, it will be automatically configured to run when you logon to Windows. This is done by adding a startup that launches the C:\Windows\System32\wingamma.exe executable. This executable will then launch the AV2010.exe and the fake Windows Security Center. Once running, it will scan your computer and list a variety of infections that cannot be removed unless you first purchase the software. This infection will also randomly display fake security alerts on your computer stating that you are infected or have some sort of security risk. If you click on these alerts, it will prompt you to purchase the software. These fake alerts, along with a fake Windows Security Center that advertises Antivirus 2010, are used to further scare you into thinking you are infected so you purchase the software.

Another new addition to these types of rogues is the creation of a fake Blue Screen of Death. At random intervals, Antivirus 2010 will create what appears to be a Windows crash, but in reality is just a fake screen. These fake crashes are used to further persuade you into purchasing the software. If you receive this crash, you can simply reboot your computer , or try pressing Alt-Tab or Control-Alt-Delete to get out of it. The text of the crash is:

***STOP: 0x000000D1 (0x0000000, 0xF73120AE, 0xC0000008, 0xC000000)

A spyware application has been detected and Windows has been shut down to prevent damage to your computer


If this is the first time you’ve seen this Stop error screen, restart you [sic] computer. If this screen appears again, follow these steps:

Click to make sure your antivirus software is properly installed. If this is a new installation, ask you software manufacturer for any antivirus updates you might need.

Windows detected unregistered version of Antivirus 2010 protection on your computer. If problem continue, please activate your antivirus software to prevent computer damage and data loss.

*** SRV.sys – Address F73120AE base at C0000000, DateStamp 36b072a3

How to remove Antivirus 2010 (Uninstall Instructions)

What this programs does:

Threat Classification:

Information on Rogue Programs & Scareware

Tools Needed for this fix:

Malwarebytes’ Anti-Malware

Symptoms that may be in a HijackThis Log:

O2 – BHO: IEDefenderBHO – {FC8A493F-D236-4653-9A03-2BF4FD94F643} – C:\Windows\System32\IEDefender.dll

O4 – HKLM\..\Run: [Windows Gamma Display] C:\Windows\System32\wingamma.exe /adjustment

Automated Removal Instructions for Antivirus 2010 using Malwarebytes’ Anti-Malware:

Print out these instructions as we will need to close every window that is open later in the fix.

Download Malwarebytes’ Anti-Malware, or MBAM, from the following location and save it to your desktop:

Malwarebytes’ Anti-Malware Download Link

Once downloaded, close all programs and Windows on your computer, including this one.

Double-click on the icon on your desktop named mbam-setup.exe. This will start the installation of MBAM onto your computer.

When the installation begins, keep following the prompts in order to continue with the installation process. Do not make any changes to default settings and when the program has finished installing, make sure you leave both the Update Malwarebytes’ Anti-Malware and Launch Malwarebytes’ Anti-Malware checked. Then click on the Finish button.

MBAM will now automatically start and you will see a message stating that you should update the program before performing a scan. As MBAM will automatically update itself after the install, you can press the OK button to close that box and you will now be at the main program as shown below.

On the Scanner tab, make sure the the Perform full scan option is selected and then click on the Scan button to start scanning your computer for Antivirus 2010 related files.

MBAM will now start scanning your computer for malware. This process can take quite a while, so we suggest you go and do something else and periodically check on the status of the scan. When MBAM is scanning it will look like the image below.

When the scan is finished a message box will appear as shown in the image below.

You should click on the OK button to close the message box and continue with the Antivirus2010 removal process.

You will now be back at the main Scanner screen. At this point you should click on the Show Results button.

A screen displaying all the malware that the program found will be shown as seen in the image below. Please note that the infections found may be different than what is shown in the image.

You should now click on the Remove Selected button to remove all the listed malware. MBAM will now delete all of the files and registry keys and add them to the programs quarantine. When removing the files, MBAM may require a reboot in order to remove some of them. If it displays a message stating that it needs to reboot, please allow it to do so. Once your computer has rebooted, and you are logged in, please continue with the rest of the steps.

When MBAM has finished removing the malware, it will open the scan log and display it in Notepad. Review the log as desired, and then close the Notepad window.

You can now exit the MBAM program.

Your computer should now be free of the Antivirus2010 program. While this version is free, you may want to consider purchasing the PRO version of Malwarebytes’ Anti-Malware to protect against these types of threats in the future. There is no harm in paying for good software.

Associated Antivirus 2010 Files:

c:\Program Files\AV2010

c:\Program Files\AV2010\AV2010.exe

c:\Program Files\AV2010\svchost.exe



c:\Documents and Settings\All Users\Desktop\AV2010.lnk

c:\Documents and Settings\All Users\Start Menu\Programs\AV2010

c:\Documents and Settings\All Users\Start Menu\Programs\AV2010\AV2010.lnk

c:\Documents and Settings\All Users\Start Menu\Programs\AV2010\Uninstall.lnk

Associated Antivirus 2010 Windows Registry Information:









HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{FC8A493F-D236-4653-9A03-2BF4FD94F643}




HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run “Windows Gamma Display”

Remember Linux does not get Viruses.

How to add a Joomla module position to the header of a Artisteer 2 template

I have just recently purchased Artisteer 2 for designing Joomla templates and so far I have been very impressed. However, one shortcoming I have found is that Artisteer does not allow for a Joomla module position in the header of the template.  I think this will eventually become a standard functionality in the product, but in the meantime I have found a fairly simple workaround that involves editing a few of the template files.
Let’s say for example that we have the following design for a template in Artisteer and want to add a Joomla module position as indicated in red:

I have just recently purchased Artisteer 2 for designing Joomla templates and so far I have been very impressed. However, one shortcoming I have found is that Artisteer does not allow for a Joomla module position in the header of the template.  I think this will eventually become a standard functionality in the product, but in the meantime I have found a fairly simple workaround that involves editing a few of the template files.

Let’s say for example that we have the following design for a template in Artisteer and want to add a Joomla module position as indicated in red:

Artisteer Template

Artisteer template

This can be done through the following steps:

  1. Export template from Artisteer
  2. Add module position to template details XML file
  3. Add “div” and module position to the main template file
  4. Add “div” positioning and formatting to CSS definition
  5. Zip template folder and contents
  6. Install template in Joomla
  7. Select new module position for the Joomla module that you want to put in the header


Step 1:

Export the Artisteer template for Joomla, selecting the option “Export as folder”.

Step 2:

Open the templateDetails.xml file in any text editor. Add the line


beneath the other position definitions

Step 3:

Open the file index.php in any text editor. Add the line

<div><jdoc:include type=”modules”  name=”header” style=”artstyle” artstyle=”art-block” /></div>

directly under the line

<div class=”art-Header”>

Note: Choose the module class suffix that you want to be the default for this module position and enter it as the value for “artstyle”. In this example I chose to have it default to the art-block style.

Step 4:

Open the file /css/template.css in any text editor.  Add the following block of text to the document:

/* begin custom header content */
margin: 0 auto;
position: absolute;
top: 20px;  /* enter the number of pixels down from the top of the header to position the upper left corner of your module area */

left: 425px; /* enter the number of pixels in from the left of the header to position the upper left corner of your module area */

width: 400px; /* enter the width of your module area */

height: 180px; /* enter the height of your module area */


/* end custom header content */

Step 5:

Zip up template folder and all contents

Step 6:

Install template in Joomla

Step 7:

Change module position to “header” for your selected module

Here is the final result for my example:

Joomla module in header

I have just recently purchased Artisteer 2 for designing Joomla templates and so far I have been very impressed. However, one shortcoming I have found is that Artisteer does not allow for a Joomla module position in the header of the template.  I think this will eventually become a standard functionality in the product, but in the meantime I have found a fairly simple workaround that involves editing a few of the template files.Let’s say for example that we have the following design for a template in Artisteer and want to add a Joomla module position as indicated in red:

Things Ubuntu forgot

I have had to install Ubuntu on a couple of machines and every time I do, I find somethings that I forgot to install. Of course, Ubuntu doesn’t come with all the codecs you need or DVD playback so I have written a little script that installs everything I need.  I have found most of the info all over the web and just put it into one script that I run post install. The script installs all the codecs I use and a lot of the programs I like.
#ubuntu 9.10 add ons for playing anything

#add repos
sudo wget http://dl.dropbox.com/u/1402212/karmic.sources.list –output-document=/etc/apt/sources.list.d/full.list

#add keys
sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 2EBC26B60C5A2783 0DA7581859566E92 D739676F7613768D 43BB102C405A15CB 6AF0E1940624A220 2ED6BB6042C24D89 632D16BB0C713DA6 A6DCF7707EBC211F F9A2F76A9D1A0061 5A9BF3BB4E5E17B5 A040830F7FAC5991 FA3A1271 7FB8BEE0A1F196A8 0CC1223EE2314809 7889D725DA6DEEAA 28A8205077558DD0 2D79F61BE8D31A30 6E871C4A881574DE 66D5C734F6EFB904 DCF9F87B6DFBCBAE 2A8E3034D018A4CE F0876AC9 978228591BD3A65C 6298AD34413576CB FC6D7D9D009ED615 4FEC45DD06899068 2A423FD95416E75D

#update system before new addiotns are made
sudo apt-get -y update && sudo apt-get -y upgrade

#Installing vlc and mplayer (plays almost everything):
sudo apt-get -y install vlc mplayer

#Common codec packs
sudo apt-get -y install non-free-codecs libxine1-ffmpeg gxine mencoder mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 ffmpeg libmp4v2-0 totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert mozilla-helix-player helix-player libmad0 libjpeg-progs libmpcdec3 libquicktime1 flac faac faad sox ffmpeg2theora libmpeg2-4 uudeview flac libmpeg3-1 mpeg3-utils mpegdemux liba52-dev

#Gstreammer 0.10
sudo apt-get -y install gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-gnonlin gstreamer0.10-pitfdll gstreamer0.10-sdl gstreamer0.10-plugins-bad-multiverse gstreamer0.10-schroedinger gstreamer0.10-plugins-ugly-multiverse totem-gstreamer

#More programs
sudo apt-get -y install gstreamer-dbus-media-service gstreamer-tools ubuntu-restricted-extras

#Enable dvd support
sudo aptitude -y install libdvdcss2 && sudo /usr/share/doc/libdvdread4/./install-css.sh

#dvd ripping and encoding
sudo apt-get -y install kino handbrake audacity

#compiz config
sudo apt-get -y install compizconfig-settings-manager

sudo apt-get -y install gsfonts gsfonts-x11 flashplugin-nonfree

Or you can download the script here PostInstallExtras.sh.
Another thing I like to do is make sure all my Ubuntu installations have the same packages from machine to machine.
First you need to generate a package list file on your current machine.
dpkg –get-selections > selections.txt
Then move that file to the target machine with a jump drive or ssh or ftp or what ever way you can. Then run these commands on the target machine.
dpkg –set-selections < selections.txt
apt-get update
apt-get upgrade
That is all you have to do and both machines have the exact same packages on them.
Fell free to modify theses scripts as you like. They are just here for you to use or modify.

Keep the Hard Drive Bugs Away With RAID

I recently had a hard drive crash and I lost some important files. So I decided to safeguard my backups a little better buy building a RAID (Redundant Array of Independent Disks). The basic idea behind RAID is to combine multiple small, inexpensive disk drives into an array which is more stable than independent disks. This array of drives will appear to the computer as a single logical storage unit or drive.

RAID: Hardware vs. Software

Hardware RAID is just like it sounds, it is a piece of hardware. It is usually faster than a software RAID but you need to have the piece of hardware. The RAID SATA controllers are really coming down in price but you still need to have the hardware.

Software RAID is controlled by the Kernel and it is little slower than the hardware RAID but if you are using it for backups it only has be be faster than the network connection. Plus it is Free!

I went with a software RAID. I had 3 300gig IDE hard drives so I installed them and then configured the RAID.

First you have to set the drives up to take the RAID.

Run fdisk to find all you drives, you don’t want to wipe out the wrong drive by accident.

sudo fdisk -l

In my case the drives were sdc sdd and sde.

sudo fdisk /dev/sde

You must set the tag to fd (Raid Auto-detect), if you need to know how to use fdisk let me know and I can post a short how-to. Repeat this for each drive.

After I change each drive I run partprobe, you probably don’t have to run that until you are done with all of them but I do it just to be sure.

sudo partprobe

Now that your drives are configured lets build the array. I opted for RAID 5. Run the following command to create the array. Be sure to change the drive letters for the ones you configured during the fdisk steps.

sudo mdadm -C /dev/md0 –chunk=64 – -level=5 –raid-devices=3 /dev/sd{c,d,e}1

Now format the array.

sudo mke2fs -j -b 4096 -E stride=16 /dev/md0

After the format is complete check to see if your array is up and running.

sudo mdadm –detail /dev/md0

Next we need to ad the array to the fstab so it comes up during boot.

sudo gedit /etc/fstab

Add in your drive by adding a line something like this (you fstab may be slightly different).

/dev/md0 /RaidArray ext2 defaults,errors=remount-ro 0 1

Remount the drives,

sudo mount -a

Then watch what you have done, the array should be building.

sudo watch cat /proc/mdstat

Now for extra credit, lets set up email notification. This way you can get an email id there is a failure or a drve goes to a degraded state.

sudo gedit /etc/mdadm/mdadm.conf

Add your email

MAILADDR yourname@hostname.com

Start the monitor

sudo mdadm – -monitor /dev/md0 &

There you go! It will be used like a regular drive from now on. If something goes wrong with one of your drives you will not loose all the data, and you should get a email of the failure.


Home Theater with the PS3

My new home setup consists of a Toshibia 1080p Monitor, Pioneer Surround Processor, a Sony PS3 for HD video playback, and Megatron my server which houses all of my movies. Connections are made with HDMI between the PS3 and the TV and optical to the surround. The sound is up to 7.1 surround and the video is full 1080p.

I just recently upgraded from the Xbox 360 to the PS3 (thanks to the best wife in the world) and the improvement was noticeable. The 360 only does 1080i on component video while the PS3 does full 1080p on HDMI. There seems to be a great sound improvement on the PS3 over the Xbox. The Xbox was having some issue with the larger HD video files, the processor didn’t seem to be able to keep up. The PS3 also does have a gigabit nic, this makes a huge difference when streaming HD video.

Now for the how to.

The hook up to for the PS3 to the TV was a simple HDMI. Then I ran optical to the Surround processor from the TV, this way I can switch the inputs via the TV remote. I hooked up the gigabit network line to the PS3 and I was set to watch a movie.

I had Megatron setup with uShare DLNA server to share my movies (see how to at my other post Media Sharing). The video share showed up on the PS3 right away and I was able to select a movie. The first on played fine, but the second caused and “Format not Supported” error message. As it turns out some of the movies I had on the server were not supported by the PS3. I needed to change the format, for that I used Handbrake.

Using Handbrake to re-encode my movies was easy. Just select the movie and for the setting use “Normal”. The only issue I really had was with sound. The PS3 seems to like the ACC (faac) codec. Once I had that figured out it was only a matter of waiting for the encode to finish.




Megatron is my computer and the home work horse. The machine started off as a rack mounted server, but it was to loud to run all day and night even if it was in the basement. Also it only had room for 3 drives… not enough. So I got a Extended ATX case for the monster motherboard and built it up.

The specs:

  • Dual 2.5 ghz Opteron 64bit
  • 8gig  Ram
  • 2 – 1000 nics one 100 nic
  • Nvidia 8400 video card dual monitor output
  • 6 USB2.o ports
  • 3 terabytes of Harddrive
  • 7.1 surround sound

The Software:

The Jobs:

  • Media streaming (Audio and Video)
  • Encoding
  • Network backups
  • Shared Drives
  • Torrent server
  • Internal webserver
  • Podcast downloading

Atari 2600 Games on the Blackjack

I am old school, I love the Atari 2600 games. I know that Stella is a good EMU for Linux, I was happy to find that they have a version for Windows Mobile.
Go to the Stella site and download the version for Windows Mobile. Then unzip it in your phone. and copy over your roms. If you don’t have any Atari 2600 games do a Bittorrent search and you will find some.

Then start the program and Enjoy.

Here is a little movie of my Blackjack.

Here is some more info on BlackJack II must have software.

BlackJack II must have software

I recently got myself a Samsung Blackjack II (AT&T). I love the phone, but noticed right away that it needed more. So I started finding all the software that worked well. I tested a lot of crappy programs, hope it saves you some time. I have a nice little list of software that makes this phone much nicer. Hope it helps.

  1. The Explorer that comes with Windows mobile 6 sucks. Get yourself the Skyfire Browser. the Skyfire browser is currently in Beta but seems to work great. With Skyfire you can watch any video (yes including http://www.youtube.com), listen to any music, socialize on any network and browse whatever you want. It is the best browser I have found for the moble platform. Get it at http://www.skyfire.com/.
  2. Get yourself a big micro SD card. 2 gig or better. 4 gig is a nice price point. The phone allows you to use it as a USB drive also.
  3. Get a the Divx player for the mobile platform. This allows you to play all those divx movies you have at home on your computer. I don’t even bother making the files smaller, thats why I said go with the bigger card. It is a free download http://www.divx.com/mobile/
  4. Dowload Google Maps, it might just keep you from getting lost.
  5. GPS, here is the fun part. Now AT&T would have you think that you can only use the GPS on the phone if you pay an extra $9.99 a month. Not true! Here is how you unlock your Samsung Blackjack II GPS.
  6. You also may want a better GPS app. Check out Noni GPS Plot.
Get Adobe Flash player