Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 11 of 11
  1. #1
    Join Date
    Aug 2005
    Posts
    11

    Problems with Audio

    Hi friends:
    Let me see..... this is my problem.
    In the INTRO page I just put this code in the action OnPreload

    Audio.Load(CHANNEL_BACKGROUND, "AutoPlay\\Audio\\raul di blasio - Chiquitita.ogg", true, true);

    It's works fine!.... but, in another page, I need to "turn stand by" the music, so I use this code in the OnShow action

    Audio.Pause(CHANNEL_BACKGROUND);

    and the music stop!...... ok, fine, but...... I try to "restart" the music usign this code

    Audio.TogglePlay(CHANNEL_BACKGROUND);

    I put this code in a button in the action OnClick but it dosn't work. How can I use the "restart" option? I try to restart, not to start again the music.

    Sorry my grammar. Thanks a lot!!!!!

    Maria Claudia
    begginer and persistent AMS designer

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi. This should work on your button...

    Code:
    Audio.Play(CHANNEL_BACKGROUND);
    Don't forget that when paused is engaged it's still in "play" state, so the toggle will not see that as "stopped" it will see that as "playing but paused". That's why toggle doesn't work to restart a paused song. The song will not restart to the beginning if you "pause then play", it will only do that if you "stop then play". Hope that helps.

  3. #3
    Join Date
    Aug 2005
    Posts
    11
    Hi Corey:
    I try it but it dosn't work. I forgot to tell something: The intro page load the ogg file, but one page put PAUSE this ogg file..... then count 10 seconds and jumpt to another page. This page, the last one, have the button that I try to setup to return the intro page and restart the ogg file.

    Any suggestions?

    Sorry my grammar please

    MC

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi, simply use a flag variable. So on page one in the "OnShow" event add this code:

    if loaded~="true" then
    Audio.Load(CHANNEL_BACKGROUND, "yourfilename.ogg", true, false);
    loaded = "true";
    else
    Audio.Play(CHANNEL_BACKGROUND);
    end
    That will cause it to load the audio from your file on the first page visit, and then simply restart it on all subsequent visits.

  5. #5
    Join Date
    Aug 2005
    Posts
    11
    I understand it, but, I do not like to restart the ogg file every time I jump to page one. I load the ogg file in background channel for this reason. The case is that when I load the page DEMO, this page must be "silent". But when I jump from this page (the DEMO page) to another page, the off file continue playing or restart. But not when I jump any page with the code you show me.

    I hope I make clear, but my grammar is not good I know.

    Sorry if I be "dificult"...... I apreciate your help.

    Thanks a lot!!!!!

  6. #6
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi:

    It will continue if you -> PAUSE then PLAY
    It will restart if you -> STOP then PLAY

    Your choice.

  7. #7
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137

    Bug - Audio Action (still)...

    Rethinking my life... Har! (removed my post)
    Last edited by Intrigued; 08-18-2005 at 10:03 PM.
    Intrigued

  8. #8
    Join Date
    Aug 2005
    Posts
    11
    it's works!!!!!!
    thanks a lot Corey!!!!!!!!!!

    muak!!!!

  9. #9
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Okayyy... then this is not the exact same situation. But, I know it's close.

    (Now, where is that post, probable off the forum by now...)

    Intrigued

  10. #10
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Cool, glad it's working.

    Intrigued, I don't know the status of that one but a workaround is using a flag variable FWIW.

  11. #11
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Well, the post has gone off the end of what is saved here in the forums... so I can't reproduce it, sorry. But, I know there was an outstanding issue with something to do with the need for a Global style setting for the Audio Action(s).

    Oh well... at least there was sucess in this thread!

    Intrigued

Similar Threads

  1. Playing Multiple Audio Files in Sequence
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 6
    Last Post: 08-15-2005, 03:38 PM
  2. audio question
    By mike41 in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 09-03-2004, 02:32 PM
  3. Menu in session2 to play audio tracks in session 1, cd player?
    By MartinUK in forum AutoPlay Menu Studio 3.0
    Replies: 1
    Last Post: 03-20-2002, 05:35 PM
  4. Audio problems
    By Zeratul in forum AutoPlay Menu Studio 3.0
    Replies: 1
    Last Post: 04-03-2001, 09:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts