---
title: "flex学习笔记2"
author: "fourfire"
date: "2007-07-25T13:14:29Z"
tags: []
categories: ["非技术"]
slug: "flex-2"
draft: false
lastmod: "2007-07-25T13:14:29Z"
id: 105369
url: "https://fourfire.iteye.com/blog/105369"
---

1 用flex做一个视频播放器  
注意：如果VideoDisplay没有播放的内容时，调用stop会出现异常  
Error: 1000: UNo bitrate match  
先判断一下：if(flvideo.playing) flvideo.stop();  
2 flex3中全屏模式  
if(displayChk.selected)  
                {  
                    stage.displayState="fullScreen";  
                }else{  
                    stage.displayState="normal";  
                }  
类flash.display.StageDisplayState未找到，因此直接使用字符串赋值  
在flex的模板文件index.template.html中的AC\_FL\_RunContent调用参数中增加  
 'allowFullScreen','true',  
在object中增加

xml 代码

 

1. &lt;param name="allowFullScreen" value="true" /&gt;

embed下增加  
allowfullscreen="true"  
才能使用全屏模式