[swfmill] Loading an mp3 embedded as sound
Don-Duong Quach
geekrelief at gmail.com
Mon Jan 26 13:30:39 PST 2009
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.
I'm targetting Flash 10.
Don Q.
On Mon, Jan 26, 2009 at 1:16 PM, Alex H <swfmill at avbrand.com> wrote:
> Why not just use the Sound.loadSound() method, which can load an mp3
> directly?
>
> -alex
>
> Don-Duong Quach wrote:
>
> 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,
> http://www.bytearray.org/?p=175
>
> So I'm stumped as to how to access the mp3 in the loaded swf.
>
>
> On Mon, Jan 26, 2009 at 11:51 AM, Don-Duong Quach <geekrelief at gmail.com>wrote:
>
>> Hi,
>>
>> I'm looking for advice on how I can get access to an mp3 I've embedded
>> into a swf with swfmill.
>>
>> Here's my sound.xml file:
>>
>> 1 <?xml version="1.0" ?>
>> 2 <movie framerate="10" height="300" width="400">
>> 3 <library>
>> 4 <sound id="Step" import="music/Tech_Step_Break.mp3"/>
>> 5 </library>
>> 6 <frame>
>> 7 <place id="Step"/>
>> 8 </frame>
>> 9 </movie>
>>
>> I used this command to generate the swf: swfmill simple sound.xml step.swf
>>
>> 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:
>>
>> e.target.applicationDomain.getDefinition("Step") as Class;
>>
>> But I get an error that Variable Sound is not defined. I don't know how
>> to get access to the sound / mp3.
>>
>> I'm using mental's repo which has mp3/wav support.
>> http://github.com/mental/swfmill/tree/master
>>
>> Thanks,
>> Don Q.
>>
>
> ------------------------------
>
> _______________________________________________
> swfmill mailing listswfmill at osflash.orghttp://osflash.org/mailman/listinfo/swfmill_osflash.org
>
>
> _______________________________________________
> swfmill mailing list
> swfmill at osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/swfmill_osflash.org/attachments/20090126/e2955060/attachment.html>
More information about the swfmill
mailing list