Saturday, November 29, 2014

Create simple game on adobe flash / macromedia flash

This is the oldest article when i am in vocational high school for the multimedia lesson homework. Let's start. This tutorial is very simple, first open the Macromedia Flash program first such program usually no wide - range version as I use Macromedia Flash 8 Professional. We make it with a standard scale mamakai dokumentnya flash is 550 x 400 pixels and wearing colored background White . Then we make pictures of birds (for the target shooting). Click on the image and select Modify > Convert to Symbol or press F8 , then turn up the box insert name symbol "bird" and select the type of movie clip .


Then click
the bird image and open the properties box. Select "movie clip" and underneath there is "instance name" and enter the name for example: "bird". After that click on the image of the bird and actions open the box and enter this code:

onClipEvent(load)
{
   function reset()
   {
  if(this._name=="face")
  {
  this._visible=false;
  }
  else
  {
  this._visible=true;
  }
  this.dead=0;
  this.speed=random(4)+3;
  this._x=600;
  this._y=random(400);
   }
   this.reset();
}
onClipEvent(enterFrame)
{
this._x-=this.speed;
if(this._x<-40)
{
this.reset();
}


Enter the code below in the layer 1 frame 1 in the action box:

for(i=1;i<=5;i++)
{
_root["burung"].duplicateMovieClip("burung"+i,i+1000,burung);
}


The next stage we make animated die for bird bird clip by clicking and right click select "edit" (a place to create animations) as the following example:


Then we click on the main frame and input the code below:

stop();

Now create a second frame by right clicking on the main frame and select insert frames and the image of what you want to make here. And enter the code below in the frame to 2:

this.dead=1;

Example :



Then click on the last frame and enter the code below:

this.reset();

Then we create a drawing tool Using a cursor image. Selection of the cursor image and convert into a movie clip symbol. Click the cursor, open the action panel and type the following action:

onClipEvent (load)
{
 startDrag(this, true);
 Mouse.hide();
 this.swapDepths(9999);
}
onClipEvent(mouseDown)
{
    playsounds = new Sound(this);
    playsounds.attachSound("shot");
    playsounds.start(0, 1);
for(i=1;i<=5;i++)
{
if(this.hitTest(_root["face"+i])&&_root["face"+i].dead==0)
{
_root["face"+i].gotoAndPlay(2);
}
}
}


The last stage try and run the movie, and then move the mouse. Done, good luck

1 comment:

  1. We make it with a standard scale mamakai dokumentnya flash is 550 x 400 pixels and wearing colored background White . Then we make pictures of birds (for the target shooting). juegos friv gratis

    ReplyDelete