Skip navigation
MarkB123123
Currently Being Moderated

What HTML code do I need to get Adobe Flash to play an embedded MP4 video file (8 MB)?

Jan 3, 2013 3:19 AM

What HTML code do I need to get Adobe Flash to play an embedded MP4 video file (8 MB)?

 

Thanks

Mark

 
Replies
  • Currently Being Moderated
    Jan 3, 2013 6:41 AM   in reply to MarkB123123

    Unless I am missing an understanding, you should not need any html code to make a Flash file play a video file.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 3, 2013 2:59 PM   in reply to MarkB123123

    Worded that way it is not a Flash question.  Search Google using "Embed MP4 in html" and you should find some information

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 3, 2013 7:21 PM   in reply to MarkB123123

    Here are a couple of ways, one using the Netstream class and the other using the FLVPlayback component.

     

    For the NetStream approach, the following in the timeline code will play/loop the intended mp4 file...

     

         var video:Video;

         var connect_nc:NetConnection = new NetConnection();
         connect_nc.connect(null);

     

         var stream_ns:NetStream = new NetStream(connect_nc);

         stream_ns.client = this;

     

         function netStatusHandler(p_evt:NetStatusEvent):void {  
             if (p_evt.info.code == "NetStream.Play.Stop") {
                 stream_ns.seek(0); // to loop the video
             }
         } 

     

         stream_ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

     

         video = new Video();
         addChild(video);

     

         video.attachNetStream(stream_ns);

         stream_ns.play("path_to/your.mp4");

     

     

    For the FLVPlayback component, add it to the stage, give it an instance name ("fp" used below), assign your mp4 file ("path_to/your.mp4") as the source property in the Properties panel, and select the option to autoplay as well.  Place the following code in the timeline...

     

         fp.addEventListener(Event.COMPLETE, playAgain);

        

         function playAgain(evt:Event):void {
             fp.play();
         }

     

     

    To put the Flash swf file in an html page, in the Publish Settings set it to publish an swf and an html page.  Publish the file an the html page will be created for you.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 4, 2013 7:56 AM   in reply to MarkB123123

    If you do not have Flash such that you can create a Flash file that plays a video or do not have a video player swf made using Flash, you can't embed what you don't have.

     

    You asked for a Flash solution for which I gave you two.  NetStream is not javascript, it is Actionscript, the coding language of Flash.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 4, 2013 5:42 PM   in reply to MarkB123123

    There are many video players that can be "embedded" on an HTML Web page, many which even give you the code that you simply "copy/paste" into your existing HTML code.

    For example:

    http://flowplayer.org/

    or

    http://www.longtailvideo.com/jw-player/

    or

    http://www.pickleplayer.com/

    plus many others... A simple Google for "Flash Web video players" will get you lots of results.

    My choice is the JW Player, which plays on PCs as well as iProducts... something that a "Flash only" player will not do.

    Best wishes,

    Adninjastrator

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points