Copy link to clipboard
Copied
I'm working on an iPhone app as part of a senior project, and need some help getting my videos to work. I'm a designer, not a coder, so I've been struggling with this quite a bit. I'm also getting near the end of my year so any help is greatly appreciated. In another thread on this forum I got some code about a StageWebView, however when I get to the frame where the video needs to play... I get a white box, with no video playing. Here is the code I have on that frame...
import flash.geom.Rectangle;
import flash.media.StageWebView;
import flash.filesystem.File;
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("objects.flv").nativePath).url;
webView.loadURL( fPath );
I've made sure to include the video files packaged with the app.
Help please!?
stagewebview can play H.264 movies, so most likely a .mp4. You're playing an flv, which is not H.264. You can play FLVs with the normal video ways in Flash, which can be as simple as having an FLVPlayback component on the stage, and setting its source to the flv.
Copy link to clipboard
Copied
stagewebview can play H.264 movies, so most likely a .mp4. You're playing an flv, which is not H.264. You can play FLVs with the normal video ways in Flash, which can be as simple as having an FLVPlayback component on the stage, and setting its source to the flv.
Copy link to clipboard
Copied
Alright.
The reason I was trying this way of playing the video was I was having a lot of issues with the video skipping pretty badly (even with small files). I had heard this was a fix for that. I'll try converting the video and see if that works.
Copy link to clipboard
Copied
No luck... I converted it to an mp4 and have the same result... A white screen with no video.
Copy link to clipboard
Copied
Did you add the movie file in the General tab in iOS settings?
Copy link to clipboard
Copied
Yes I did. I just realized I was missing the app:/ piece of code. I added that along with the mp4 conversion, and it's working now.
Now my question is how can I make it return to a designated frame after the video finishes playing.
Copy link to clipboard
Copied
See this discussion, and the code near the end:
http://forums.adobe.com/message/3694991#3694991
Copy link to clipboard
Copied
You're savin my life man. Thanks a lot.