Copy link to clipboard
Copied
Hi,
How to load a external mp4 video in as2?
this code is perfect but i want mp4 video in it.
please help me!!!
import mx.video.*;
my_video.contentPath = "clips/maharashtra.mp4";
my_video.seek(4.7);
my_video.play();
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void
{
movieComplete();
};
my_video.addEventListener("complete", listenerObject);
//
movieComplete = function() {
gotoAndPlay(1);
};
stop();
then the only problems with your code are that 4.7 seconds of video probably won't load by the time you execute your seek() and you have some superfluous code:
import mx.video.*;
my_video.contentPath = "clips/maharashtra.mp4";
my_video.seek(4.7); // <- this probably won't work online
my_video.play();
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void
{
gotoAndPlay(1);
};
my_video.addEventListener("complete", listenerObject);
stop();
Copy link to clipboard
Copied
what is my_video? an flvplayback component? a video instance? something else?
Copy link to clipboard
Copied
my_video is flv component instance name
Copy link to clipboard
Copied
then the only problems with your code are that 4.7 seconds of video probably won't load by the time you execute your seek() and you have some superfluous code:
import mx.video.*;
my_video.contentPath = "clips/maharashtra.mp4";
my_video.seek(4.7); // <- this probably won't work online
my_video.play();
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void
{
gotoAndPlay(1);
};
my_video.addEventListener("complete", listenerObject);
stop();
Copy link to clipboard
Copied
it's not going online!! presentation purpose only
How to load external mp4 video, is it possible?
Copy link to clipboard
Copied
what problem do you see?
Copy link to clipboard
Copied
when i using this code my_video.contentPath = "clips/maharashtra.flv";
video is playing perfect
but, when using this code my_video.contentPath = "clips/maharashtra.mp4";
video not loaded
Copy link to clipboard
Copied
are you publishing for fp 8 or better?
if so, there's a problem with your path/file name or with the mp4.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now