A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: A player to load videos from file? (Flash CS3)

  1. #1
    Junior Member
    Join Date
    Jul 2008
    Posts
    3

    A player to load videos from file? (Flash CS3)

    Hello there guys,

    I'm wondering if it is possible to script a SWF file to load and play movie files (such as AVI, WMV, MPEG, etc.) from an external folder or directory. Think of it as a Youtube video player for offline use.

    I ask this because I am in the process of creating an offline, wiki-style database that requires embedded, multimedia files. My thought is that the videos are located in a sub-directory within the main database directory, and the same SWF is used throughout the pages of the database, each instance used to load and play a different video file, EXACTLY like an offline version of Youtube.

    Well, is this possible?

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    use php to read the contents of the folder, and the LoadVars class to talk with php.

    gparis

  3. #3
    Senior Member
    Join Date
    May 2008
    Posts
    332
    Well yes you can script a swf file to load and play movie files from an external folder, but the Flash player does not play .avi, .wmv, or .mpg files. Flash players like those used on YouTube and other video sharing sites use Flash because it's very cross browser friendly. Not because it's the very best player to use locally on any one given machine.
    Are you saying that you want to reproduce the player once for each video... using multiple "instances"? rather than just one player which plays videos from a playlist?
    If you choose the Flash player then you'd be better off converting all the videos to one format, the Flash .flv video file. Then you'd have all the Flash resources available.
    If you don't want to convert all the video files, then you should look at using a DivX or VLC player, which will play a wider range of file types.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com

  4. #4
    Junior Member
    Join Date
    Jul 2008
    Posts
    3
    Quote Originally Posted by gparis View Post
    use php to read the contents of the folder, and the LoadVars class to talk with php.

    gparis
    Well unfortunately I don't know PHP at all, and only some Actionscript. I'm admittedly more of an animator/designer than a programmer. I wish I knew more. Can you point me to some tutorials, both for PHP and Actionscript, that would help me build this video player?

    Quote Originally Posted by Eye For Video
    Well yes you can script a swf file to load and play movie files from an external folder, but the Flash player does not play .avi, .wmv, or .mpg files. Flash players like those used on YouTube and other video sharing sites use Flash because it's very cross browser friendly. Not because it's the very best player to use locally on any one given machine.
    Are you saying that you want to reproduce the player once for each video... using multiple "instances"? rather than just one player which plays videos from a playlist?
    If you choose the Flash player then you'd be better off converting all the videos to one format, the Flash .flv video file. Then you'd have all the Flash resources available.
    If you don't want to convert all the video files, then you should look at using a DivX or VLC player, which will play a wider range of file types.
    Best wishes,
    Eye for Video
    Hmm...tell me more about this FLV format? How useful is it?

    Also, yes. What I mean is...hmmm, okay, suppose I have a database page devoted to a certain subject. I would want the media player embedded in that page to automatically load the video of that subject, rather than having to search through a playlist or open a file from a directory.
    Last edited by Ultimate Dash; 03-14-2010 at 05:41 PM.

  5. #5
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    tell me more about this FLV format? How useful is it?
    around 80% of the videos on the web are in the .flv format.

    gparis

  6. #6
    Senior Member
    Join Date
    May 2008
    Posts
    332
    As for the .flv format..as mentioned by gparis, it is by far the most widely used video format on the Web. It is a container format... meaning it is not a video compression codec but it is a container or "box" that contains both a video file and an audio file, the primary use of which is the delivery of video of the Web.
    If your project is designed to include other formats, you may want to do some research into "ffmpeg" or "PHPMotion" to do the conversion if the videos are to be user submitted.
    Best wishes,
    EfV

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center