in

Quark Forums

MP3 Player - Hopefully simple question

Last post 05-05-2009 9:13 AM by Matthias Guenther (Quark). 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 04-30-2009 3:50 AM

    MP3 Player - Hopefully simple question

    I've got some MP3s that I am playing. They are defined as Track1, Track2 etc. I wanted to set up a Play Button and previous track / next track buttons. I'm trying to write a script that says "if Track1 is playing, Stop Track1 and Play Track2; if Track2 is playing, stop Track2 and Play Track3, etc etc. If I use Control>If>Sound>Track1>is Playing, the script doesn't work - how can I set up an audio player that will sequentially play MP3s from a folder and also allow Play / Pause / Prev and Next functions? thanks
  • 05-04-2009 12:44 AM In reply to

    Re: MP3 Player - Hopefully simple question

    Hi, Easybourne,

    so you want automatic forward and manual "skip" basically?

    You can't handle that with one script, as the first script needs to wait until the sound playing is finished and the second script (the skip) skips forward regardless whether the playing sound is finished or not.

    Or even easier, if this can be its own SWF (so its own layout), you could make it really simple with pages by creating a layout that has 5 pages (if you have 5 songs). Each start script (for each page) plays one song, waits until song is idle and then goes to next page. A button on each page (so masterpage) goes to next page. You'll also need a stop script for each pageto stop all sounds.

    Does that help?

    Best
    Matthias

    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling frequently, answering your post might sometimes take longer)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need help? Contact Quark's support: http://support.quark.com/contact_us.html


    Please don't install the newest update 10.7.3 of Mac OS X Lion yet.
    For details please see here: http://goo.gl/AzKeR

  • 05-05-2009 5:33 AM In reply to

    Re: MP3 Player - Hopefully simple question

    Hi Matthias,

    Thanks again for your help. I'm trying your second suggestion, but I have some trouble.

    The page auto advances and correctly plays the tracks in sequence. But I can't get the 'skip' to work properly. When the skip advances to the next page it seems to be playing more than one audio at the same time. - It seems that when I use the skip function, the 'stop sound all' doesn't work.

    My page entry script looks like this: Stop Sound All, 0 > Play Sound Track01 > Delay Until Sound Idle, Track01 > Display Next Page. Then page 2 would have the same script except Track02 would be the audio for that page.

    Should I attach the 'Stop Sound All' function to the button instead of the page entry script?

     Thanks

  • 05-05-2009 6:07 AM In reply to

    Re: MP3 Player - Hopefully simple question

    Hi, Easybourne,

    I just tried the same script as you described and it works for me.

    Are you using fades (I didn't)? Are you using external references for the sounds (I did)?

    Yes, you can either use the stop action for the button OR use it as a Page exit script, all three methods should work.

    Best
    Matthias

    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling frequently, answering your post might sometimes take longer)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need help? Contact Quark's support: http://support.quark.com/contact_us.html


    Please don't install the newest update 10.7.3 of Mac OS X Lion yet.
    For details please see here: http://goo.gl/AzKeR

  • 05-05-2009 6:21 AM In reply to

    Re: MP3 Player - Hopefully simple question

     Something very odd is happening to mine. When I click on the Skip button it seems to skip forward and back two pages and then back one.

     If I am on page 1 and I press skip, it jumps to page 3 and then very quickly back to page 2 something is interfering with the goto next page, but I can't see where.

    I'm using external references and I'm not using any fades.

     I have an object (on Master Page) with the following event attached: User Event:Click Up, Action: Display Next Page

    The page entry script is Stop Sound: All, Play Sound [Track Name], Delay until Sound Idle [Track Name], Display Next Page

    It seems logical and correct when written as above, but for some reason refuses to work.

    Do you know what could be causing this?

     Thanks again

     

  • 05-05-2009 6:35 AM In reply to

    Re: MP3 Player - Hopefully simple question

    Not sure.

    Maybe the "until idle" delay is released (as you stopped all songs) and then the Action Next Page is applied plus the next page action of the button? Doesn't happen with me. Do you click long?

    What I would do:
    Create a script "Stop all Scripts" and make that the Exit Script of EACH page.

    That makes sure that nothing runs anymore when you enter the next page.

    Does that help?

    Best
    Matthias

     

    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling frequently, answering your post might sometimes take longer)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need help? Contact Quark's support: http://support.quark.com/contact_us.html


    Please don't install the newest update 10.7.3 of Mac OS X Lion yet.
    For details please see here: http://goo.gl/AzKeR

  • 05-05-2009 8:40 AM In reply to

    Re: MP3 Player - Hopefully simple question

    The "Stop All Scripts" has helped, but I still have other problems. Things don't seem to work as they should with the play pause button now. When I pause the sound, it skips to the next track (presumably because of the "Delay until End of Sound" part of the page entry scripts. Does this seem right to you?

     I've uploaded it to http://www.godsend.org.uk/integrity/TheDoor/DoorECard.htm maybe you could have a look and see what it is I'm trying acheive - much easier than trying to explain the whole thing step by step! (I've temporarily disabled the Play/Pause button and the Previous Track Button, and various other parts aren't fully functional yet either)

    Thanks again.

  • 05-05-2009 9:13 AM In reply to

    Re: MP3 Player - Hopefully simple question

    Hi, Easybourne,

    except that sometimes a click seems to be ignored, it works fine for me.

    Can you please send me the project = QXP (via email)?

    Thanks
    Matthias

    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling frequently, answering your post might sometimes take longer)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need help? Contact Quark's support: http://support.quark.com/contact_us.html


    Please don't install the newest update 10.7.3 of Mac OS X Lion yet.
    For details please see here: http://goo.gl/AzKeR

Page 1 of 1 (8 items)
Powered by Community Server (Commercial Edition), by Telligent Systems