List Info

Thread: help: loading sound from flv




help: loading sound from flv
country flaguser name
France
2007-02-23 03:28:42
Hi,
 
I'm using mtasc and swfmill to try to load up a sound saved as .flv and what I get is that the sound plays, but the Sound Object I'm trying to build remains empty, here is my code.
 
Thanks very much for any clue.
 
Raphael
 
    _root.attachMovie("VideoDisplay", "VideoDisplay",_root.getNextHighestDepth());
    nc = new NetConnection();
    nc.connect(null);
    ns = new NetStream(nc);
    _root["VideoDisplay"]["vid"].attachVideo(ns);
  ;  ns.play("test.flv");
    var flv_mc:MovieClip;
    ;_root.createEmptyMovieClip("flv_mc", _root.getNextHighestDepth());
  ;  flv_mc.attachAudio(ns);
    this._sound = new Sound(flv_mc);
   ; _root.createTextField("txt2", _root.getNextHighestDepth(), 0, 0, 100, 22);
    _root.txt2.text = "length : " + this._sound.duration; 
 
The length is always displayed as "undefined"
 
Re: help: loading sound from flv
country flaguser name
Germany
2007-02-23 03:48:38
hi there,

first of all: why do you want to use flv for audio? why dont
you just
use mp3? but anyways... you have build a variable named
flv_mc, but
forgotten to assign any content to it.

>     var flv_mc:MovieClip;
>     _root.createEmptyMovieClip("flv_mc",
_root.getNextHighestDepth());

maybe thats it.

greets,
jan eric

-- 
MTASC : no more coffee break while compiling

Re: help: loading sound from flv
country flaguser name
France
2007-02-23 03:55:30
Hi Eric, Thank you for your fast mail.

What kind of content shall I attach to it?
is not "flv_mc.attachAudio(ns);" enough?

I need to be able to read .flv back since I'm using red5 to
recorder audio 
onto my server and want to play it back. The only format
supported by Red5 
is flv.

Thanks a lot

Raphaël

    _root.attachMovie("VideoDisplay", 
"VideoDisplay",_root.getNextHighestDepth());
    nc = new NetConnection();
    nc.connect(null);
    ns = new NetStream(nc);
   
_root["VideoDisplay"]["vid"].attachVideo
(ns);
    ns.play("test.flv");
    var flv_mc:MovieClip;
    _root.createEmptyMovieClip("flv_mc",
_root.getNextHighestDepth());
    flv_mc.attachAudio(ns);
    this._sound = new Sound(flv_mc);
    _root.createTextField("txt2",
_root.getNextHighestDepth(), 0, 0, 100, 
22);
    _root.txt2.text = "length : " +
this._sound.duration;


----- Original Message ----- 
From: "jannerick" <ayegmx.at>
To: "MotionTwin ActionScript2 Compiler List"
<mtasclists.motion-twin.com>
Sent: Friday, February 23, 2007 10:48 AM
Subject: Re: [mtasc] help: loading sound from flv


> hi there,
>
> first of all: why do you want to use flv for audio? why
dont you just
> use mp3? but anyways... you have build a variable named
flv_mc, but
> forgotten to assign any content to it.
>
>>     var flv_mc:MovieClip;
>>     _root.createEmptyMovieClip("flv_mc",
_root.getNextHighestDepth());
>
> maybe thats it.
>
> greets,
> jan eric
>
> -- 
> MTASC : no more coffee break while compiling
>
> 


--
MTASC : no more coffee break while compiling

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )