WHAT'S NEW?
Loading...

Aplikasi mewarnai untuk anak

Aplikasi mewarnai untuk anak
Aplikasi mewarnai untuk anak


https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Sb1DlQYYyNovd-wErG1g1HBzG64tObg3AJN3RnAM3MM0b2xKJNPd_kElZlRr6XiLxT9IbfrDzlBEnDiArBi57PMrEQqsORi8gWYQyh5PupHP0C5S8ZywbIBqnnaZOlgKvTPYM_wVFcz-/s320/Aplikasi+mewarnai+Ikan.jpg

Judul: Aplikasi mewarnai untuk anak
Format:.EXE,.SWF
Language: Bahasa Indonesia
Suport: Print Device

Cuplikan Script


stop();
import flash.ui.Mouse;
import com.PustakaFlash.display.Grid;
var idx= new Kotak ();
var idxolor= new coloring ();
var myColorTransform = new ColorTransform();
var tempColor;
var warna:Vector.<* >  = Vector.<* > (["FFFFFF","000000","00FF00","06600","FF0000","FF00FF","0000FF","00FFFF","FFFF00","FF6600","666666","990000","666600","CCFFFF","6666FF","999900","FFCCFF","CC00FF","33CCFF","663300"]);
var arr:Vector.<*>=Vector.<*>(Grid.createGrid(6,1,31,511,(idx.width),12,5,5,true));
var arrColor:Vector.<*>=Vector.<*>(Grid.createGrid(20,10,49.1,41.8,(idxolor.width),(idxolor.height),5,5,false));
var nama:Vector.<Object>=Vector.<Object>([]);
var i:int = 0;
Mouse.hide();
this.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);

function mouseMoveHandler(evt:MouseEvent):void
{
 kuas.x = evt.stageX;
 kuas.y = evt.stageY;
}
while (i < arr.length)
{

 idx= new Kotak ();
 addChild(idx);
 idx.x = arr[i].x;
 idx.y = 511;
 idx.gotoAndStop(i+1);
 idx.no = i;
 idx.name="mc"+i;
 
 
 idx.buttonMode = true;
 idx.addEventListener(MouseEvent.MOUSE_DOWN,isi);

 i++;
}
function isi(e:MouseEvent)
{
 
 for (var s:int = 0; s <arr.length; s++)
 {
  var hal:MovieClip =MovieClip(getChildByName("mc"+(s)));
  hal.bg.gotoAndStop(1)
 }
 e.currentTarget.bg.gotoAndStop(2)
 content.gmbar.gotoAndStop(e.currentTarget.no+1);
 content.g.gotoAndStop(e.currentTarget.no+1);
 trace(e.currentTarget.no);
 
}
content.gmbar.addEventListener(MouseEvent.MOUSE_DOWN,warnai);
function warnai(e:MouseEvent)
{
 for (var i:int = 0; i < content.gmbar.numChildren; i++)
 {
  if (content.gmbar.getChildAt(i).hitTestPoint(mouseX,mouseY,true))
  {
   
   content.gmbar.getChildAt(i).transform.colorTransform = myColorTransform;
  }
 }
}
var c:int = 0;
while (c < 20)
{
 idxolor= new coloring ();
 myColorTransform.color = "0x" + warna[c];
 idxolor.c.transform.colorTransform = myColorTransform;
 wdhcolor.addChild(idxolor);
 idxolor.x = arrColor[c].x;
 idxolor.y = arrColor[c].y;
 idxolor.id = c;
 idxolor.buttonMode = true;
 idxolor.addEventListener(MouseEvent.MOUSE_DOWN,warnanya);
 c++;
}
function warnanya(e:MouseEvent)
{
 trace(e.currentTarget.id);
 tempColor = e.currentTarget.id;
 myColorTransform.color = "0x" + warna[tempColor];
 kuas.mccolor.transform.colorTransform = myColorTransform;
 
}
print_btn.buttonMode = true;
print_btn.addEventListener(MouseEvent.CLICK,printContent);
rest.buttonMode = true;
rest.addEventListener(MouseEvent.CLICK,rest_btn);
function rest_btn(evt:MouseEvent)
{

 for (var i:int = 0; i < content.gmbar.numChildren; i++)
 {

  myColorTransform.color = "0xFFFFFF";
  content.gmbar.getChildAt(i).transform.colorTransform = myColorTransform;

 }
}
function printContent(evt:MouseEvent)
{
 var printJob:PrintJob = new PrintJob();

 if (printJob.start())
 {

  if (content.width > printJob.pageWidth)
  {
   content.width = printJob.pageWidth;
   content.scaleY = content.scaleX;
  }

  printJob.addPage(content);
  printJob.send();
 }
}
ex.addEventListener(MouseEvent.CLICK,kluar);
function kluar(e:MouseEvent):void
{
 fscommand("quit");

}
 setChildIndex(kuas,numChildren - 1);

3 comments: Leave Your Comments

  1. Silakan dipahami dan dimengerti :j

    ReplyDelete
  2. shared projectnya dong gan untuk dipelajari

    ReplyDelete
    Replies
    1. hmmm,.... wani piro :) saya ini freelansce mas=p* ,... ini adalah sample project ,... jika berminat dibuatkan mas bisa :call saya,.... terima telah berkunjung...

      Delete