Posts

J2ME,GameCanvas and Thread

Image
And here is the GameCanvas class package MyApp; import java.io.IOException; import javax.microedition.lcdui.*; import javax.microedition.lcdui.game.*; import java.lang.Runnable.*; public class MyGameCanvas extends GameCanvas implements Runnable { private boolean vRenderLoop; private int vXPos; private int vWidth; private int vHeight; MyGameCanvas() { super(true); System.out.println("Constructor called"); vXPos=0; vWidth=getWidth(); vHeight=getHeight(); vRenderLoop=false; } public void paint(Graphics g) { } public void start() { System.out.println("start invoked"); vRenderLoop=true; Thread t = new Thread(this); t.start(); } public void stop() { vRenderLoop=false; } public void render(Graphics g) { g.setColor(0xffffff); g.fillRect(0,0,vWidth,vHeight); vXPos++; g.setColor(0x000000); g.fillRect(vXPos, 50, 100,100); ...

J2ME Canvas with Threading

Image
What we shall do here is the following 1) Create a Midlet 2) Create a Canvas class which implements the threading 3) Load a PNG image 4) Render the image through the thread. Configuration. You would need to download the Netbean IDE. When I did this program the version I had was NetBean IDE 6.1. You can go to their website to download it. It would suite for other programming languages too, including the Set Top Box. The program. The Midlet: Just like an applet for the browser, the midlet is an application running in the mobile platform using J2ME. So to run an application on a mobile device you first need a Midlet class. This is the midlet class. package MyApp; import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class MyApp extends MIDlet { public void startApp() { MyGameCanvas myApp = new MyGameCanvas(); myApp.start(); Display.getDisplay(this).setCurrent(d); } } For better understanding I am keeping this class as sm...

Embedding Font in ActionScript 3.0

Image
Embedding fonts in Action Script 3.0 is fairly an easy job. The following is the steps you need to follow Goto the library of the Movie. Right click and click New Font. And enter the following information as shown in the image below. Now goto to the property panel and choose the newly created font. All fonts created and placed in the library will be post-fixed with a *. In our care here it is WProCap*. Now go to the property panel and click the embed font button. And do as shown in the image below. Click open and enjoy dynamic fonts in AS 3.0.

Configuring Flash in Eclipse using ASDT, MTASC and Flashout

Image
Software Needed: Eclipse MTASC ASDT Flashout Java JDK Installation: Make sure the latest version of the Java JDK installed in your machine. Preferably J2SE 5.0 or higher. Install the JDK preferably in c:\program files\Java http://java.sun.com/j2se/index.jsp Download the latest version of the Eclipse IDE and extract it to c:\program files\Eclipse or any other folder you want. Create a shortcut, right click, go to properties and enter the following argument to the Target Path C:\program files\Eclipse\eclipse.exe –clean Download MTASC (Motion Twin ActionScript Compiler) and extract it to c:\program files\MTASC or any other folder you prefer. Installing ASDT (Actionscript Development Tool) . Open eclipse, Help – Software updates - Add Site. Add the following url in the location text box. http://aseclipseplugin.sourceforge.net/updates and click ok. Check ASDT and click Finish. Download the latest version of Flashout and extract the content of the archive (excluding the Flashout.as file) ...

Configuring Flash in Eclipse using FDT

Image
Software Needed: Eclipse IDE Java JDK Flash FDT MTASC Flash Compiler Installation: Make sure the lastest version of the Java JDK installed in your machine. Preferably J2SE 5.0 or higher. Install the JDK preferably in c:\program files\Java http://java.sun.com/j2se/index.jsp Download the latest version of the Eclipse IDE and extract it to c:\program files\Eclipse or any other folder you want. Create a shortcut, right click, go to properties and enter the following argument to the Target Path To install FDT, open eclipse, Help – Software Updates – Add Site. Enter the url http://fdt.powerflasher.com/update/ and click finish. Compilation: Choose the Flash FDT Perspective. Go to Window – Open Perspective – Other and choose Flash FDT. Click Run – Run Configurations . Go down to FDT MTASC and double click it. Enter the name of the configuration. Select the project and the Main class file. As shown below. Click the MTASC tab and select t...

Error 1006 _ is not a function. Actionscript

