[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] adding sound with Flash > 6

From: Chris Pugh
Subject: Re: [Swftools-common] adding sound with Flash > 6
Date: Fri, 12 Dec 2008 19:42:39 +0000


Very sincere apologies!  I'm kicking myself hard here for my own
stupidity.   I've just scanned your very long piece of code
again, and only just spotted the very obvious ( now ) error.  The
simple answer?  You have a typo in your code!!




Should read as,


Fix the typo and you're sorted!

I'd imagine that Flash versions 7-10,  and your code it works in all
off them now, are a little more Type particular.  No bad thing,
and something to watch out for in the future.



PS I listened to a little bit of the audio.  This guy has been
watching too much of 'The Matrix' :o)

2008/12/11 Pablo Rodríguez <address@hidden>:
> Thanks for the reply, Chris,
> Chris Pugh wrote:
>>> 2008/12/10 Pablo Rodríguez <address@hidden>:
>>>> Chris Pugh wrote:
>>>> You're not kidding!!    Not only is your script huge, but the
>>>> resulting SWF is to boot!
>>> Thanks for your reply and sorry for the delayed answer.
>>> The presentation is big, since is a real presentation, but it was my
>>> fault
>>> to show this SWF and script, since the issue is much simpler.
>> Just cause it is 'real',  doesn't make it necessarily have to be big ..
>> ;o)
> No doubt that this was the wrong presentation to show as example for what I
> think is at least an issue with sound. But having a presentation with 242
> slides (two of them short movies) and over 30 minutes of voice recording in
> 6.5MB is not that big for me (presentations in video form take usually ten
> times more space).
> As Boo wrote in a previous message, the presentation itself is interesting
>  and it might be worth watching it (the right version is
> http://ousia.justfree.com/frees-as6.swf ;-))
>>>> Are you really sure that,
>>>>  -  using all those 'times[xx]=yyyyy' statements is the right way to go?
>>> I think that is the best way I have to advance slides at a certain
>>> miliseconds. Actually I don't know a better way to do it (I'm afraid I'm
>>> not
>>> a programmer). If you had a better way to do it, I would be pleased if
>>> you
>>> can share it with me.
>> For someone who doesn't consider himself to be a programmer, I'd say
>> you're not doing too badly with your scripting ( what's a programmer
>> anyway? ) .
> I'm afraid I haven't developed that part of the scripting.
>>>> -  embedding such a massive .wav file is sensible?
>>> I embedded the wav file instead of the mp3 file, because swfc compresses
>>> wav
>>> audio with a better compression rate and a smaller output. Otherwise I
>>> couldn't upload the SWF outputs to my website, since my hosting provider
>>> only allows files >8000KB and the files with the mp3 embedded were 8.5MB
>>> in
>>> size.
>> Using loadSound, does not *embed* the mp3 audio file in the swf.  It
>> simply creates a reference to an external file, streamed or otherwise.
> Sorry, I need to have the whole presentation (slides, sound and sync) in one
> file.
>>> Here is a small script that shows the issue.
>>> .flash bbox=800x600 filename="audio-embed.swf" version=7 fps=1
>>> .sound audio "my_life_changed.mp3"
>>> .stop audio
>>> .action:
>>>   snd = new Sound();
>>>   snd.attachSound("audio");
>>> .end
>>> .frame 1
>>>   .action:
>>>       snd.start(snd.position/1000.0,0);
>>>   .end
>>> .frame 2
>>> .end
>>> And the bug seems to be that when Flash version is above 6 and sound is
>>> embedded and stopped as above, when SWF reaches frame 2, it restarts the
>>> sound or the presentation itself.
>> No bug there.  You've stated  *1 frame per second* in the header,
>> right?   The sequence only lasts
>> two frames, so  after two seconds the sequence simply starts again.
> If this is not a bug, this is a change in Flash (or in ActionScript, I don't
> know which one). But it seems to be a "know problem" with Flash versions
> above 6. You had a similar problem not stopping the audio
> (http://lists.gnu.org/archive/html/swftools-common/2008-11/msg00152.html).
> I guess it is actually the same problem. Writing a simple '.stop' after the
> sound embedding doesn't work for me, because it breaks the ActionScript that
> makes slides advance.
> I have some PDF slides and audio file. I have a script that enables syncing
> both in one file (http://ousia.justfree.com/audio-embed.txt, this is a more
> schematic script).
> Before frame 1, sound and an array for slide advance are defined, on frame
> 1, sound starts and in frame 6, the script for slide advance is defined and
> to make it work there is a gotoandPlay(5); (I guess this creates a loop
> between frames 5 and 6 that makes the slides advance, but Matthias will
> explain this better.)
> For some strange reason (or at least unknown to me), Flash 7 files are
> played and looped when "total_frames * fps" has been reached. This does not
> happen when exactly the same file (or at least the same output from "swfdump
> -D presentation.swf") only differing "[HEADER] File version: 6" is played.
> Sorry, but I cannot understand that something is not broken here (or there
> was a deep change in Flash).
>>> This happens if a frame is defined after  Sound.start, no matter whether
>>> it has contents or not. I
>>> happens with both  Flash 7 and 10 for Linux,
>> Actually, no it doesn't.  Here is an example that shows you all works
>> aok, and with 'version=10'
>>       http://www.nordberg.me.uk/swfc_samples/music/
> It works because the script uses the issue that I'm describing to play again
> the music.
> The difficult part here would be that your script would generate a SWF file
> that plays only once (using ".stop audio").
> But even using your approach to my presentation, how many slides should I
> create to avoid the loop before sound has finished? I guess 30 minutes * 60
> secs * 12 fps = 21600 frames (and this may well make the slide advance
> script not work).
> Is there any way to implement what I'm trying in Flash 7 or should I stay
> with Flash 6?
> Thanks for your help,
> Pablo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]