flash ÈÝÆ÷¹ö¶¯Ð§¹û
import flash.display.MovieClip;
import flash.geom.Rectangle;
import fl.controls.UIScrollBar;
import fl.controls.ScrollBarDirection;
import fl.events.ScrollEvent;
var container:MovieClip=new MovieClip();
//container.addChild(create_mc());
//container.addChild(create_mc());
addChild(container);
var p_x:uint=0;
var p_y:uint=0;
var rect:Rectangle=new Rectangle(0,0,60,60);
container.scrollRect=rect;
for(var i:uint=0;i<36;i++){
if(i%3==0){
p_x=0;
if(i!=0){
p_y+=20;
}
}
var mc:MovieClip=create_mc();
mc.x=p_x;
mc.y=p_y;
p_x+=20;
container.addChild(mc);
}
//container.height=100;
var scroll_bar:UIScrollBar=new UIScrollBar();
scroll_bar.direction=ScrollBarDirection.VERTICAL;
scroll_bar.setScrollProperties(5,1,180);
scroll_bar.addEventListener(ScrollEvent.SCROLL,scroll_handle);
addChild(scroll_bar);
scroll_bar.y=150;
scroll_bar.x=150;
function scroll_handle(evt:ScrollEvent):void{
//trace(evt.target.scrollPosition);
var rect:Rectangle =container.scrollRect;
rect.y=Math.floor(evt.target.scrollPosition);
container.scrollRect=rect;
}
function create_mc():MovieClip{
var mc:MovieClip=new MovieClip();
mc.graphics.beginFill(0xFF0000,0.5);
mc.graphics.drawCircle(10,10,10);
mc.graphics.endFill();
return mc;
}
Ïà¹ØÎĵµ£º
¡¡¡¡±¾À´²»ÏëдÕâ½ÚµÄ£¬ÒòΪÕâ½ÚµÄÄÚÈݺܶàÊéÉÏ»òÕßÍøÉÏ×ÊÁ϶¼ÓУ¬¶øÇÒдµÄ±ÈÎÒÒªÏêϸÕý¹æµÃ¶à¡£µ«ºóÀ´ÏëÏ룬»¹ÊÇд°É£¡
¡¡¡¡¶øÇÒºóÃ漸½ÚÒª½áºÏ½Ó±¦µÄ·¶ÀýÓÎÏ·£¬¾ßÌå·ÖÎöËüµÄ¼¸¸öCLASS£¬ËùÒÔ£¬»¹ÊÇÓÃÒ»½Ú°ÑCLASSµÄд·¨ËµÒ»Ï¡£¿ÉÄÜÎÒ¶ÔCLASSµÄд·¨Ò²²»ÊǺÜÕý¹æ£¬ÓÐÀÏÄñ¿´Á˺ó£¬×îºÃÒ²ÄÜÖ¸µãһϡ£
¡¡¡¡ÏÈÀ´¸öCLASS»ù±¾ ......
¡¡¡¡·¶Àý½Ó±¦ÓÎÏ·ÖÐÈËÎïÀàµÄCLASS½²½â
¡¡¡¡Ê×ÏÈÇëÏÂÔØÔ´Îļþ£ºCLASS.rar
¡¡¡¡ÏÂÔغ㬴ò¿ªÒ»¿´£¬ÈçÏ£º
¡¡¡¡Ò»¸öFLAÖ÷Îļþ£º
¡¡¡¡run_game.fla
¡¡¡¡Èý¸öĿ¼£º
¡¡¡¡player
¡¡¡¡items
¡¡¡¡game
¡¡¡¡ÎÒ°Ñ.asÀàÎļþ·ÖÃűðÀàµÄ´æ·Å£¬ÕâÑù¿´ÉÏÈ¥ÇåÎú£¬¸üÖØÒªµÄÊDZðÈË¿´ÁË»á¾õµÃÎÒºÜרҵ¡£
¡¡¡¡Ä¿Â¼playerÀïÓУ ......
±¾ÎÄÏêϸ½éÉÜFlash AS ÈëÃŵ½¾«Í¨½Ì³Ì
¡¡¡¡ÓÃFlashÖÆ×÷¶¯»£¬¹âƾʱ¼äÖáºÍͼ²ãÀ´ÑÝÒï»Ã棬¼´Ê¹¶¯»ÔÙ¾«²Ê£¬Ò²Ö»ÄÜÈùÛÉÍÕ߶¢×ÅÆÁÄ»£¬ÑØ×Åʱ¼äÏߵĽø¶È±»¶¯µÄÐÀÉÍ¡£Èç¹ûÒªÏ붯»¾ßÓн»»¥ÐÔ£¬¸ù¾Ý¹ÛÉÍÕßµÄÑ¡ÔñÀ´¿ØÖƲ¥·ÅµÄ˳Ðò»òÕß³ÊÏÖ²»Í¬µÄÄÚÈݾͷǵÃÒÀ¿¿FlashµÄ¶¯×÷½Å±¾ÓïÑÔÁË¡£¶¯×÷½Å±¾Ó¢ÎÄΪActionScript£¬¼ò³ÆAS
......
Flash½Ì³Ì£ºÄãÖªµÀÕâЩ³£ÓÃÃüÁîÂð
ÄÚÈÝÕªÒª£ºFlashµÄÓиöÓŵã¾ÍÊÇÈÝÁ¿Ð¡£¬±ãÓÚ»¥ÁªÍø´«²¥£¬ÈçºÎ¿ØÖÆËüµÄ´óС·Ç³£ÖØÒª£¬ÏÂÃæ×÷Õ߾͸ø´ó¼Ò½éÉÜflashÖÆ×÷¹ý³ÌÖУ¬¿ØÖÆÎļþ´óСµÄһЩ·½·¨£¬¾Ñé̸֮£¬Ï£ÍûÄܸøÅóÓÑÃÇ´øÀ´°ïÖú¡£
¡¡¡¡Ò»¡¢×ª»»²é¿´¶ÔÏó
¡¡¡¡Goto£º×ªÒƵ½£¬ËüÊÇ¿ØÖƵ±Ç°Îę̀ÉÏÏÔʾÄÄÒ»¸ö³¡¾°¡£ÔÚËüµÄ×Ӳ˵¥ÖÐ ......
import flash.net.FileFilter;
import flash.net.FileReferenceList;
import fl.controls.Button;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.events.HTTPStatusEvent;
import flash.display.Loader;
import flash.net.URLRequest;
var ......