A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: RECORDING voice appl

  1. #1
    Senior Member
    Join Date
    Sep 2000
    Location
    Hyderabad, AP, INDIA
    Posts
    131

    RECORDING voice appl

    Hello all,

    Am stuck with a problem that by all accounts is insurmountable.
    But is anything impossible in flash??..(except maybe getting back to macromedia?)..ahem...anyway..
    I'm making an application that has to record voice.

    After a lot of searching found the attached fla that almost does it. The place i got it from said i have to change attachVideo to attachAudio. But it does'nt work.

    I cannot use communication server as this appl. is meant for standalone distribution...
    So anyone anywhere??..HELP!
    The code on frame 1 is:
    //#include "NetDebug.as"

    // Attach the video device output from 'client_cam'
    // to the 'Live_video' video clip
    client_cam=Microphone.get();
    //Live_video.attachVideo(client_cam);
    Live_video.attachAudio(client_cam);

    function initStreams() {

    // Make a connection to the application on the server
    client_nc = new NetConnection();

    // Handle status message
    client_nc.onStatus = function(info) {
    trace("Level: " + info.level + newline + "Code: " + info.code);
    }

    client_nc.connect("rtmp:/doc_record/room_01");

    // Create output stream
    out_ns = new NetStream(client_nc);

    // Create input stream
    in_ns = new NetStream(client_nc);
    Replay_video.attachAudio(in_ns);

    }

    // Connect to server and set up streams
    initStreams();

    function doRecord() {

    if (Record_btn.getLabel() == "Record") {

    // Start publishing the camera output as a recorded stream
    out_ns.attachAudio(Microphone.get());
    out_ns.publish("my_recorded_stream", "record");

    // Don’t allow the user to play when recording
    Play_btn.setEnabled(false);

    // Change the button label
    Record_btn.setLabel("Stop");

    } else if (Record_btn.getLabel() == "Stop") {

    // Close output stream
    out_ns.close();

    // Now that you’re finished recording, allow the user to play
    Play_btn.setEnabled(true);

    // Change the button label
    Record_btn.setLabel("Record");
    }
    }

    function doPlay() {

    in_ns.play("my_recorded_stream");

    }
    Attached Files Attached Files
    Last edited by iziaee; 04-03-2006 at 03:51 PM.
    "If Freedom is Outlawed only Outlaws will have Freedom"

  2. #2
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    Flash can't record audio on it's own - you need to use the Comm Server - which is what the example code you posted above does...

    For a standalone app, you might look into using Zinc...but you'd still need to figure out how to write the recording software or link it into an existing app...

    http://www.multidmedia.com/software/zinc/

    K.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center