You would need to provide a lot more information than you've given for us to help you.
To start: Version of InDesign? Operating system? What do you mean by "music is not playing in the right parts"? What file format for the sound file? What PDF reader are you using to view the document? What settings in the Media panel did you use?
Can you tell I am a student. The version I am using for InDesign is CC 2015, my system is Windows 8.1 with 64 bit operating system. The format for the music file is MP3. I am trying to publish to web, which is an option for my program. When I view with SWF it looks and sounds. When I go to view the uploaded document when I click on my buttons that I created, one for go to first page, the next is (from left) go to previous page, the third go to next page, the last go to last page. The buttons are on all of the pages except the second page, table of contents page which I created interactive buttons to take you to each chapter and sub chapter. (music still plays on all pages) I first had applied the music on first page, all buttons only. When I noticed that the music was only played on the first and previous buttons. When I went to export as interactive pdf...I had gotten an error message of "the go to page button action is not supported in Pdf, would this have something to do with the issue? I since then decided to remove the sound on first page buttons, first and previous page because the music flowed better when viewing the document in swf. I tried to publish on web with update current document but, it never made the changes. Then I tried uploading new document and renaming the previous document to see if that helped but, then I continue to get upload failed try again later. Can you tell me how to correct the problem. I also tried to include using the H.264 a video of flames that I created to try and remove the black background and have flames with the transparent background but, that too is giving me difficulty. I am created the moving graphics in photoshop CC 2014, can you advise me on this issue as well.
SWF preview does not give a preview of an interactive PDF. Totally different kind of output. The only way to test is to open your PDF in Adobe Reader or Adobe Acrobat.
You need to learn what's different between the different output modes. They have advantages and disadvantages. Different capabilities—for example, with buttons—between PDF, SWF and EPUB.
I can't possibly cover all the things you'd need to know. I strongly recommend a very good book which covers the different kinds of output: