Sunday, 21 September 2014

DUDE ANIMATION

Flash College


------------------------------------------------------------------------------------------------------
1- OPEN ACTION SCRIPT 3
2- CRATE FOLDER DUDE ON DESKTOP AND CRATE CLASS FILES
AND SET NAME  Dude.as , SimpleAStar.as , SimpleCell.as , SimpleGrid.as 
3- CRATE ACTION LAYER AND  PASTE BELOW ACTION SCRIPT
--------------------------------------------------------------------------------------------------
var array:Array = [ 1,1,1,1,1,1,1,1,1,1,1,
  1,0,1,0,0,0,0,0,0,0,1,
1,0,1,0,1,0,0,0,0,1,1,
1,0,1,0,1,0,1,1,0,0,1,
1,0,0,0,1,0,1,0,0,0,1,
1,1,1,1,1,0,1,0,0,0,1,
1,0,0,0,0,0,1,0,0,0,1,
1,1,1,1,1,1,1,1,1,1,1 ];
var grid:SimpleGrid = new SimpleGrid(11,8,50,array);
grid.draw(this);
var aStar:SimpleAStar = new SimpleAStar(grid);
var dude = new Dude(grid, aStar,75,75,2);
addChild(dude);
--------------------------------------------------------------------------------------------

4-IMPORT SPRITE ON STAGE AND CHANGE INTO MOVE CLIP
 AND  SET CLASS NAME  
-------------------------------------------------------------------------------------------------






------------------------------------------------------------------------------------------------------
Dude.as
-------------------------------------------------------------------------------------------------------




------------------------------------------------------------------------------------------------------
SimpleAStar.as
-------------------------------------------------------------------------------------------------------




------------------------------------------------------------------------------------------------------
SimpleCell.as
-------------------------------------------------------------------------------------------------------



------------------------------------------------------------------------------------------------------
SimpleGrid.as
-------------------------------------------------------------------------------------------------------







EmoticonEmoticon