Move A Object by using arrow keys (java script)

Hi,


We can develop games by using java script, for I have done following code for move object by using arrow keys,  copy below code and save as html then  u can see result, enjoy it dudes :)

Draging in As 3.0

myobj.addEventListener(MouseEvent.MOUSE_DOWN,startdrag);
myobj.addEventListener(MouseEvent.MOUSE_UP,stopdrag);
var clickoffset:Point=null;
function startdrag(event:MouseEvent)
{
clickoffset=new Point(event.localX,event.localY);
}
function stopdrag(event:MouseEvent)
{
clickoffset=null;
}
stage.addEventListener(Event.ENTER_FRAME,drag);
function drag(event:Event)
{
if(clickoffset!=null)
{
myobj.x=mouseX-clickoffset.x;
myobj.y=mouseY-clickoffset.y;
}
}

External XML Loading

var xmlUrl:URLRequest=new URLRequest("myxml.xml");
var xmlob:URLLoader=new URLLoader(xmlUrl);
xmlob.addEventListener(ProgressEvent.PROGRESS,loadProgress);
xmlob.addEventListener(Event.COMPLETE, xmloaded);
function xmloaded(event:Event)
{
var dataxml=XML(event.target.data);
trace(dataxml.images[0]);
}
function loadProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
percentLoaded = Math.round(percentLoaded * 100);
trace("Loading: "+percentLoaded+"%");
}

Space ship game

Hi,

I have made a space ship game in flash.

enjoy it....., to play click here

Flash Car Game

Hi,

I have done a car game, enjoy it...!

to play this game clic here... cargame

Rectangle in Flash


We can create shapes in flash by using shape class. for example below code for crete rectangle this.createEmptyMovieClip("draw_mc",12); draw_mc.beginFill(0x000000); draw_mc.moveTo(10,100); draw_mc.lineTo(100,100); draw_mc.lineTo(100,200); draw_mc.lineTo(10,200); draw_mc.lineTo(10,100); draw_mc.endFill(); I hope you enjoy it..

contacts : swamy.webdesigner@gmail.com

Thanks,
K Swamy Vishnubhatla

Shared White Board


Shared White Board I have make a White board in flash with square, circle, pencil, text, line, eraser and colors.

Main Feature is : This is shared whiteboard, i.e, it can use by multiusers at a time, then one user drawn thing can see by others.

If u need it.. contact me to swamy.webdesigner@gmail.com.
Thanks, K Swamy Vishnubhatla.