[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] Accessing swfc sound objects
From: |
Jens Stolze |
Subject: |
Re: [Swftools-common] Accessing swfc sound objects |
Date: |
Sun, 09 Apr 2006 22:50:45 +0200 |
User-agent: |
Mail/News 1.5 (X11/20060228) |
Andrew Mathis wrote:
> When I create a sound in swfc with ".sound", how can I access it with
> ActionScript? Specifically, I would like to be able to access
> Sound.onSoundComplete(). In other words, if I do something like ".sound
> sound1 LocoStart.wav", how can I set "sound1.onSoundComplete" with
> ActionScript?
>
> Also, is there any way to include swfc commands (like .play) within
> ActionScript blocks? Or to create ActionScript functions with swfc
> commands?
Hi Andrew,
look unto my program (pressing a button - playing a sound). I tried a
lot, but only the way converting first my wav-file to swf works.
cu, Jens Stolze
# ---------- beispiel-button-sound.sc ---------------------------
.flash bbox=700x400 name="beispiel-button-sound.swf" compress
.circle knopfnormal r=22 color=yellow fill=green
.circle knopfdrueber r=20 color=yellow fill=orange
.circle knopfgedrueckt r=18 fill=red
.circle aktiverbereich r=22 fill=black
.swf klang1 "uploads/ruhe-bitte.swf"
# -------------------------------------
.button knopf1
.show knopfnormal as=idle
.show knopfdrueber as=hover
.show aktiverbereich as=area
.show knopfgedrueckt as=pressed
.on_press:
RunSound1();
.end
.end
# -------------------------------------
.put knopf1 x=300 y=100
# Actionscript routines
#
.action:
_root.createEmptyMovieClip("movie1",2);
function RunSound1() {
_root.attachMovie("klang1","movie1",2);
}
.end # End actionscript
.end