I was able to get the Sound to play from the swf, but it's a bit of a hack at this point. I don't know if it's possible with swfmill by itself because I didn't see any output for the DoABCDefine tag.<br><br>
So I ran a swf, generated by cs4, with an embedded Sound through swfmill's swf2xml and noticed the output had a lot more tags. I removed the data from that, turning the xml into a template. Took swfmill's mp3 data output and pasted it into the template to generate the swf.<br>
<br>Now I'm able to dynamically load the swf. I create a haxe/neko utility that interacts with swfmill to take in an mp3 and generate the swf. I have a repo of my code up here: <a href="http://github.com/geekrelief/mp3swfembedder/tree/master">http://github.com/geekrelief/mp3swfembedder/tree/master</a><br>
<br>I might circle back sometime later and add the capability into swfmill, but this works well enough for now.<br><br>-Don Q.<br><br><div class="gmail_quote">On Mon, Jan 26, 2009 at 1:30 PM, Don-Duong Quach <span dir="ltr"><<a href="mailto:geekrelief@gmail.com" target="_blank">geekrelief@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">That's not supported in Actionscript 3, but also because I want to stream the swf over a socket connection instead of http. The idea is to pack an mp3 into a swf, send it over the socket, load it in with Loader.loadBytes, cast to Sound and then play. <br>
<br>I'm targetting Flash 10.<br><br>Don Q.<div><div></div><div><br><br><div class="gmail_quote">On Mon, Jan 26, 2009 at 1:16 PM, Alex H <span dir="ltr"><<a href="mailto:swfmill@avbrand.com" target="_blank">swfmill@avbrand.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
Why not just use the Sound.loadSound() method, which can load an mp3
directly?<br>
<br>
-alex<br>
<br>
Don-Duong Quach wrote:
<blockquote type="cite"><div><div></div><div>I tried replacing the sound tag with clip, per a post by
Robin Palotai, I found on the haxe list. But as I suspected there's no
class definition in the swf. At least SWFExplorer doesn't show
anything, <a href="http://www.bytearray.org/?p=175" target="_blank">http://www.bytearray.org/?p=175</a>
<br>
<br>
So I'm stumped as to how to access the mp3 in the loaded swf.<br>
<br>
<br>
<div class="gmail_quote">On Mon, Jan 26, 2009 at 11:51 AM, Don-Duong
Quach <span dir="ltr"><<a href="mailto:geekrelief@gmail.com" target="_blank">geekrelief@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
I'm looking for advice on how I can get access to an mp3 I've embedded
into a swf with swfmill.<br>
<br>
Here's my sound.xml file:<br>
<br>
1 <?xml version="1.0" ?><br>
2 <movie framerate="10" height="300" width="400"><br>
3 <library><br>
4 <sound id="Step" import="music/Tech_Step_Break.mp3"/><br>
5 </library><br>
6 <frame><br>
7 <place id="Step"/><br>
8 </frame><br>
9 </movie><br>
<br>
I used this command to generate the swf: swfmill simple sound.xml
step.swf<br>
<br>
And I'm trying to load step.swf into my app dynamically with Loader.
When the swf completes loading, I want to be able to access the Sound
instance in Actionscript 3 (flash 10) so I try to call:<br>
<br>
e.target.applicationDomain.getDefinition("Step") as Class;<br>
<br>
But I get an error that Variable Sound is not defined. I don't know
how to get access to the sound / mp3.<br>
<br>
I'm using mental's repo which has mp3/wav support. <a href="http://github.com/mental/swfmill/tree/master" target="_blank">http://github.com/mental/swfmill/tree/master</a>
<br>
<br>
Thanks,<br>
Don Q.<br>
</blockquote>
</div>
<br>
</div></div><pre><hr size="4" width="90%">
_______________________________________________
swfmill mailing list
<a href="mailto:swfmill@osflash.org" target="_blank">swfmill@osflash.org</a>
<a href="http://osflash.org/mailman/listinfo/swfmill_osflash.org" target="_blank">http://osflash.org/mailman/listinfo/swfmill_osflash.org</a>
</pre>
</blockquote>
</div>
<br>_______________________________________________<br>
swfmill mailing list<br>
<a href="mailto:swfmill@osflash.org" target="_blank">swfmill@osflash.org</a><br>
<a href="http://osflash.org/mailman/listinfo/swfmill_osflash.org" target="_blank">http://osflash.org/mailman/listinfo/swfmill_osflash.org</a><br>
<br></blockquote></div><br>
</div></div></blockquote></div><br>