简体   繁体   English

Flash CS5.5:在iPad上播放视频吗?

[英]Flash CS5.5: Play video on iPad?

Has anyone succeeded in getting video to play in Flash published for the iPad? 有没有人成功地将视频发布到为iPad发布的Flash中播放? I have tried using both the Video and StageVideo classes, but even though they test successfully in the Flash IDE, they do not work on the iPad. 我尝试使用Video和StageVideo类,但是即使它们在Flash IDE中成功测试,也无法在iPad上使用。 I am using CS5.5. 我正在使用CS5.5。

I have achieved playing video in iPhone and iPad, follow the following steps: 我已在iPhone和iPad上播放视频,请按照以下步骤操作:

You can use ordinary FLVPlayback 您可以使用普通的FLVPlayback

  1. Keep videos and .fla file together. 将视频和.fla文件放在一起。
  2. Import the FLVPlayback component to stage and delete it in order to get the skin. 导入FLVPlayback组件以暂存并删除它以获取皮肤。
  3. Add the following code in the first frame script (formats I used: .flv , .mov , .mp4 ): 在第一帧脚本中添加以下代码(我使用的格式: .flv.mov.mp4 ):

import fl.video.*; 
var myVideo:FLVPlayback = new FLVPlayback(); 
myVideo.source = "video.flv"; 
myVideo.skin = "SkinOverPlayStopSeekFullVol.swf"; 
myVideo.addEventListener(VideoEvent.COMPLETE, completePlay); 
function completePlay(e:VideoEvent):void {
myVideo.alpha=0.2;

Important to keep in mind: 重要提示:

  • While publishing the file, add the video files. 发布文件时,添加视频文件。
  • For testing, add the video files, not the folder containing the video files and in source of the video player add just filename.extension . 为了进行测试,请添加视频文件,而不是包含视频文件的文件夹,并在视频播放器的源中仅添加filename.extension

you can't load an external swf that contains code in ios unless you use a loadercontext and that's not possible with an flvplayback skin. 您无法加载包含iOS中代码的外部swf,除非您使用loadercontext,而flvplayback外观则无法实现。

to remedy, don't use a skin and create custom controls, if needed. 要进行补救,请不要使用皮肤并根据需要创建自定义控件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM