Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 903137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:49:38+00:00 2026-05-15T15:49:38+00:00

I’m having an issue with flash, which I am not really familiar with. I’m

  • 0

I’m having an issue with flash, which I am not really familiar with. I’m basing this code off of what came with the wowza media server in the video chat example, but unlike that example flash is not prompting me for whether or not to allow the video camera.

Below is my actionscript:

import flash.events.MouseEvent;
import flash.events.NetStatusEvent;
import flash.media.Camera;
import flash.media.Microphone;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.system.Security;
import flash.system.SecurityPanel;
import flash.display.Sprite;
import flash.text.TextField;
import flash.events.StatusEvent;

public class QandA extends Sprite {
    Security.LOCAL_TRUSTED;

    private var nc:NetConnection = null;
    private var camera:Camera;
    private var microphone:Microphone;
    private var nsPublish:NetStream = null;                      
    private var nsPlay:NetStream = null;
    private var videoCamera:Video;
    public var prompt:TextField;

    public function QandA():void {
        stage.align = "TL";
        stage.scaleMode = "noScale";
        videoCamera = new Video(160,120);
        addChild(videoCamera);
        camera = Camera.getCamera();
        microphone = Microphone.getMicrophone();
        if (camera.muted) {
            trace("Camera Muted");
            Security.showSettings(SecurityPanel.CAMERA);
            camera.addEventListener(StatusEvent.STATUS, statusHandler);
        } else {
            startCamera();
        }

    }

    private function statusHandler(e:StatusEvent):void {
        if (e.code == "Camera.Unmuted") {
            trace("Camera Unmuted");
            startCamera();
            camera.removeEventListener(StatusEvent.STATUS, statusHandler);
        } else {
            trace("StatusEvent: " + e.code + " " + e.toString());
        }
    }

    private function startCamera():void {
        // here are all the quality and performance settings that we suggest
        camera.setMode(160, 120, 12, false);
        camera.setQuality(0, 75);
        camera.setKeyFrameInterval(24);
        microphone.rate = 11;
        microphone.setSilenceLevel(0);

        nc = new NetConnection();
        nc.connect("rtmp://localhost/live/");

        // get status information from the NetConnection object
        nc.addEventListener(NetStatusEvent.NET_STATUS, ncOnStatus); 
    }

    private function nsPublishOnStatus(infoObject:NetStatusEvent):void
    {
        trace("nsPublish: "+infoObject.info.code+" ("+infoObject.info.description+")");
    }

    private function ncOnStatus(infoObject:NetStatusEvent):void
    {
        trace("nc: "+infoObject.info.code+" ("+infoObject.info.description+")");
        nsPublish = new NetStream(nc);
        nsPublish.addEventListener(NetStatusEvent.NET_STATUS, nsPublishOnStatus);
        nsPublish.bufferTime = 0;
        nsPublish.publish("testing");
        // attach the camera and microphone to the server
        nsPublish.attachCamera(camera);
        nsPublish.attachAudio(microphone);
    }
}

I’m fairly confident it’s something simple; as I’ve seen this code in/on countless sites when discussing how to publish to a live server.

Any help would be greatly appreciated, I’ve attempted using this code on a webserver to see if it was simply local security settings, but that was not the case.

Logs I receive when debugging the application in Flash CS5:

Attempting to launch and connect to Player using URL D:\development\qanda\qandaHost.swf
[SWF] D:\development\qanda\qandaHost.swf – 3583 bytes after decompression
Camera Muted
nc: NetConnection.Connect.Success (Connection succeeded.)
nsPublish: NetStream.Publish.Start (Publishing testing.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:49:39+00:00Added an answer on May 15, 2026 at 3:49 pm

    I wasn’t attaching the camera to the video, thus I couldn’t see myself — even though the video was in fact streaming.

    private function startCamera():void {
        trace("Attempting to start camera");
        // here are all the quality and performance settings that we suggest
        camera.setMode(160, 120, 12, false);
        camera.setQuality(0, 75);
        camera.setKeyFrameInterval(24);
        videoCamera.attachCamera(camera);
        microphone.rate = 11;
        microphone.setSilenceLevel(0);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.