HJSplit – for joining and splitting .001 files

25 10 2009

I often use my blog as my personal diary to remember something, and if it comes to help for somebody else as well.

Today downloaded a file which was split with 001 extension. So was googling and found that CNet Download has a free software “001 File Joiner and Splitter”. But after installing I found it’s too bad, its a trial version and that also – buggy. The second was HJSplit and then I remembered this is the one I used first time and was good. So that I don’t forget again, I thought writing it down :P





Flash dynamic text with reflection and transparency

22 10 2009

At BrainStation-23, we were making an animation which will be auto generated by XML provided images and texts. There we needed a beautiful black background white text with reflection on the floor, from white to transparent. I was watching Iffat dewelling with it and Hasib was helping. I was in the mood and jumped in. It has been a long time since I last coded in Flash. After doing some tricks it was working and I found – though things came back, it was a tricky thing to do and I have almost forgot it. So, I thought I should write it down.

Step 1: Make a dynamic text layer. It will be the mask. Make it a movie clip. Remember to embed font in the dynamic text, otherwise it won’t work.

Step 2: Make a transparent blending layer, whatever sort you want. Make it another movie clip.

Step 3: In the action, write, blendingMovie.setMask(textMovie);

Step 4: That’s all basically. Now you can set text of the text movie.

The things that I forgot was, 1. Embed fonts, you must embed font to make the dynamic text work with mask. 2. Dynamic mask. If I just make the text layer a mask layer and blending layer the child, it won’t work. It has to be done by actionscript. Hasib reminded me them. We are so happy to have him as our Actionscripter.





404 Error page designs

22 10 2009

Template monster gave some beautiful free 404 Error pages, checkout http://blog.templatemonster.com/2009/10/22/404-error-page-dont-get-the-page-itself-to-be-even-a-bigger-error/#404freebies





Cronjobs in new cpanel

27 04 2009

The new cpanel has made cronjobs very easy … you can pick time when the job will run, all you have to do is write the command to do the job. Now, that is little confusing, and when you search the web you are going to find a lot of things, more confusing. So, here I’m writing the most simple one

wget http://www.example.com/mailstock.php

It will just execute the php file and mail you the output of that php file.

I love sitepoint.com for their so clear articles, checkout for details about this in their article http://www.sitepoint.com/article/introducing-cron/





Single Site Browser – SSB

3 03 2009

In our company we use a time log application which is intranet based. I wanted to have it in system tray so that it’s very accessible and easy to use. I thought of making a simple application which will load only a page with simple functionality, just work update sort.

Then from sitepoint I came to know that many other people need same thing and so it has been already developed :D One is Prism – Mozilla Firefox based, one is Bubbles – Internet Application based and obviously AIR. However, Prism doesn’t support minimizing system tray while bubbles is basically system tray based. Also very light weight and very easy to use. So, I have been using that.

But, if you want to provide some sort of exe file as installer for desktop functionality then it seems AIR is the best way. Today I found some interesting links about AIR – 6 Apps in AIR. The best application I liked is Agile Agenda. And for desktop system tray I found this tutorial I was looking for.





P1i restart problem

3 03 2009

Recently I was having restart problem in my sony ericsson p1i mobile. Automatically after some time it restarts. Or, sometimes even while talking. I googled about it but didn’t find a solution. But, found somebody asking to reset … well, I know how to reset a mobile, master reset and other battery reset. But, a link said another reset, resetting keeping the battery away for 10 mins. I gave it a try and found it’s working, no more restart automatically!! It’s amazing!! I thought somebody might be facing same problem so shared through my blog.





XPath example

23 04 2008

I have used XPath before, recently when I needed I forgot the syntax, so thought of keep it written here. It may come helpful for some others as well

import mx.xpath.XPathAPI;

var xml:XML = new XML();
xml.ignoreWhite = true;
xml.load(“http://api.flickr.com/services/feeds/photos_public.gne?id=67845814@N00&lang=en-us&format=rss_200″);

xml.onLoad = function()
{
    var thumbs:Array = XPathAPI.selectNodeList(this.firstChild, “/rss/channel/item/media:thumbnail”);
    for(var i in thumbs)
    {
        trace(thumbs[i].attributes.url);
    }
}

This tutorial was a great help.

http://tutorials.lastashero.com/2005/10/using_the_xpath_api_in_flash.html





Smoothing image loaded in Flash

11 03 2008

In our company we have been working on t-shirt customization tool for long time. Here people can upload their own picture and it is placed on t-shirt. They can rotate, resize, move and many other features. Infact all features t-shirt tools now-a-days offer.

Normally the image gets pixelated like normal html. So, whether the image is bigger or smaller always it’s little crippled. One of our client asked to make it smoother. Then I found Flash supports bitmap smoothing. After working on the code, I have made a small code snippet which will make any movieclip loading smooth image.

Just paste in the movieclip actionscript

onClipEvent(load)
{
        if(this.getBytesLoaded()>100)
        {
            import flash.display.*;
            var bitmap:BitmapData = new BitmapData(_width,_height);
            bitmap.draw(this);
            this._quality = “BEST”;
            this.attachBitmap(bitmap,1,”auto”,true);
        }
}

Interesting, huh?





Key.isDown unavailable in AS3

26 02 2008

Unlike AS2 developers can’t use Key.isDown in AS3. But, while you are making a game like racing or people moving you must work with two/three key press which can’t be achieved without Key.isDown.

I was facing the same problem when one of my dev Zeeshan was working with car racing game. So, went for some Googling and found this http://www.kirupa.com/forum/showthread.php?p=2098269 Thanks Guru for the beautiful class.





WAMP time zone problem

26 02 2008

WAMP doesn’t configure time zone as Apache default installation will do. So, by default it takes GMT 0. If the server is located somewhere else make sure to set the time zone. The list of time zones available here

http://www.php.net/manual/en/timezones.php

This caused me quite pain for 2 hrs today and searching with WAMP time zone problem I didn’t find anything so thought people may need :-)