日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

Flash簡單實現(xiàn)網(wǎng)頁中的Flash動畫全屏_Flash教程

編輯Tag賺U幣
教程Tag:暫無Tag,歡迎添加,賺取U幣!

推薦:Flash教程:用AS實現(xiàn)右鍵菜單的最簡單方法
非常簡單的代碼,把下面代碼直接放到新建立的Flash的第一幀varlinkURL=http://www.hl5o.cn;varlinkText=連接到我的網(wǎng)站;//定義一個新的右鍵菜單項

Flash播放器自從升級到Flash Player 9,0,28,0,也可以使網(wǎng)頁中的Flash通過一個簡單的按鈕實現(xiàn)全屏顯示,和一些視頻網(wǎng)站中的效果基本相同,但是在這個教程里是沒有使用Javascript腳本的��!

需要我們在網(wǎng)頁中插入Flash代碼時,必須加上下面的代碼:

<param name="allowFullScreen" value="true" />

首先看一下效果和源文件

點擊這里下載源文件

啟動Flash,制作一個按鈕元件,然后把按鈕放到主場景中,為按鈕添加代碼:

on(press){
toggleFullScreen();
}

函數(shù)toggleFullScreen()是主要來控制窗口,函數(shù)定義如下。

//Don't scale the movie when the stage size changes
Stage.scaleMode="noScale";
//Align the stage to the top left
Stage.align = "TL";
//Function to toggle between fullscreen and normal size
//the toggle fullscreen button calls this function when pressed
function toggleFullScreen(){
//if normal size, go to fullscreen, else go to normal size
if(Stage["displayState"]=="normal"){
Stage["displayState"]="fullScreen";
}else{
Stage["displayState"]="normal";
}
}
//Create a listener for each time the Stage is resized
var resizeListener:Object = new Object();
//Called each time the stage is resized
resizeListener.onResize = function () {
//Move the button to the center of the screen
toggleFullScreenButton._x=Stage.width/2;
toggleFullScreenButton._y=Stage.height/2;
}
//Add the listener to Stage
Stage.addListener(resizeListener);

這樣就制作好了!

當我們把上面制作的Flash插入到網(wǎng)頁中時,具體代碼如下:

<object data="http://www.hl5o.cn/upfiles/20071018/20071018224608_fullscreen.swf"
type="application/x-shockwave-flash" width="400" height="200" >
<param name="movie" value="http://www.hl5o.cn/upfiles/20071018/20071018224608_fullscreen.swf" />
<param name="allowFullScreen" value="true" />
</object>

就可以看到前面的全屏和收縮效果了!

分享:Flash高級技巧:全新Flash鏡頭的控制處理
前言:該教程介紹了一種有別于傳統(tǒng)的Flash鏡頭控制方式,其原理簡單但確能在某種程度上提高工作效率,增加動畫的可看性,讓一個動畫同時擁有不同角度的”拍攝”

來源:網(wǎng)頁教學網(wǎng)//所屬分類:Flash教程/更新時間:2008-03-05
相關(guān)Flash教程