Skip to main content
Known Participant
Jun 30, 2011 7:11 PM UTC
Answered

How to...Put video in iPhone??

Hi!! Can someone tell me how to show a video in the iPhone native player with flash CS5.5??

Thank you very much!!

This topic is closed to new replies. Start a new post to keep the conversation going.
relaxatraja
relaxatrajaCorrect answer
Inspiring
Jul 1, 2011 7:27 AM UTC

mport flash.geom.Rectangle;
import flash.media.StageWebView;
import flash.filesystem.File;
import flash.utils.Timer;
import flash.events.TimerEvent;

stop();

var webView:StageWebView = new StageWebView();
webView.stage = this.stage;
webView.viewPort = new Rectangle(0,0,stage.stageWidth,stage.stageHeight);
var fPath:String = new File(new File("app:/MyMovie.mp4").nativePath).url;
webView.loadURL( fPath );

try the above and attach the mp4 file while packaging.

13 replies

relaxatraja
relaxatrajaCorrect answer
Inspiring
Jul 1, 2011 7:27 AM UTC

mport flash.geom.Rectangle;
import flash.media.StageWebView;
import flash.filesystem.File;
import flash.utils.Timer;
import flash.events.TimerEvent;

stop();

var webView:StageWebView = new StageWebView();
webView.stage = this.stage;
webView.viewPort = new Rectangle(0,0,stage.stageWidth,stage.stageHeight);
var fPath:String = new File(new File("app:/MyMovie.mp4").nativePath).url;
webView.loadURL( fPath );

try the above and attach the mp4 file while packaging.

Translate
Known Participant
Jul 1, 2011 8:49 AM UTC

Perfecte, genius!!

Last question, I cant play the video on landscapde mode, is that normal or is a problem of my video??

Translate
relaxatraja
Inspiring
Jul 1, 2011 9:12 AM UTC

Whether the video is not loaded or just playing differntly?

Translate