8 messages in com.googlegroups.google-desktop-developerRe: gddSoundStateStopped is Undefined| From | Sent On | Attachments |
|---|---|---|
| Spectralist | 23 Jul 2007 00:57 | |
| Teo [API Guru] | 23 Jul 2007 01:08 | |
| Spectralist | 23 Jul 2007 01:52 | |
| Lahiru [API Guru] | 23 Jul 2007 04:57 | |
| Spectralist | 23 Jul 2007 05:41 | |
| Benjamin [API Guru] | 23 Jul 2007 07:06 | |
| Teo [API Guru] | 23 Jul 2007 07:10 | |
| Spectralist | 23 Jul 2007 07:43 |
| Subject: | Re: gddSoundStateStopped is Undefined![]() |
|---|---|
| From: | Benjamin [API Guru] (code...@gmail.com) |
| Date: | 07/23/2007 07:06:54 AM |
| List: | com.googlegroups.google-desktop-developer |
You are using the audio object in the detailsview. Could you check if the same code works when you use it in the main view ? I think the constants might not be defined in the detailsview. If that is the case you can define them yourself to: var gddSoundStateError = -1; var gddSoundStateStopped = 0; var gddSoundStatePlaying = 1; var gddSoundStatePaused = 2;
Greetings, Benjamin
On Jul 23, 2:41 pm, Spectralist <Kod...@gmail.com> wrote:
Well, this is everything that effects my sound in any real way.
var curSndClip = null; var sndClip = null;
function sndClipUpdate(){ pbarSound.value = event.value;
}
function playClip(sndClipFile){ sndClip = sndClipFile;
if (curSndClip == null) { curSndClip = framework.audio.open(sndClip, onAudioStateChange); //pbarSound.max = sndClip.duration; view.beginAnimation(function() {sndClipUpdate(); }, 0, 100, curSndClip.duration*1000); curSndClip.play();}// if end
else{ curSndClip.stop(); curSndClip = null;
}//else end }//function end
function onAudioStateChange(sndClip, state) {
if (state == gddSoundStateStopped) { curSndClip = null;
} }//function end
But if you want to look at the whole project it's
here:http://kodyac.googlepages.com/DynamicFlashCards.rar
I'm only just getting started so its VERY messy right now. Kinda a
working rough copy. Only even messier. Its going, eventually, to be a
flash card program where the user can create their own flash card
decks, with a picture, sound, and some text possible on each card. To
see the problem click the Deck Manager button, select "test card a" in
the listbox and click a little purple speaker icon near the bottom
right of the details view.




