Results 1 to 4 of 4

Thread: looking for spec. Flash player (button) script

  1. #1
    Join Date
    Jun 2008
    Posts
    22
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default looking for spec. Flash player (button) script

    hello!

    I am looking for a very specific script,
    a flash button that streams a mp3 file (only one button) basically something like this: http://www.premiumbeat.com/flash_res...mp3_player.php

    but then only the middle part (the waves)in grey, that would function as the play and stop button as well...


    so very small, yet effective,
    thanks for your time!

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    How involved of a script are you looking for? Do you just need it to stop/start sound? How familiar with ActionScript are you?

  3. #3
    Join Date
    Jun 2008
    Posts
    22
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    euhm.. so I have done some AS before, but has certainly been a while, the main features I am looking for would be, start/stop button, a piece of code that prevents song from starting again, when other one is still playing.

    I am working on getting the animation part down and see how far I get, it would be great if you'd have some time to check my code.

    I'll post something as soon as I have something

  4. #4
    Join Date
    Jun 2008
    Posts
    22
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I have made the button that I was looking for after this tutorial,

    tutorial

    the AS is this:

    var musicPlays:Boolean = false;
    var loopTune:Sound = new Sound();
    loopTune.onLoad = function(success:Boolean) {
    if (success) {
    loopTune.start(0, 999);
    musicPlays = true;
    _root.musicPlayer.gotoAndStop("playing");
    }
    };
    loopTune.loadSound("js/muziek.mp3", false);
    musicPlayer.playStop.onPress = function ():Void {
    if (musicPlays) {
    this._parent.gotoAndStop("stopped");
    loopTune.stop();
    musicPlays = false;
    } else {
    this._parent.gotoAndStop("playing");
    loopTune.start(0, 999);
    musicPlays = true;
    }
    };



    and everything is working fine, but have run into three problems,

    - the mp3 file is heavy, (3mb) is there a way to make it load faster?

    - when you go back to 'home' (index.html, it's a page that shows the rest of the website through an iframe so the music will play continiously)
    a few times, it starts to play the song again, and even load extra flash players into the document, so I end up several playing at once how do I fix this?

    - I cannot seem the embed the swf file into an HTML file properly
    http://www.purephotography.nl/newsite/muziekje2.html <-- this the html page flash gives me, for the code, the actual page that it will be on and is

    this is the page I am talking about

    so I can place it in a div on a specific spot.

    thank you so much for your time, I hope somebody can help me out cuz this little music thingy has post phoned the website release waaay to long

    Thanks again!

Bookmarks

Posting Permissions

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