flashλͼ¼¼ÊõÑо¿Æª(7)£ºÏñËØÁ£×Ó
ÔÚwonderfl ÍøÕ¾µ±ÖУ¬ÓкܶഴÒâµÄflash ³ÌÐò£¬³ÊÏÖµÄÊÓ½ÇЧ¹ûÄܹ»¸øÓèºÜ¸ßµÄÆô·¢ÐÔ¡£½ñÌ죬ÓÖÒª¼ÌÐøѧϰflash ¼¼Êõ£¬°ÑÔÚÄÄÀï¿´µ½µÄ¶«Î÷¼Ç¼һÏ£¬ÕâÖÖλͼӦÓÿÉÒԱ仯³öºÜ¶àÉñÆæµÄЧ¹û¡£Ò»¸öÏñËØ¿ÉÒÔµ±×÷Ò»¸ö΢СµÄÁ£×Ó´¦Àí£¬ÎÒÃÇ¿ÉÒÔ²ÉÓÃÉèÖÃÏñËصãλÖõķ½Ê½£¬¶Ô¿Õ°×µÄλͼÊý¾Ý½øÐÐÉèÖõ㣬ÕâЩµã»á·Ö²¼ÔÚλͼÉÏ£¬³ÊÏÖ³öÉ«²Ê±¼·ÅµÄЧ¹û¡£
½ÓÏÂÀ´£¬¼Ç¼һÏÂÔÚÄÄÀï¿´µ½µÄ³ÌÐò¡£´ó²¿·Ö¹ý³Ì¶¼À´Ô´ÓÚÄÄÀï¡£½ö½ö¸ÄÔìÁËһЩ¡£Ìáµ½Á£×Ó£¬ÎÒÏëµ½Ò»¸öÁ£×ÓÄ£ÐÍ£¬Õâ¸öÁ£×ÓÄ£ÐÍÊÇÒ»¸ö½á¹¹£¬ÔÝʱûÓа취¿ÉÒÔ×ܽáËû³öÀ´£¬Ö»ÊÇÒþÔ¼ÓÐÕâÑùÏë·¨£¬Á£×ÓÄ£Ð͵±ÖУ¬¿ÉÒÔ°üº¬×ø±ê£¬½Ç¶È£¬ÑÕÉ«Öµ¡£µÈµÈÉèÖá£ÆäËû²ÎÊýÈçÏÂÃæ¡£
//¼òµ¥µÄÁ£×ÓÄ£ÐÍ
internal class Particle
{
public var x:Number;
public var y:Number;
public var radius:Number=0;//°ë¾¶
public var color:uint;//ÑÕÉ«
public var vr:Number;
public var angle:Number;
public function Particle()
{
}
}
Õâ¸öÄ£Ð͵±ÖУ¬ÎÒÃÇ»á¼Ç¼ËûµÄλÖã¬ÑÕÉ«£¬ºÍ½Ç¶È¡£ÕâÑùÒ»À´£¬ÎÒÃÇ°ÑËû×÷Ϊһ¸ö¶ÔÏóÄÇÑù½øÐд´½¨¡£
ÎÒÃÇÐèÒªËæ»ú´´½¨Ã¿Ò»¸öÏñËØÁ£×Ó¡£ÈçÏÂ
private function creatSprite():void
{
//´´½¨¶à¸öÏñËصã
for (var i:int=0; i<300; i++)
{
var p:Particle=new Particle();
p.vr=Math.random()*45;
p.color=0xffffff;
p.angle=Math.random()*2*Math.PI;
particles.push(p);
}
}
ÉèÖÃËûµÄ½Ç¶È£¬ÑÕÉ« »¹ÊÇһЩ³õʼ²ÎÊý£¬ÕâÑùÏÂÀ´ÎÒÃǽèÓÃsetPixel£¨x,y,color£©;Õâ¸öº¯ÊýÀ´ÉèÖÃÿһ¸öµãÁË¡£¿´ÆðÀ´·Ç³£¼òµ¥£¬ÓÃÆðÀ´Ò²ºÜ¼òµ¥¡£µ«ÊÇÓÐÒ»µãÊÇ£¬Í¨¹ý½è¼øËûµÄÒ»ÖÖ×ö·¨£¬ÎÒÃÇÁ˽⵽ÕâЩ·½·¨Ó¦Óñ仯¡£
Á£×Ó´´½¨Íê³É£¬²ÉÓÃÊý×é½øÐб£´æ¡£½øÐж¯»¹ý³Ì¡£²ÉÓÃÔ²µÄ·Ö²¼·½Ê½ÉèÖö¯»£¬»òÕßÆäËû·½Ê½ÉèÖã¬ÕâÑùµÄ·½Ê½¿ÉÒÔ×ÔÓÉ´îÅä¡£¶øÕâ´ÎÎÒÃÇÔò²ÉÓÃÔ²µÄ·½Ê½½øÐС£ÏòÖÐÐÄÉ¢·¢¡£Í¬Ñù£¬ÔÚ½è¼øÕâ¸ö³ÌÐòµÄʱºò£¬½áºÏÂ˾µµÄÓ¦Ó㬲úÉúºÜ¶à²»´íЧ¹û¡£¿´ÆðÀ´ºÜ¿á¡£ÈçÏÂͼ£º
´úÂëÇåµ¥£º
package
{
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.PixelSnapping;
import flash.display.BlendMode;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
public class Main extends Sprite
{
private var bmp:BitmapDa
Ïà¹ØÎĵµ£º
½ñÌì»»¸ö¿Ú棬ÖÆ×÷Ò»ÏÂÉÏ´«Í¼Æ¬£¬¹¦ÄܸöÈËÏ£Íû¾¡Á¿¼òµ¥»¯£¬·½±ãÀí½â£ºFlash cs4 ¶ÔFileReference ÀàÔö¼Ó¼¸ÏîÄÚÈÝ
Èçdata ÊôÐÔÄܹ»»ñÈ¡µ½Ò»¸ödata : ByteArray Õâ¸öÖµ£¬
Save ºÍLoad µÄ·½·¨ÊµÏÖÉÏ´«ºÍ±£´æͼƬ¡£
ÓÐÁËÕâÁ½¸ö¹¦Äܺó£¬ÎÒÃÇ¿ÉÒÔʵÏÖÉÏ´«Í¼Æ¬µÄÄ¿µÄÁË£¬ÅäºÏLoader ¼ÓÔØByteArray ÕâÑù¾ÍÄÜʵÏÖͼƬ½áº ......
¡¢ÔÚFlash¼ÓÈ룺<param name="wmode" value="opaque">
2¡¢ÔÚDIVÀï¼ÓÈ룺position:absolute;z-index:10;£¨Êý×ÖÔ½´óÔ½´¦ÓÚÉϲ㣩
FLASH͸Ã÷±³¾°
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 ......
ÒÔÏÂÊÇÎÒÔÚÍøÉÏÕÒµÄÒ»·Ý¹ØÓÚ½â¾öÕâ¸öÎÊÌâµÄ´ð°¸..µ«ÊµÑé¹ýºó¸Ð¾õ²»Ì«¿ÉÐÐ!
___________________________________________________________________
˵µ½Õâ¸öÎÊÌ⣬¿ÉÄÜÓÐÈ˾ͻá˵£¬ÄÇ»¹²»¼òµ¥£¬Ö±½ÓÓÃflashµÄActionScriptÖеÄurl·½·¨²»¾Í¸ã¶¨ÁË£¬ÄÇô
Èç¹ûÎÒÃǵÄUIÈËÔ±Éè¼ÆÍêflash,µ«flash¶ÔÓ¦µÄÁ´½á»¹Ã»ÓÐÈ·¶¨»òÕßÒÔºó» ......
1¡¢¹ØÓÚFLASHÕÚµ²DIV²ãµÄ½â¾ö·½·¨£¡
ÔÚ<object>Àï¼ÓÈëÕâ¸ö²ÎÊý,½«FLASHÖÃÓڵײã,FLASHÓÅÏȼ¶±ÈDIV¸ß, ËùÒԻᵲסDIVµÄ.
<param name="wmode" value="Opaque">
2¡¢½â¾ödiv×ÜÊDZ»selectÕÚµ²µÄÎÊÌâ
Ö»ÒªÔÚdivÄÚÈݺóÃæÌí¼ÓÈçÏ´úÂë¾Í¿ÉÒÔÁË
<iframe src="javascript:fals ......