Announcement

Collapse
No announcement yet.

MP3 pause and start when i leave the page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MP3 pause and start when i leave the page

    I would like to know how to start and pause a mp3 as i got to one page to the next that way when i return to a page the mp3 to that page picks up were it left off?????

  • #2
    Re: MP3 pause and start when i leave the page

    You could use an MP3 > GET PROPERTY > PROGRESS action to store the current MP3 playhead location into a variable, i.e. %timeMarker% and then all you have to do when they return to the page is use an MP3 > SEEK action to restore the playhead to that %timeMarker% marked position and then an MP3 > PLAY action to let 'er rip...

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: MP3 pause and start when i leave the page

      not to sure how to do that? could you write that out for me???
      Thanks

      Comment


      • #4
        Re: MP3 pause and start when i leave the page

        Nope, sorry. Roll up your sleeves and get in there... It's all explained very well there and it's all easy stuff... [img]/ubbthreads/images/icons/smile.gif[/img] Besides it's fun. [img]/ubbthreads/images/icons/smile.gif[/img] Who knows, maybe someone else will build it for you and post it????

        BTW I noticed you sent me an email notfiying me of your post here after I had already answered it. Two thing please:

        1. Check to see if an answer was posted before sending anybody an email about a post.

        2. Sending me an email with a link to your post doesn't speed up the process of getting an answer.

        Thanks...

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment


        • #5
          Re: MP3 pause and start when i leave the page

          sorry about that wont happen again

          Comment


          • #6
            Re: MP3 pause and start when i leave the page

            No probs...

            Corey Milner
            Creative Director, Indigo Rose Software

            Comment


            • #7
              Re: MP3 pause and start when i leave the page

              i tried it but had no luck with it i dont think im putting everything in the right place..

              Comment


              • #8
                Re: MP3 pause and start when i leave the page

                OK, no problem, I can help. Post the details of what you did and where it went wrong and I'll be happy to get you back on track right away...

                Corey Milner
                Creative Director, Indigo Rose Software

                Comment


                • #9
                  Re: MP3 pause and start when i leave the page

                  Jumping in and getting dirty is a great way to learn AMS. It is relatively easy once you get your head around it, as they say in the marketing department here.

                  On the button that is used to leave the page you will want to make sure that you store some variables for that page that show where in the MP3 you were when you left. You might even want a flag variable that shows that you have left the page and come back to that the MP3 does not start automatically when the page reloads but startes at the appropriate place.

                  for the button to leave the page, I would have some of the following actions

                  %TimeMeter% = MP3.GetProperty ("Progress")
                  MP3.Pause
                  Page.Jump ("Page 2")
                  %PageJump% = "TRUE"

                  This will get the current position and then pause the mp3 then jump to page 2

                  When the page loads or reloads I would have it check to see if page jump did occur and if it did then seek to the marked time and then play. Something like this

                  MP3.Load ("%SrcDir%\MyMP3\page1.mp3")
                  <font color=blue>IF (%PageJump% = TRUE)</font color=blue>
                  MP3.Seek (%TimeMeter%)
                  <font color=blue>END IF</font color=blue>
                  MP3.Play
                  TJ-Tigger
                  "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                  "Draco dormiens nunquam titillandus."
                  Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                  Comment


                  • #10
                    Re: MP3 pause and start when i leave the page

                    how do i put in the %PageJump% = "TRUE" i cant seem to find it :?

                    Comment


                    • #11
                      Re: MP3 pause and start when i leave the page

                      Nevermind LOL

                      Comment


                      • #12
                        Re: MP3 pause and start when i leave the page

                        all right i tryed trust me i tryed several ways but every time i get the same thing the mp3 starts all over it like it no reading the veriable

                        Comment


                        • #13
                          Re: MP3 pause and start when i leave the page

                          OK the progress needed to be parsed into seconds. here is what I did.

                          %Hrs% = String.GetDelimitedString ("%Marker%", ":", 0)
                          %Hrs% = Evaluate (%Hrs% * 3600)
                          %Mins% = String.GetDelimitedString ("%Marker%", ":", 1)
                          %Mins% = Evaluate (%Mins% * 60)
                          %Secs% = String.GetDelimitedString ("%Marker%", ":", 2)
                          %Marker% = Evaluate (%Hrs% + %Mins% + %Secs%)
                          MP3.Seek (%Marker%)
                          MP3.Play
                          TJ-Tigger
                          "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                          "Draco dormiens nunquam titillandus."
                          Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                          Comment


                          • #14
                            Re: MP3 pause and start when i leave the page

                            how did you get the evaluate command??????

                            Comment


                            • #15
                              Re: MP3 pause and start when i leave the page

                              When you set a variable, there is a checkbox for the "Evaluate value as expression"
                              TJ-Tigger
                              "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                              "Draco dormiens nunquam titillandus."
                              Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                              Comment

                              Working...
                              X