31 May, 2011

Downloading online flash games and playing it offline in ubuntu 11.04

Flash games are always the right option whenever you feel bored and frustrated sitting infront of pc. Here is a cool trick for downloading all your favorite flash games from any websites that we play usually online. Along with this i am just including the installation of a flash player for playing the .swf files we are going to download ( a browser installed with flash plugin is always enough, though just use it... ).

Usually all the flash games are embedded in the html page so that the browser first caches and loads the application. So the trick to find out the correct url of the .swf file (of the game) varies from website to website.. Dont worry we will go through some eye popping tricks :P

Installing swf player in ubuntu
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Install swfdec-gnome package with your terminal as follows. U can use synaptic or Ubuntu software centre to install it.  


$ sudo apt-get install swfdec-gnome
 

#   Catching the fish           <------ geeky way
-----------------------------------


Now it is the time to find a cool flash game that you call 'addiction'. For the timesake i am taking the famous game called 'appleshooter'. You can find it on the officegamespot website. Wait till the browser loads the game. Now just take the source code of the page using View => Page Source from the browser (or hit Ctrl + U). In the source page find the pattern ".swf" (Hit Ctrl + F and type .swf).


If you find this pattern as a part of a url then that is the original location of the swf file which we see embedded in the html page. Then copy paste the url ending with .swf on a new tab on the browser to load that game alone. If you dont get a url, we need to use some kind of guess work to find it out.
 

Here i am pinning the screenshot of page source of the appleshooter game on officegamespot website. They dont uses direct url to the .swf file in the page source.



I guessed the url to the .swf file from the above picture from this field <a href="arrow_shooter_03.swf" .....> and tried replacing the tail part of the url,  


http://officegamespot.com/officegames/appleshooter.htm 
with  
http://officegamespot.com/officegames/arrow_shooter_03.swf 
Hi hi, that worked !!! the flash game alone loaded in the browser.

Now save the swf file to your machines hard disk for using it offline. For this just go File > Save Page As from the browser itself. So we have done it almost, whenever you want to play the game just go to that folder and open the file with swfdec flash player.




   

#   catching the fish          <-------- firefox guy 1
----------------------------------


Here is another trick to findout the url to the .swf file. After the browser loads the game completely, open a new browser tab and type about:cache?device=disk in the address bar and hit the enter key. Now Find the pattern .swf file in this page. Copy the url of the one that is the flash game among the urls matchin the search for .swf pattern. Open another tab and paste the url (to .swf file) to load the swf application alone in the browser. Use File > Save File As to save it to your hard disk. Later you can play the game by opening the downloaded swf file with swfdec player or with any web browsers...




#   catching the fish        
<------- firefox guy 2
----------------------------------

Another methode to get a copy of the .swf file of the flash game is to search on the browser cache for the file. You shold have to load the game on the browser to make this trick work. After loading the game completely in the firefox browser (no need to play till the last level to get the file completely !!), open a new tab and type about:cache in the address bar and hit the enter key. 




Copy paste the value of Cache Directory under Disk Cache Device to the terminal after typing nautilus.

$ nautilus /home/jo/.mozilla/firefox/tu9q54ls.default/Cache

Then the cache directory will open up. Just sort the items by Modificaton date and you can find the .swf file among the recent files. Copy it from the cache to some other directory, other wise the file will be lost when the browser tab is closed or loaded with some other pages. Now open it with the swfdec flash player to play it anytime like a standalone application..

   
#
  catching the fish   
<------- for the lazy guys
---------------------------------
If you are too lazy to spend time on above tricks, then there is an option... Use the google's search engine to find the swf file for you, so that you can just download and play it. Just type in the search box like this pattern without quotes 'appleshooter filetype:swf'.


Copy the direct url to the swf file from any of the search result. Load it in a new tab. Save it using the browser itself. You can also use a terminal command called wget to download the files.

$ cd your/games/directory
$ wget http://vc02.free.fr/media/kangg/kang.swf


Hope you got the game, now play it ...






and Hope you like the post !  Comment on !! share your ideas ....!!!

4 comments:

Online Games for Free on Saturday, August 13, 2011 said...

nice posting...

http://flashgames2011.blogspot.com/

treds on Monday, February 06, 2012 said...

wow the blog is really awesome and making the life must better and easy so thanks for sharing the blog and i really appreciate the blog because i used to play poker and having much fun with that and it will add up some extra.

Nhatbrian on Monday, June 11, 2012 said...

Thanks but can you try playing Grow Cannon offline: http://www.eyezmaze.com/eyezblog_en/blog/2011/01/grow_cannon.html
I can download but can play it offline (it is domain or site locked)!!!!(nhatbrian@yahoo.com)

Unknown on Thursday, October 11, 2012 said...

wow. the post is awesome. thanks for the help. was really fun trying it out.

Hangman Games Online

Post a Comment

speak out... itz your time !!!

 

Terminal Diary | techblog Copyright © 2009 Gadget Blog is Designed by jintu jacob Powered by Blogger