This error happens due to a objects not having found a function with that name. The following could the reasons 1) Check that you dont have multiple files in different paths with the same name. One with the function and one without. 2) Check the linkage property in the library for the movieclip. Make sure it points to the correct package and class name. In my case, when I spent two hours trying to troubleshoot this F******** problem,I resolved it using method two. Flash by default creates a class for you if it cannot find the path and was breaking my head trying to figure out what is going on.

Grand Theft Auto IV

Having sold 16 million copies and grossed about 165 million pounds in the first 24 hours of release, Grand Theft Auto has definitely created a world record. The publisher and the developer of the game is Rock star Games. Check out the original website here. The first two versions of the game had a top view perspective. The third version brought in the 3d perspective making it more famous and in blend to the technologies. The WikiPedia shall help you explore more on the various stages of the game development. Grand Theft Auto IV has support for online multi-players with some new features too.

EA Sport - Skate Game

Call of Duty and Medal of Honour from EA Games

WCAG Compliance

The "Web Content Accessibility Guidelines 1.0" are a W3C specification providing guidance on accessibility of Web sites for people with disabilities. They have been developed by the W3C's Web Accessibility Initiative. The specification contains fourteen guidelines which are general principles of accessible design. Each guideline is associated with one or more checkpoints describing how to apply that guideline to particular features of Web pages. An appendix to the guidelines, "List of Checkpoints for the Web Content Accessibility Guidelines 1.0" presents the checkpoints sorted by priority for easy reference. These guidelines not only make pages more accessible to people with disabilities, but also have the side benefit of making pages more accessible to all users, or to users using different browsers or one of the emerging handheld or voice-based computers. Taken from Fact Sheet for "Web Content Accessibility Guidelines 1.0 Excerpt from http://www.thepollen...

Flash Banner - ActionScript & Javascript

Image
Ok! Now we need to create a flash banner but hell o! we have loads of methods to achieve it. Flash brought in the ExternalInterface for easy communication between Actionscript and Javascript. I am not going to explore this here. However what I am going to explain now is the old method of creating a banner compatible in most browsers and yet is very simple. A method invented way back in 2000 and is still going on..... The requirements are... 1) The banner should support image and swf played at regular intervals 2) The banner should be compatible in most browsers 3) The banner should be able to communicate with Javascript and vice versa How do we achieve this? 1) Create a banner.swf file. This swf will be embedded in the browser and will now form the container for loading any image or swf into it dynamically. 2) Use javascript + Actionscript to communicate to and from the banner and voila! there it the trick. Process: Create something as seen above with the following actionscript within...

Pro Evolution Soccer - 2008 - Nintendo Wii

Image
The world’s most popular soccer game is back under a new name, Pro Evolution Soccer 2008. Formerly "Winning Eleven," PES 2008 builds upon the competitive spirit embodied by its predecessor with some major improvements. PES gamers will discover a more immersive, vivid soccer experience than they’ve ever played! Read more

ESRB - Entertainment Sfotware Rating Board

Image
ESRB - Entertainment Software Rating Board is a non-profit self regulatory body that independently assigns ratings, enforces advertisement guidelines, and helps ensure responsible online privacy practices for the interactive entertainment software industry. If you ever wanted to know who was responsible for such certifications of any game in the industry have a look at this link. http://www.esrb.org/index-js.jsp

Actionscript 3.0 - Sounds

Okie! Handling sounds in AS 3.0 is so much of a bottleneck. Well its not a matter of something wrong with Adobe or the scripting language itself. But personally I just want to avoid so much trouble of declaring variables up and down just to MUTE the sounds. If only there was a simple way to do this. So here it is. To handle sounds this is what you do. I shall give an example for you to easily understand it instead. var vRequest:URLRequest=new URLRequest("sounds\monica_yells.mp3"); var vSound:Sound=new Sound(lRequest); var vChannel:SoundChannel; public function playMonica() { vChannel = vSound.play(); } public function stopSound() { vChannel.stop(); } public function muteSound() { var lTransform:SoundTransform=new SoundTransform(); lTransform.volume=1; vChannel.soundTransform=lTransform; }

Actionscript 3.0 - paremeter loading

In Actioscript 2.0 it was relatively easy to read the parameters passed from the URL since there variables could be added to the global stage and in flash we could access it using a simple code like _root.audio_URL or something similar. However this is quiet different now in AS 3.0. The same can be done using the loaderInfo. Something like loaderInfo.parameters Go to this link and you shall get a good explanation on this. http://theolagendijk.wordpress.com/2007/07/06/parameters-for-a-flash-9-actionscript-3-swf/