Skip to main content
Known Participant
June 30, 2011
Answered

How to...Put video in iPhone??

  • June 30, 2011
  • 1 reply
  • 1091 views

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 has been closed for replies.
Correct answer relaxatraja

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.

1 reply

relaxatraja
relaxatrajaCorrect answer
Inspiring
July 1, 2011

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.

Known Participant
July 1, 2011

Perfecte, genius!!

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

relaxatraja
Inspiring
July 1, 2011

Whether the video is not loaded or just playing differntly?