Results 1 to 6 of 6

Thread: Help. Trying to get custom audio player to play .wav or mp3

Hybrid View

  1. #1
    Join Date
    Feb 2007

    Help. Trying to get custom audio player to play .wav or mp3

    I have wav files that Im trying to create a flash file (player) to play. Basically a very simple play button and progress bar. I can convert the files to mp3, but would prefer to keep it wav if possible. I am having trouble getting it to work. I have read several tutorials and somehow am missing something. The example player I am trying to create can be found at this link: http://www.ge.com/news/audio_video/audio_podcast.html

    My .fla file is attached. I would like to use A2. I think I have something wrong with the sound object actionscript or the way I'm telling it to play the file from within the library. I do not want the wav file (or mp3) to loop.

    Thank you for your help

  2. #2
    Join Date
    Feb 2008
    NW Washington State
    Should not be a problem. I'm still on Flash 8 and could not open the file.. so can you save as an older version and I'll take a look.
    The display part is all cosmetic anyway... your player can look like whatever you want, it's the ActionScript man!

  3. #3
    Join Date
    Aug 2008
    Here is a step by step guide tell you how to make a play button using AS


    hope it can help you

  4. #4
    Join Date
    Feb 2007

    The file as Flash 8

    Thank you. I created an alternative solution, but I would still really like to know how to create what I set out to make.

    The requirements I am wanting to learn actionscript for are as follows:

    A play button that plays the audio once. The progress bar shows progression and when the audio sound reaches the end it goes back to the beginning and allows you to push play to hear it a second time. The tab on the progress bar would also reset to the beginning when the audio finishes.

    Ultimately I want it to be a self-contained swf that looks and functions like the GE example from this web site: http://www.ge.com/news/audio_video/audio_podcast.html

    Thank you for teaching and contributing to this post.

  5. #5
    Join Date
    Nov 2008
    You helped me so much, i had the same problem. Now i m so glad to find its solution

  6. #6
    Join Date
    Feb 2008
    NW Washington State
    I didn't actually post the code in the open forum so anyway, here is the simplest code for getting a music file to play and to create a rewind a play button. The scrubber bar is a little more work so get this part down first.
    Sorry it’s taken so long to get back to you, had some computer problems to deal with. OK, looks like you’ve got a little more work to do on your music player.
    First, I didn’t get anything to play with the player… main problem, you will want to use loadSound instead of loadMovie. Here is a little bit of code that you can test in a new, blank .fla. Just change the path to find your music. Put one simple button on the stage with instance name “playover_btn”.
    var jukebox = new Sound();
    jukebox.loadSound("d01_15_09_Fourth_of_July.mp3", true);
    // true is autoplay, false is paused
    var currentPosition:Number = 0;
    var paused:Boolean = false;
    // set paused to opposite of load sound true/false //
    function playover() {
    	jukebox.loadSound("d01_15_09_Fourth_of_July.mp3", true);
    playover_btn.onRelease = playover;
    Second, does your loading bar actually work? There are lots of way to create “loading” bars so maybe it works and I just didn’t figure yours out. Anyway, you will also need a scrub bar if you want to display how far along in the file the audio has played. This starts to get a little more complicated. Your best bet may be to work though a couple tutorials from:
    Also, mp3s will be a lot more user friendly (much smaller files), so you may want to convert them.
    Hope this gets you headed in the right direction.
    Best wishes,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.09631 seconds
  • Memory Usage 3,053KB
  • Queries Executed 13 (?)
More Information
Template Usage (30):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (6)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (27):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./includes/functions_threadedmode.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (72):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates