国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 辦公 > Flash > 正文

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

2024-09-12 17:50:30
字體:
來源:轉載
供稿:網(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" />

  實現(xiàn)網(wǎng)頁中的Flash動畫全屏顯示源代碼

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

on(press){  toggleFullScreen();}
 

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

//Don't scale the movie when the stage size changesStage.scaleMode="noScale";//Align the stage to the top leftStage.align = "TL";//Function to toggle between fullscreen and normal size//the toggle fullscreen button calls this function when pressedfunction 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 resizedvar resizeListener:Object = new Object();//Called each time the stage is resizedresizeListener.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 StageStage.addListener(resizeListener);

這樣就制作好了!

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

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


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

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 全州县| 留坝县| 灯塔市| 江门市| 迁西县| 怀宁县| 黔东| 南川市| 扶余县| 旬邑县| 萨嘎县| 开原市| 井冈山市| 琼结县| 商洛市| 庆云县| 湟源县| 安塞县| 崇仁县| 曲沃县| 阿拉善右旗| 建平县| 关岭| 鄂伦春自治旗| 金华市| 肇庆市| 新巴尔虎左旗| 屏边| 香河县| 石城县| 全南县| 兰溪市| 上高县| 蕉岭县| 鹿邑县| 饶河县| 延长县| 西丰县| 大田县| 渝北区| 合阳县|