毕业论文 论文提纲 论文写作 公文范例 教育论文 教育学论文 师范教育 学术论文     论文指导*
                     
 
   
   
   
   
           
 

当前位置:课件115学培吧(kj115.com)→flash网侠教程(助你成为顶尖课件高手)→系列文章

 
 
标题:Flash简单实现网页中的Flash动画全屏
 
展示台

文章来源 作者:admin 密码:admin 整理:湖北金鹰

◇网侠教程栏目简介
    提供FLASH侠客教程和网页制作侠客教程,高手进阶教程。
    浏览过这些资源的还浏览过经典教程图文教程游戏开发教程等相关资源。

---------------

湖北金鹰课件吧

论文相关服务
 

 

Flash播放器自从升级到Flash Player 9,0,28,0,也可以使网页中的Flash通过一个简单的按钮实现全屏显示,和一些视频网站中的效果基本相同,但是在这个教程里是没有使用Javascript脚本的啊!
需要我们在网页中插入Flash代码时,必须加上下面的代码:
<param name="allowFullScreen" value="true" />
启动Flash,制作一个按钮元件,然后把按钮放到主场景中,为按钮添加代码:
on(press){
toggleFullScreen();
}
函数toggleFullScreen()是主要来控制窗口,函数定义如下。
//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插入到网页中时,具体代码如下:
<object data="http://www.webjx.com/upfiles/20071018/20071018224608_fullscreen.swf"
type="application/x-shockwave-flash" width="400" height="200" >
<param name="movie" value="http://www.webjx.com/upfiles/20071018/20071018224608_fullscreen.swf" />
<param name="allowFullScreen" value="true" />
</object>
就可以看到前面的全屏和收缩效果了!

 

 
课件115学培吧(湖北金鹰)欢迎您!永久免费服务网址:http://www.kj115.com
   
 

学员众多的FLASH课件学习基地,成万免费FLASH课件制作教程在线学习,还有免费内容课件教程、视频教程、课件技巧、课件探讨、课件欣赏、课件展示、实用教程、课件界面、课件脚本、课件游戏、课件下载、课件封面、课文内容图片、课文人物图片库、课件素材、图片素材、声音素材、动物素材、背景图片、背景资料、背景边框、课件顶栏图片素材、Dreamweaver教程、Dreamweaver网页课件教程、软件下载。承接学习和培训,承接课件订制,课件修改等所有课件相关服务。
本站主要业务:┃flash课件制作视频教程培训┃承接全国竞赛flash课件┃论文代写代发┃代办课件国家级获奖证书┃
联系:QQ:444860709 手机:13339817386


 
 

业务办理
鄂ICP备08005724号