[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] sound with rfxview
From: |
Matthias Kramm |
Subject: |
Re: [Swftools-common] sound with rfxview |
Date: |
Tue, 11 Nov 2008 18:51:16 +0100 |
User-agent: |
Mutt/1.5.6i |
On Sat, Nov 08, 2008 at 07:55:15AM +0700, John Francis Lee <address@hidden>
wrote:
> I have a series of nice little .swf's I made with Matthias' help from
> .pdf's using pdf2swf. I've figured out how to add the rfxview.swf to
> them to turn their pages using swfcombine. What I would like to do now
> is to add sound, and have the sound go with the pages.
>
> The pdf's are just pages with pictures of objects with their names. The
> sounds will be the pronunciation of those names.
So for every page, you want to play a sound?
Well, for a quick solution/hack, I guess you can change
rfxview.sc to do that.
Change this function:
setPageNr = function() {
et.text = " "+pagenr+" / "+swf._totalframes;
swf.gotoAndStop(pagenr);
};
to something like this:
setPageNr = function() {
et.text = " "+pagenr+" / "+swf._totalframes;
if(pagenr==1) {
sound1.play();
} else if(pagenr==2) {
sound2.play();
} else if(pagenr==3) {
sound3.play();
}
swf.gotoAndStop(pagenr);
};
and also add the sounds you want to play at the start of the file:
.sprite sound1
.sound s1 filename="Page1Sound.wav"
.stop
.frame
.play s1
.end
.put sound1
.sprite sound2
.sound s1 filename="Page2Sound.wav"
.stop
.frame
.play s2
.end
.put sound2
... etc ...
Greetings
Matthias