🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.programy.flash-5
Article #520

Re: Fading music after completed preload

#520
From: Mrc
Date: Wed, 09 Jan 2002 13:17
34 lines
1860 bytes
"P.W. te Lintel Hekkert" <peter.te.lintel.hekkert@planet.nl> wrote in
message news:a1hbns$r3b$1@reader06.wxs.nl...
> Hello!
>
> The more I have made with flash. the more new questions I have :-)
>
> I want to preload a movie and during the preload a song is playing. When
the
> loading is done I don't just want the music to stop but gently fade away.
> How can I achieve such a thing? Because loading times are different for
> visitors, I can't just put a fade after, let's say loop 4 or 5. I think I
> need a piece of actionscript...... do I ?
>
> I hope you can help me!
>
>
> Greetz,
>
> Peter :-)
>
>

You have to use Sound object.
Define object and start play it in loop. (default sound volume is 100)
when loading is finished run two-frames loop.
In first frame
    x=x-1
    soundobject.volume(x).
in second frame: .
    if (x==0) {sound is off, continue play movie}
        else {gotoAndPlay(first frame)}

Mrc
Technical Details
Message-ID: <a1hfsq$bm4$1@korweta.task.gda.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!newsfeed.tpinternet.pl!news.task.gda.pl!not-for-mail
References: <a1hbns$r3b$1@reader06.wxs.nl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!newsfeed.tpinternet.pl!news.task.gda.pl!not-for-mail
From: "Mrc" <mrcin1@o2.pl>
Newsgroups: alt.pl.programy.flash-5
Subject: Re: Fading music after completed preload
Date: Wed, 9 Jan 2002 14:17:19 +0100
Organization: CI TASK http://www.task.gda.pl
Lines: 36
Message-ID: <a1hfsq$bm4$1@korweta.task.gda.pl>
References: <a1hbns$r3b$1@reader06.wxs.nl>
NNTP-Posting-Host: pc195.gdansk.sdi.tpnet.pl
X-Trace: korweta.task.gda.pl 1010582235 11972 213.76.209.195 (9 Jan 2002 13:17:15 GMT)
X-Complaints-To: abuse@news.task.gda.pl
NNTP-Posting-Date: Wed, 9 Jan 2002 13:17:15 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit