A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: Is There a Media Player Tutorial?

  1. #1
    Member
    Join Date
    Jan 2007
    Posts
    48

    Is There a Media Player Tutorial?

    Specifically, is there a tutorial that shows how to manipulate this thing using ActionScript? I'd like to be able to actually use the Media Player, but until I find out how to dynamically add audio files to it with ActionScript, it's useless.

    Thanks.

  2. #2
    Relaxing tmoore935's Avatar
    Join Date
    Oct 2001
    Location
    colorado, usa
    Posts
    1,713
    Can you add the files with the supplied method? The media player was made to be of ease to anyone?
    Any programming language is at its best before it is implemented and used.

  3. #3
    Member
    Join Date
    Jan 2007
    Posts
    48
    If by "the supplied method" you mean the properties window, yes I can. But that doesn't do me any good unless I want to create a new Flash application everytime I add a new audio file to my church's website (which will be every week). I'm all for making things easy to use, but that shouldn't cripple those of us who actually know how to program.

  4. #4
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Quote Originally Posted by sm5574
    Specifically, is there a tutorial that shows how to manipulate this thing using ActionScript?
    Have you already looked at the API file ?
    Code:
    setPlaylist ( playlist, nr [, paused ] )
    ----------------------------------------
    playlist : an array of labels and values. The labels represent the label shown in the
               list display, the values represent the file names of the media files.
               Supported media file filename extensions are
               flv (video)
               jpg, png, gif (still)
               mp3, fd (audio)
               fd files require the mp3 file that goes with it to be named the same except
               for the filename extension; that should be mp3 (all lowercase).
    nr       : the playlist index number (zero based) of the media file to start with.
    paused   : when set to true, the player starts in paused mode.
    
    example  :
    
    items = new Array();
    items.push( { label: 'My first media file', value: 'MyMusicFile.mp3' } );
    items.push( { label: 'My second media file', value: 'MyVideo.flv' } );
    myMediaPlayer.setPlaylist ( items, 0 );
    
    
    setExternalPlaylist ( playlistfile, nr [, paused ] )
    ----------------------------------------------------
    playlistfile : external file containing the playlist. Each line contains one item
                   in the format label | value
    
    example      :
    
    My first media file | MyMusicFile.mp3
    My second media file | MyVideo.flv
    The easiest way if you have to make changes on a regular base is the external playlist. It's also possible for example to use a php file for external playlist that scans an entire directory and outputs a playlist. Thay way you only have to upload new media files to make changes.

  5. #5
    Member
    Join Date
    Jan 2007
    Posts
    48
    Thanks! Didn't know there was an API file.

    I love KoolMoves, I really do, but it is conspicuously lacking in professional-level documentation (by that I mean documentation written for professionals--not that the existing manual is unprofessional, which it certainly is not). What documentation it does come with seems to be just thrown in with the expectation that we'll somehow happen to come across it. If it weren't for this forum I probably would have abandoned KM long ago.

  6. #6
    Senior Member
    Join Date
    Aug 2006
    Posts
    109
    I'd be interested in a tutorial as well.

    There's a property in the MediaPlayer control called "color settings".

    I've tried various skins, altering the colors in "color settings" and the colors don't change.

    Maybe it's not for changing the colors of the player?

  7. #7
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    If the info for the skin selection says "No colors parameterized", this doesn't do anything. For other skins like the two classic ones, TinyMP3 or TinyVid, you can change the colors of the skin.

  8. #8
    Senior Member
    Join Date
    Aug 2006
    Posts
    109
    If the info for the skin selection says "No colors parameterized",

    Do you know where it would say this? I don't see it under "properties" for the Media Player control (like "color options" is, where the value is "default specs").

  9. #9
    Member
    Join Date
    Jan 2007
    Posts
    48
    When you choose the skin, the window shows you a list of skins on the left and a preview on the right. At the bottom of this window it will tell you (among other things) what file types (audio/video) are supported and if the colors are parameterized.

  10. #10
    Senior Member
    Join Date
    Aug 2006
    Posts
    109
    Ahh, I see. It's in the preview window at the bottom.

    Thanks!

  11. #11
    Why can't I see the video that I added to a media player? I can hear the audio but I can't see the video. When you add items to the playlist aren't you suppose to be able to see the video? Or is there some code I need to add?

  12. #12
    Relaxing tmoore935's Avatar
    Join Date
    Oct 2001
    Location
    colorado, usa
    Posts
    1,713
    Quote Originally Posted by pushplay
    Why can't I see the video that I added to a media player? I can hear the audio but I can't see the video. When you add items to the playlist aren't you suppose to be able to see the video? Or is there some code I need to add?
    What player did you choose?
    Any programming language is at its best before it is implemented and used.

  13. #13
    I chose the iSilver!

  14. #14
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Quote Originally Posted by pushplay
    Why can't I see the video that I added to a media player? I can hear the audio but I can't see the video. When you add items to the playlist aren't you suppose to be able to see the video? Or is there some code I need to add?
    Do you mean you hear the audio of the video or that you can listen to mp3 files. If the first is the case, that's strange; you should be able to see the video. If it's the entire video file, make sure it's in the same directory as the swf file since KM doesn't store path names, only file names.

  15. #15

    Can't see video in Koolmoves or Web

    When I first used the player in my fun file I could see the video. For whatever reason I noticed I couldn't see the video anymore. I thought maybe I just couldn't see the video in Koolmoves, but after I uploaded as a test I still couldn't see it. I can still hear it but I got no video!

    Does it matter what size the movie is (height/width)? I was under the impression that it would just play it.
    Last edited by pushplay; 05-05-2007 at 02:32 AM.

  16. #16
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    If you were able to see it once, most likely the problem is that the player can't find the flv file. Make sure you upload the flv file into the same directory as the swf file. It should work. The size of the width and height of the movie are not important.

    Edit :
    If you can still hear the video, that's really strange.
    What happens if you select another skin like iRed ?
    Can you post a link to the web location so I can see the problem ?
    Last edited by w.brants; 05-05-2007 at 02:37 AM.

  17. #17
    As far as I can tell their all in the same directory. Shouldn't I be able to view the video in Koolmoves as well before uploading to my site?

    I'm going to do a dobule check. Also I'm going to restart the program and my computer maybe it's tired or need a break!

    Thanks for the quick response!

  18. #18

    Found the Problem!!!!

    I wanted to post this just incase someone runs into this same problem.

    Ok I was still having problems with my media player which I could not view my videos in Koolmoves or after uploading to my website, but I could hear the audio!

    Before I upgraded to Kool6 I had some saved fun files that I was working on. If I started a new fun file I could see and hear the videos in the media player but I could not see it when I put a media player in a saved fun file so this lead me to check the settings and preferences and I found that Kool6 settings were different than my Kool5 version particularly the ("Export Settings")

    Here is what I found...

    The JPEG was set to 74 in Kool5 but in Kool6 it is set to 85. The backwards compatible was checked off in Kool5, but in Kool6 it is not checked, and the Compress setting is not check in Kool 5 but in Kool6 it is. (Take a look at the attached files)

    So once I made these changes to reflect Kool6 settings and saved as a swift/html file I was able to view the video and hear the audio perfectly in Koolmoves!

    Thanks for everyone's help!
    Attached Images Attached Images

  19. #19

    Still having issues with media player!!!

    Well I thought I solved this riddle but now some videos I can see and some just don't play.

    Check this out www.ividpro.com/test/mediatest.html

    I can't even see the media player on the web. Let me know if the link above lets you see the media player. And in Koolmoves only two videos play, the others don't even play. I'm wondering is there a limit to the file size of the videos or media? Does anyone know?

    I also attached my fun file!
    Attached Files Attached Files

  20. #20
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    There's no limit to the file size.

    The reason you don't see the media player on the web is becasue the AC_RunActiveContent.js file isn't in the same directory as the html and swf file or you didn't upload it at all.

    The same problem seems to be the case for the flv files. They are not in the same directory as the other files or you didn't upload them. When I try to access them directly it says the files can't be found.

    As for your previous problem, make sure the backward compatibility checkbox is unchecked. It's this setting that causes the problems. I don't understand at the moment why. I'll contact Bob about it.

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