"Laugh, and the world laughs with you; weep, and you weep alone."
2008-06-24
The site may look a bit iffy for the next day or two as I upgrade the blog system. I have to rewrite the skin from scratch so I'm taking this opportunity to add a few tweaks that I've wanted for a while now. Stay tuned.
2008-06-17
Quick note on how to get FlashDevelop to provide auto-completion and the other tweaks for the Flash CS3 fl classes including the Tween class. Inside FlashDevelop tap into the menu:
Tools->Global Classpaths (CTRL-F9)
Pick AS3 from the dropdown box and then choose Add Classpath. Navigate to:
C:\Program Files (x86)\Adobe\Adobe Flash CS3\en\Configuration\ActionScript 3.0\Classes
Then repeat for the Air classes here:
C:\Program Files (x86)\Adobe\Adobe Flash CS3\en\Configuration\ActionScript 3.0 AIR 1.0\Classes
Those are my Vista 64 paths, you probably have to change them to start with C:\Program Files\Adobe\ under 32bit Vista or XP. Once those two paths show up in the box you can click OK. You should now have instant access to the code-completion system with these classes.
2008-06-15
Last Christmas dad bought a pair of 3 Skypephones. The one he gave to me was a total dissapointment since we had misunderstood the "Free Skype" part of the deal. What it means is that you get 30 days of free Skype usage after you topup your normal phone credit. I usually use my landline for phonecalls which meant that to get 30 days of free Skype usage I would have to keep paying for it since I wouldn't actually make any mobile calls. After the second time I paid to play i decided it was useless for myself. Dad on the otherhand has used his almost everyday since then. A few weeks ago he had to replace his phone for a new one. "Replace" in this case meant he went and bought another one after realising that the phones were quite flakey and that the customer services people were clueless. At this point he started looking for an alternative.
2008-06-12
I've been using Crimson Editor for a few years now to code the numerous languages/scripts I frequent; mostly AS, PHP, C#, HTML, CSS and XML. Recently it's been letting me down with the newer versions of these languages since it sort of become abandonware in 2004 with the sole author dropping off the planet. It's successor Emerald Editor seemed far from complete with the last alpha release being in 2007. Today I decided enough was enough, it's time to switch. Finding an all in one editor took me ages last time so I expected the same this time around. Luckily I ended up with around 10 apps in my list within an hour or two of looking. After narrowing the list down I was left with SEPY, FlashDevelop and Eclipse with either the Aptana or AXDT plugins.
SEPY went off the list after I read a few reviews about how it lacked AS3 support. Since I'm now developing all future projects with ActionScript 3 then that meant it was a bust. I did decide that if the others all failed me I would check it out myself incase the reviewers were idiots ![]()
Eclipse made me a bit apprehensive. I remember using it a few years ago when I worked with Java at a company in town. The main problem I had with it then was the interface kept glitching out on me and not refreshing. You'd end up with code segments looking scattered across the screen. It also seemed slow to load and would randomly start doing things in the background, no idea what but progress bars would start ticking by in the status panel and I'd get the impression I should wait for them to finish! I figured after all this time they would of sorted it out. Nope. I properly lol when I saw my code go scattered in the first 2 minutes of usage. On top of that I couldn't get code highlighting to work with the Aptana or AXDT plugins. It was a pity because I did have minor hopes that Eclipse could be my all in one editor since people always go on about it when I'm reading articles for the various languages I like.
FlashDevelop, what a surprise this was. Hella-Awesome-o. Straight away syntax highlighting was there. It has full code completion, support for JavaDocs and a proper wicked cool feature that lets you tap F6 to run a preview in the Flash IDE. That's something I've wanted Crimson to do for ages. It has a built in syntax checker as well. There's loads of cool features I have still to explore. So isn't this just for ActionScript? Nope, it has built in suppport for HTML, CSS and XML. I dropped a PHP file in there to see what would happen and it auto picked the HTML highlighter. Surprisingly enough that actually looked fine. For now I'm quite happy with FlashDevelop. I'll start using it tomorrow in some proper projects and see how it fairs, so far though it looks very promising and I am a very happy chappy. ![]()
2008-06-10
I've been using the following method of instantiating classes for a few years now. It's never proven a problem until recently. I'll start off by detailing the circumstances that lead to me using this setup. I write about 95% of my code in external .as files. I store all of these in a directory called Source within each projects main directory. Inside Source I'll create sub directories which lets me package the various classes. For the classes that require actual drawing on Stage I create an empty MovieClip in the library and give it an instance name of classClip. Each time I want to instantiate one of my MovieClip based classes I associate that clip with the class and then create an instance of it on Stage.
2008-04-30
I'm really having a love hate relationship with Joomla. The latest bump in the road came when I tried to change a Global Config setting. It told me:
JFTP::store: Bad response Warning! - Failed to move file
There were loads of other errors depending on what I did but they all started out with various JFTP messages. The outcome was that I could not change the config file with the admin interface and I could not upload any files at all via the Media Manager or the JCE Image Uploader. After getting very angry I finally worked it out. In the config file are three paths:
var $log_path = '/home/user_name/public_html/logs';
var $tmp_path = '/home/user_name/public_html/tmp';
var $ftp_root = '/home/user_name/public_html';
The first thing was that my server host had not created a temp directory for me. I uploaded a file with phpinfo in it and saw that I they'd set it to be /home/user_name/wwwtmp but they hadn't actually created that directory or set permissions for it (since it didn't exist). I did both of those myself. The next step was to set the right permissions on the /home/user_name/public_html/tmp directory. The final task was to work out that the joomla FTP system is odd! To make it work I had to change the paths above to:
var $log_path = '/home/user_name/public_html/logs';
var $tmp_path = '/home/user_name/public_html/tmp';
var $ftp_root = '/public_html';
Basically the rest of the system uses the full path while the ftp_root variable has to be a partial path. Joomla, I love you but if you were a person I would of broke your nose by now 
2008-04-30
I've been putting the finishing touches on a new Joomla 1.5 install. I decided to switch from the default TinyMCE text editor and start using the JCE one instead. After customising the menu I reached my final task; removing most of the options in the Format drop down box. That drop down lets you pick Paragraph, Heading 1, Heading 2 and so on. After reading all the docs, scouring both the JCE and TinyMCE forums, rooting through the MySQL database, general searching and then performing the usual techy head2desk incantations I couldn't find the answer. In my searches I found alot of other people asking the same question but with no answer. Turns out it's easy.
Open up /plugins/editors/jce.php and find this line (#86 for me):
$param['theme_advanced_blockformats'] = "p,div,h1,h2,h3,h4,h5,h6,blockquote,dt,dd,code,samp";
Just remove the ones you don't want and save the file. Here's my pruned version:
$param['theme_advanced_blockformats'] = "p,h1,h2,h3,h4";
Adding extra ones is another matter which luckily I don't have to worry about ![]()
2008-04-23
A while ago I decided to have a blast from the past and watch the entire Thundercats saga. I watched it when it first rolled out on TV when I was a wee kiddy and remembered it being the greatest show ever. I thought it would be interesting to watch it now and see if it still held that title. You probably shouldn't read the rest of this if you don't want the show spoiled.
2008-03-26
I got the Blade Runner Final Cut Tin for Christmas which got me thinking about the game I played a few years ago. I remembered finding out that I wasn't a replicant shortly before driving off with the girl. One thing that always bugged me was that after I uninstalled it and deleted my save games I found out that the game has multiple endings. I decided now was the time to dust it off and have another go.
Turns out that the game uses a 16bit installer which no longer works with Vista 64. I did a bit of digging and found a script by Steve Simenic to create a shiney new installer for the game using the Nullsoft Scriptable Install System. I've been using this system for a few months now so it was good timing to find this. I made a couple of small changes to the script; the first is to remove a dependance on the user to have a D: drive to install the game to, the second change was simply to add an icon to the installer.
2008-02-28
I purchased a Belkin USB Bluetooth adapter (Model F8T013uk) a few days ago from Amazon. As expected it came with a driver CD stating version 6.0.1.5400. A few reviews mentioned it worked on Vista but none mentioned 64 bit. I tried using the installer from the CD via the Autorun menu and it failed to install. I then explored the CD and found an x64 directory. I installed from there via the setupx.exe file and thought all had gone well. The driver itself installed which I could tell because Device Manager now showed a Belkin USB Bluetooth adapter. The installer said it had to reboot to complete the installation. After a restart nothing happened. There was no desktop or startmenu icons so I manually navigated to the installation directory and tried running the tray icon tool. Nada. It showed up under Task Manager but refused to actually appear in the tray.
Alot of sites link to a dev-hacks article which details how to modify the drivers to work, I didn't want to do this as drivers have to be signed to work properly in Vista 64 and even though you can disable driver signing via the boot-up F8 menu I simply couldn't be bothered doing that each time I wanted to use a Bluetooth device. So began the adventure of getting my Sony Ericsson W850i mobile phone to talk to my PC via Bluetooth without hacked drivers.
2008-02-28
I use a VPN connection to access a remote network. I noticed that whilst connected the speed of browsing sites became incredibly slow. A quick tracert shows that all my network traffic is routed through the VPN connection. The reason for this is that as default new VPN connections in Vista are set to use the gateway on the VPN if it's connected. This is really easy to change:
The connection should now use your normal gateway for all net based activity. A quick tracert will tell you for sure:
tracert news.bbc.co.uk
2008-02-05
I've been using a Wacom Volito 2 for about a year now and have loved it. It worked great on XP and just as well on Vista 64 although potentially it could be much better thanks to all the new tablet functionality built into the OS. One thing that has been missing over the past few years of using pen tablets has been the scroll wheel that is now a standard feature on mice and trackballs. The new Wacom Bamboo range caught my eye as they sport a scroll wheel at the top of the pad along with four big customisable buttons. There are 3 Bamboo models; the "Bamboo", the "Bamboo Fun" and the "Bamboo One". Mine just arrived today so I'll give you low down on how it handles.
2008-01-31
Over the years I've had numerous clients who have wanted Flash solutions that adjust their layout based on the current browser dimensions. This can take many forms such as resizing a background image proportionally through to re-configuring a menus structure. This quick tutorial will show you how to use Flashes onResize event to control the positioning of your components as the screen is resized whilst at the same time showing you how to handle this on the HTML/CSS side of things with a forced minimum width and height.
2008-01-19
If you read my last posting you'd see that I recently overhauled my machine. The motherboard I chose was an Abit IN9 32X-MAX Wi-Fi which was my first Nforce board and as it turns out; will probably be my last. I've had an endless stream of issues since it was installed, the majority of them to do with it having a highly flakey bios and the rest being how picky it is with regards to memory. The latest incident saw the bios getting totaly corrupted which resulted in a 6+ hour mission to repair it afterwhich I discovered that the 3rd and 4th memory slots had been killed. The system refused to boot with any memory in them. Having reached the end of my rope I decided to return the board and try something else. The rest of this post will show you how I transferred my current Vista 64 install to the new motherboard without having to fresh install as well as explain how I decided on my new board which was far from an easy feat.
2008-01-06
With some time off over the Christmas period I decided it would be a good opportunity to upgrade my local PC and server. The plan was to buy all new hardware to form my new machine and then make a hybrid from the last server and my old machine. As you'd expect with brand spankin new hardware and software there were various hiccups along the way, I thought it would be handy for others following in my footsteps if I chronicled what I did to fix these issues and get things back up to 100%.
2007-10-20
Sometimes when using the autoSize and wordWrap properties with a dynamic TextField there is a tiny delay in it resizing and wrapping everything. It's so fast that you won't see it happen. Now if you have some other items immediately following the resize they will not be able to read the updated height correctly. I had this problem tonight with a dynamic vertical menu I'm putting together. The menu has a fixed width and I have to assume that some menu items will be too long to fit that so I need to wrap the text.
2007-10-13
Today I got permanantly kicked out of both my Karate and Kickboxing classes. On Sunday we were sparring in the boxing ring and I ducked under Gareths right punch and came back with a right hook to the body. I think the fact that he was punching down towards my head and I was punching up towards his body meant the punch got more juice than it was supposed to. The end result is that I broke a few of his ribs. To make matters worse his son was ringside urging his dad on so I think that deflated the sons opinion of his dad somewhat considering he's about a foot and a half taller than lil' ol me ![]()
Tonight I got called up by our teacher who said that Gareth had called a few of the others at the class and that they decided to boycot the class if I was there i.e. if I go then they won't. I think that was rather shit of them since we had a good half a lesson after sparring and everyone seemed fine. I'm ticked that they couldn't say it to my face either then or this Sunday. I don't really see how doing a backstab vote like that can help restore his manliness in his sons eyes.
The thing that takes the piss is that in my first fight of the morning I said I only wanted to do body shots with my first opponent since I didn't want to hurt him due to his new braces. I was told that we're there to fight and that if I didn't want to do it properly then I should get out of the ring. Surely if I was such a menace I would of just gone straight in and pummeled his face with no reservations.
"You've outgrown the class" is what I was told in the end which I think is true. I have decent morals and always prefer to do things face to face and in the open. Cowards have backroom votes that give the defendant no chance to defend themselves. It's clear I've surpassed them in fighting as well as in moral standing. I hope they have fun in their keep fit class.
-Sayounara Tora Te Karate
2007-09-17
Link: http://www.facebook.com/profile.php?id=747979831
Facebook, you either love it or you hate it, or you're computer illiterate and have no idea what it is in which case how are you reading this post? ![]()
2007-09-17
Recently I sent over a few Flash 8 source files to a friend at his company. There was one main Flash .fla file and a few external classes stored in seperate .as files. When they tried to publish them on their Mac they received a series of errors like this:
**Error** GoodbyeWorld: Line 5: The name of this class, 'GoodbyeWorld', conflicts with the name of another class that was loaded, 'GoodbyeWorld'
They had one for each of the classes, obviously substituting "GoodbyeWorld" above with each classes name. I was using Flash 8 on a Windows XP system, he was using Flash CS3 on Mac OSX, I could publish it just fine as could the other Windows XP systems in his company. My first assumption was that it was the PC/Mac barrier. If you thought the same then you'd be wrong as well ![]()
The next day I was down in the office anyhow so I had a bit of an experimentation with the systems. Blam! Got the same error on one of the Windows systems within a few minutes of testing. For an unrelated reason I had the directory view set to "Details" so I had the modified time/date right there in my view. I noticed it said 11:34 whilst my local clock was showing 11:29. It turns out that everyone there works on a shared network drive. When files are saved on that disk they have their "modified" attribute set by the system that the drive resides on. Turns out that the clock on that system was slightly ahead by a few minutes. I simply set my local clock to be a few minutes ahead of the file server and the error stopped occuring. As soon as his Mac updated its time the next day using an NTP server the problem went away there as well. This error happened on both Flash 8 and Flash CS3 on both Windows XP and Mac OSX. All are updated with the latest patches. So as the title says; Flash hates the future ![]()
2007-09-16
I'm working on a custom skin for the FLVPlayback component. The design requires a play button with a pause button next to it at all times. All the provided skins use the dual PlayPauseButton system. That's where you have a play button and no pause button. When you press play it switches to become the pause button. Then when you pause it returns to being the play button. The Adobe LiveDocs say:
If you want to have separate Play and Pause buttons, rather than a combined Play-Pause button, simply place the play_mc and pause_mc clips on the Stage without wrapping them with a playpause_mc clip.
The actual process is this: