Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to load a external mp4 video

Explorer ,
Nov 13, 2013 Nov 13, 2013

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();

TOPICS
ActionScript
3.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 14, 2013 Nov 14, 2013

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();

Translate
Community Expert ,
Nov 13, 2013 Nov 13, 2013

what is my_video?  an flvplayback component?  a video instance?  something else?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 13, 2013 Nov 13, 2013

my_video is flv component instance name

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2013 Nov 14, 2013

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();

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 14, 2013 Nov 14, 2013

it's not going online!! presentation purpose only

How to load external mp4 video, is it possible?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2013 Nov 14, 2013

what problem do you see?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 14, 2013 Nov 14, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 15, 2013 Nov 15, 2013
LATEST

are you publishing for fp 8 or better?

if so, there's a problem with your path/file name or with the mp4.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines