Flash CS5.5: Play video on iPad?
Has anyone succeeded in getting video to play in Flash published for th开发者_JS百科e iPad? 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. I am using CS5.5.
I have achieved playing video in iPhone and iPad, follow the following steps:
You can use ordinary FLVPlayback
- Keep videos and
.fla
file together. - Import the
FLVPlayback
component to stage and delete it in order to get the skin. - Add the following code in the first frame script (formats I used:
.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
.
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.
to remedy, don't use a skin and create custom controls, if needed.
精彩评论