Announcement

Collapse
No announcement yet.

The Trouble with Trebles...

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

  • Lorne
    replied
    Re: The Trouble with Trebles...

    No problem. I'm glad it worked out. [img]/ubbthreads/images/icons/smile.gif[/img]

    "With AutoPlay, there is always a way." (tm)

    Leave a comment:


  • Derek
    replied
    Re: The Trouble with Trebles...

    "There are...other companies who would like to mimic our success"

    ... of course! Hadnt even thought of that. Didnt really expect any info, was just asking coz i could. [img]/ubbthreads/images/icons/smile.gif[/img] I'll wait (im)patiently like the rest [img]/ubbthreads/images/icons/frown.gif[/img]

    Leave a comment:


  • Lorne
    replied
    Re: The Trouble with Trebles...

    Sorry Derek, I can't say anything. It just doesn't make sense for us to lay our cards out on the table until we're ready to play our hand. (There are...other companies who would like to mimic our success.)

    As for when...we will release the next version when it's ready, and not one day sooner. [img]/ubbthreads/images/icons/smile.gif[/img] We're putting a LOT of work into this puppy, so don't expect it for a while yet.

    You're right, btw...I'm constantly biting my tongue to keep from talking about the new features. Sometimes I'm about to answer "oh man, that's SO easy, just..." and then I realize I'm thinking in 5.0 mode.

    In the mean time, rest assured that we're working our butts off. [img]/ubbthreads/images/icons/smile.gif[/img]

    Leave a comment:


  • Tezcatlipoca
    replied
    Re: The Trouble with Trebles...

    Hurruh! It now behaves exactly as it should. Thanks, Lorne. Much appreciated.

    Leave a comment:


  • Derek
    replied
    Re: The Trouble with Trebles...


    Incidentally, this is something we plan to address in version 5.0
    I KNOW you want to give us some hints on whats likely to be new in v5 ... so go ahead! [img]/ubbthreads/images/icons/smile.gif[/img]
    [We know you hate this question, but ... ]
    Will be ready in [roughly roughly .. best guess] how many days?????

    Leave a comment:


  • Lorne
    replied
    Re: The Trouble with Trebles...

    I think WAVs are all played in the same channel. If you want the sounds to "mix" like that, you need to convert the sound to an MP3, and play it using MP3 - Play instead. I'm pretty sure MP3s and WAVs can mix, because they use two different audio channels.

    Incidentally, this is something we plan to address in version 5.0. The audio technology we used in version 4.0 didn't allow the same kind of mixing options, and although it's technically possible to do it on some hardware, such capabilities are definitely not universal, and we opted for compatibility instead.

    Leave a comment:


  • Tezcatlipoca
    replied
    Re: The Trouble with Trebles...

    That bit now works perfectly, but I'm back to square one on the other problem.
    Basically, I couldn't get both the WAV file and the WAVs attached to the buttons to play at the same time, so when a user started the program and scrolled over a button, the WAV cut dead. I solved it by embedding a Media Browser object on the page, and pointing it at the WAV.

    With this taken out, your code inserted, and a command to play a WAV. It nows plays once on the first startup as it should do, but suffers from the same problem with cutting out if another WAV is played. If I use your code, the preview runs an error message saying it can't find the sound file (which it can), it then loads, plays the sound without cutting the other sound files, but then plays everytime a user goes to the main menu.

    Am I right in thinking the Autoplay software isn't able to allow you to play one sound at startup only, but one which will not cut out suddenly if the user causes another sound (such as clicking a button) to cut is dead?

    Leave a comment:


  • Lorne
    replied
    Re: The Trouble with Trebles...

    Don't put that in the IF action.

    All you put in the IF action is "! %sound_has_played%" (without the quotes).

    Here -- copy and paste this XML into your action list. Note that you will have to add an action to actually play your WAV, but you already know how to do that.

    <IR_ACTIONS_LIST>
    <Action name="IF">
    <Type>200</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Condition>! %sound_has_played%</Condition>
    </Action>
    <Action name="Comment">
    <Type>202</Type>
    <Function>2</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Comment>Insert your action to play the WAV file BELOW this line</Comment>
    </Action>
    <Action name="Comment">
    <Type>202</Type>
    <Function>2</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Comment>Insert your action to play the WAV file ABOVE this line</Comment>
    </Action>
    <Action name="Set Value">
    <Type>6</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%sound_has_played%</Variable>
    <Value>true</Value>
    <Evaluate>0</Evaluate>
    </Action>
    <Action name="END IF">
    <Type>201</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    </IR_ACTIONS_LIST>

    Once you've pasted that into your action list, you should see something that looks like this:

    <pre>IF (! %sound_has_played%)
    // Insert your action to play the WAV file BELOW this line
    // Insert your action to play the WAV file ABOVE this line
    %sound_has_played% = "true"
    END IF</pre>Now, don't just blindly use this code...open up each action and have a look at how it's made, figure it out so you understand what's going on and can reproduce it on your own. Understanding this little snippet will open the door to making your projects do pretty much anything... [img]/ubbthreads/images/icons/smile.gif[/img]

    Leave a comment:


  • Tezcatlipoca
    replied
    Re: The Trouble with Trebles...

    Ok. I'm going to Page Properties for my main menu screen. I already have a Media Object Browser hidden on the page, that is linked to my sound file.

    I go to OnShow, and enter the following in the Command Structure > IF section:

    IF ! %sound_has_played%
    MediaPlayerObject[sound].Play
    %sound_has_played% = TRUE
    END IF

    I now can't click OK, since an error box tells me that 'Values must be separated by operators'. What am I doing wrong?

    Leave a comment:


  • Lorne
    replied
    Re: The Trouble with Trebles...

    A bit more help for 'ya:

    To do this, you'll need to use 4 actions, in this order:

    IF
    WAV - Play
    Variable - Set Value
    END IF

    In the IF, put this text:

    <font color=green>! %sound_has_played%</font color=green>

    In the Variable - Set Value action, change the variable name to <font color=green>%sound_has_played%</font color=green>, and use this text for the value:

    <font color=green>true</font color=green>

    That's it.

    Leave a comment:


  • Lorne
    replied
    Re: The Trouble with Trebles...

    You can't...at least not directly. That's just pseudo-code. Read it to get the gist of what you need to do.

    Basically, you use a variable (I called it %sound_has_played% but you can call it whatever you want) that gets set to TRUE the first time the sound plays. And, you use an IF statement to only play the sound if that variable is not TRUE. (The ! operator means "not".)

    The pseudo-code reads like this: "if %sound_has_played% is not true, then play the sound, and set %sound_has_played% to true."

    With a little help from the user's guide, you should be able to figure it out from there. [img]/ubbthreads/images/icons/smile.gif[/img]

    Leave a comment:


  • Tezcatlipoca
    replied
    Re: The Trouble with Trebles...

    ummm...ok, but how do I get that code from the screen to my project? I don't see any option for inserting code, and Copy/Paste doesn't work.

    Leave a comment:


  • Lorne
    replied
    Re: The Trouble with Trebles...

    Don't need registry keys, unless you only want it to play the first time the user ever runs your application (and never again, even if they exit and run it again).

    If you jsut want to keep it from happening more than once in a single "session," then just set a variable to "true" the first time, and only play the sound if that variable is false.

    <pre>IF(! %sound_has_played%)
    // insert action to play sound here
    %sound_has_played% = true
    END IF</pre>

    Leave a comment:


  • Tezcatlipoca
    replied
    Re: The Trouble with Trebles...

    Just one quick point. I've noticed that the mp3 (or wav) now plays as I want it to, but because I've set it to the OnShow criterea, it plays every time I navigate to that page (i.e. go back to the main menu). What I want is for it to play once at the very first startup and that's it. Another thread hints that I can use registry keys to do this, but I have no idea how to go about writing the coding to do this. Any suggestions?

    Leave a comment:


  • Tezcatlipoca
    replied
    Re: The Trouble with Trebles...

    Thanks all, works perfectly now. On the mp3 format front, I could convert the .wav to an .mp3 I suppose. I hadn't considered it. Is there any advantage to doing so?

    Leave a comment:

Working...
X