Skip to main content
Participant
September 15, 2011
Question

Video on iPad / Flash

  • September 15, 2011
  • 1 reply
  • 482 views

Hello,

I've created an app (*.aip) with the Publishing-Tool in Flash, which includes a video. This Video is fullscreen (1024x768), FLV coded, Bitrate is 2 Mbit/s. I have imported this Video to a flash file and placed it on the timeline. The problem on the iPad is - the video didn't run smooth.

I tried to use the VideoPlayer-Object but its needs a URL-String.  So I added a video file to the included files list in Publish Settings and add the following code.

But this didn't work on the iPad.

import flash.filesystem.File;
import fl.video.*;

var file:File = File.applicationDirectory.resolvePath("video_1.flv");
var myVideo:VideoPlayer = new VideoPlayer();

myVideo.load(file.url);

addChild(myVideo);
myVideo.height = 768;
myVideo.width = 1024;
myVideo.play();

Is there another way to add videos to flash that will work on the iPad, and when yes, will it even run fluently

This topic has been closed for replies.

1 reply

Colin Holgate
Inspiring
September 15, 2011

You don't want to access it as a file, just load it as a relative path url. Like, myVideo.load("video_1.flv");

Participant
September 16, 2011

myVideo.load("video_1.flv");

Unfortunatly this didn't work on the iPad. The video don't show up. I also Overlay the AIR SDK for Flash Professional with AIR 2.7, but no performance improvements for timeline based videos. (with GPU or CPU Rendering)

Any Hints?