Hi,
I made a patch to add Exportname to a sound inserted with :
.sound nameofsound soundfile.wav
With this it can called via actionscript, only need to add in a main
actionscript :
monSon = new Sound();
monSon.attachSound("nameofsound");
and
monSon.Start(); in button for example.
See example here :
http://technoargia.free.fr/swftools/examples/sound/embed_sound.html
Clic on speaker and it should work...
Laurent
Ps for Matthias :
I'm not sure if my patch is very clean, can you verify ?
*******************************************************
--- swfc.c 2006-04-13 16:13:22.000000000 +0200
+++ swfc_new.c 2006-04-13 16:19:42.000000000 +0200
@@ -1270,6 +1270,14 @@
sound = (sound_t*)malloc(sizeof(sound_t)); /* mem leak */
sound->tag = tag;
sound->id = id;
+ tag = swf_InsertTag(tag, ST_NAMECHARACTER);
+ swf_SetU16(tag, id);
+ swf_SetString(tag, name);
+ tag = swf_InsertTag(tag, ST_EXPORTASSETS);
+ swf_SetU16(tag, 1);
+ swf_SetU16(tag, id);
+ swf_SetString(tag, name);
+
if(dictionary_lookup(&sounds, name))
syntaxerror("sound %s defined twice", name);
_______________________________________________
Swftools-common mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/swftools-common