Results 1 to 3 of 3

Thread: Coding a music player loop button in Flash actionscript 2.0

  1. #1
    Join Date
    Mar 2011
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Coding a music player loop button in Flash actionscript 2.0

    Hello Everyone,

    I need help with coding a loop button. I really have severely minimal experience in coding, so below are two examples of what I've tried, amongst dozens of others that were incorrect.


    //This example will loop the song correctly, but only if you press the loop button after the song is complete. If you press it while the song is still playing, it will play over itself.

    Code:
    loopbutton_up.onPress = function(){
             mySong.start(0, 100)
    }
    //I don't really have a clue what I'm doing here. I just based this on someone else's code and tried to modify it myself, without really understanding what's needed. I get the error: 'else' encountered without matching 'if.' So how and where do I fix that or is my attempt at a code completely off track? Please advise either way.

    Code:
    loopbutton_up.onPress = function(){
    	if (currentSound!==true)
    		mySong.onSoundComplete.start();
    }
    else{ 
        if (currentSound!==false)
    	    mySong.start(0, 100);
    }

  2. #2
    Join Date
    Dec 2009
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hello
    what exactly are you trying to do. are you trying to fast-forward the song while playing or jump to a particular section while playing.
    please try and explain.

  3. #3
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Dear,

    Have a look at:
    http://www.kennybellew.com/tutorial/how_to_start.htm

    It is very useful.

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
  •