Flash有趣實(shí)驗(yàn):用視頻阻擋泡泡特效_Flash教程
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!
推薦:模糊、緩沖、順序加載、XML等的混合運(yùn)用簡(jiǎn)單實(shí)例放假了,沒(méi)多少事,發(fā)個(gè)模糊、緩沖、順序加載、XML等的混合運(yùn)用簡(jiǎn)單實(shí)例,作品粗糙,給我等新手們參考,拋磚引玉吧,假如你覺(jué)得可以一定記得要頂帖。第一幀上
有攝像頭才可以試驗(yàn)哦!!
下面是代碼:
cam.setMode(cam.width, cam.height, 25);
video.attachVideo(cam);
var depth_num:Number = 0;
var list_array:Array;
list_array = new Array();
m = new flash.geom.Matrix();
now = new flash.display.BitmapData(video._width, video._height);
out = new flash.display.BitmapData(video._width, video._height);
this.createEmptyMovieClip("out_mc", 50);
out_mc.attachBitmap(out, 1);
out_mc._x = 160;
this.onEnterFrame = function() {
now.draw(video, m);
done = now.clone();
done.draw(before, m, null, "difference");
done.threshold(done, done.rectangle, done.rectangle.topLeft, ">", 4.279309E 009, 4.294902E 009, 16777215, false);
list_array.push(done.clone());
if (list_array.length>5) {
list_array.shift().dispose();
}
var r_num9 = list_array.length;
var r_num8 = 255;
var r_num7;
out.fillRect(out.rectangle, 0);
before = now.clone();
for (var c:Number = 0; c<r_num9; c ) {
r_num7 = c*r_num8;
out.threshold(list_array[c], out.rectangle, out.rectangle.topLeft, "==", 4.294902E 009, -16777216 | r_num7 << 16 | 0 | 0, 16777215, false);
}
depth_num ;
attachMovie("pao_mc", "pao_mc" depth_num, depth_num 100, {_x:Math.random()*550, _y:Math.random()*400, _xspeed:3-(Math.random()*6 1), _yspeed:Math.random()*3 1, _scale:Math.random()*20 20});
var color:Color = new Color(this["pao_mc" depth_num]);
color.setRGB(Math.random()*0xffffff);
this["pao_mc" depth_num]._xscale = this["pao_mc" depth_num]._yscale=this["pao_mc" depth_num]._xscale._scale;
this["pao_mc" depth_num].onEnterFrame = function() {
this._xscale = this._scale/60;
this._yscale = this._xscale;
this._alpha = 166-this._xscale;
trace(out.getPixel(this._x, this._y));
if (out.getPixel(this._x, this._y)<=0) {
this._x -= this._xspeed;
this._y -= this._yspeed;
}
if (this._x<=0 || this._y<=0 || this._x>=550) {
this.removeMovieClip();
}
};
};
stop();
分享:網(wǎng)頁(yè)中Flash出現(xiàn)“單擊激活并使用此控件”的解決方法在網(wǎng)頁(yè)中插入的Flash,在進(jìn)行頁(yè)面瀏覽時(shí)會(huì)有討人嫌的提示“單擊激活并使用此控件”,F(xiàn)lash文件的四周具有邊框顯示,必須單擊該Flash才能消除該提示,著實(shí)很麻煩
/所屬分類(lèi):Flash教程/更新時(shí)間:2008-03-05
相關(guān)Flash教程:
- as中禁用ESC鍵
- AS3.0 圖片變黑白 圖片彩色變黑白代碼
- flash as3.0 跨域的解決辦法
- 模板無(wú)憂(yōu)FLASH透明代碼
- Flash教你制作卡通MM眨眼睛動(dòng)畫(huà)
- Flash從零開(kāi)始學(xué)習(xí)創(chuàng)建單選按鈕
- Flash繪制小龍與花插畫(huà)場(chǎng)景
- Flash程序的測(cè)試方法
- Flash CS4文字顏色緩動(dòng)特效
- 網(wǎng)頁(yè)中演示類(lèi)FLASH動(dòng)畫(huà)制作規(guī)范
- Flash CS3循環(huán)背景的運(yùn)用技巧
- Flash鼠繪技巧教你制作紅綠色的樹(shù)葉
Flash教程Rss訂閱網(wǎng)站制作教程搜索
Flash教程推薦
- 用Flex3.0 做一個(gè)簡(jiǎn)單Flv 播放器
- 實(shí)現(xiàn)春節(jié)晚會(huì)隨機(jī)抽取手機(jī)號(hào)碼的文字效果
- 用純Flash Actionscript做的火柴棍小人跑的動(dòng)畫(huà)
- Flash基礎(chǔ)教程 動(dòng)畫(huà)基礎(chǔ)知識(shí)
- Flash AS輕松制作旋轉(zhuǎn)可控立方體特效
- 通過(guò)實(shí)例學(xué)習(xí)Flash AS3.0——案例四
- 由淺入深學(xué)習(xí)Flash制作賽車(chē)游戲教程
- Flash入門(mén)實(shí)例:打造簡(jiǎn)單的飄雪動(dòng)畫(huà)視覺(jué)特效(1)
- 為AS2.0添磚加瓦-編寫(xiě)類(lèi)擴(kuò)展(4)
- 問(wèn)答整理:在Flash動(dòng)畫(huà)影片中怎樣使MC倒放?
- 相關(guān)鏈接:
- 教程說(shuō)明:
Flash教程-Flash有趣實(shí)驗(yàn):用視頻阻擋泡泡特效
。