SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member Macguiver's Avatar
    Join Date
    Feb 2004
    Location
    Orlando, Fl
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sounds + Actions

    what actions script do i need to put in to make a next-track button and previous-track button change songs?

  2. #2
    always learning . . .
    Join Date
    Nov 2003
    Location
    UK
    Posts
    821
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when you create a sound object just make sure you make the new loaded song your var currentSong then always start and play this etc!

  3. #3
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    how are you playing your sound files? Placing them on the timeline or loading it through actionscript?

    If you are placing them on timeline, then make a sound library. Its an movie clip in which you place all your sounds. Place only one sound on a layer & place next sound on a frame on which no other sound has been placed.
    Make a layer named actions to place actions on this layer. Place stop() action on every keyframe(you place your sound on keyframes only).
    Place this library on main scene & you can play sounds like
    Code:
    _root.soundLib.gotoAndPlay(1);
    To play the next track, you place the action
    Code:
    _root.soundLib.nextFrame();
    To play previous track, you place actions
    Code:
    _root.soundLib.prevFrame();

    If you are using actionscript to create a sound object & then attaching sound from library or loading a new sound, then create an array & place all sound names & references(if using attach sound) or sound file names(if loading sound files) in it.
    Then you can attach/load sounds by just changing the parameters you pass to the respective functions.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  4. #4
    SitePoint Member Macguiver's Avatar
    Join Date
    Feb 2004
    Location
    Orlando, Fl
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I still need help in this area the code is not working. can anyone help me with this please?

  5. #5
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you still didn't get it then I'd suggest that you grab some tutorials for Flash Beginners & practice some basic stuff first. Get the hang of it & then if you look at my post & follow it, you will surely be able to get it.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  6. #6
    For Those About To Rock...
    Join Date
    Apr 2004
    Location
    maryland
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    check out a book on flash.

  7. #7
    SitePoint Member Macguiver's Avatar
    Join Date
    Feb 2004
    Location
    Orlando, Fl
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks alot

    I figured it out but just examining the code and the actionscripts. thanks again.

  8. #8
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    ok, no problem.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!


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
  •