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

  • SEARCH
  • Home
  • 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 7091153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:08:53+00:00 2026-05-28T08:08:53+00:00

Another question about the application I’m making. So when the user signs up, he

  • 0

Another question about the application I’m making. So when the user signs up, he needs to take a picture. I want to do this without using the cameraUI. I followed a sort of tutorial but the application doesn’t run. I don’t get errors, but the camera doesn’t show. Here is what I did:

    <?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark" 
        xmlns:mx="library://ns.adobe.com/flex/mx"
        activate="view1_activateHandler(event)"
        title="Camera Test">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>


    <fx:Script>
        <![CDATA[
            import mx.core.UIComponent;

            import spark.components.Image;
            import spark.components.VideoDisplay;
            import spark.components.ViewNavigator;

            private var cam:Camera;
            private var video:Video;
            private var uic:UIComponent;

            protected function cameraButton_clickHandler(event:MouseEvent):void
            {
                if(!cam){
                    trace("whut");
                    cameragroup.removeAllElements();
                    this.cam=Camera.getCamera();
                    cam.setQuality(0,100);

                    cam.setMode(cameragroup.width, cameragroup.height, 30, false);
                    if(cam){
                        trace("camera added");
                        this.video=new Video(cameragroup.width, cameragroup.height);

                        video.attachCamera(cam);

                        this.uic=new UIComponent();
                        uic.addChild(video);

                        var m:Matrix=new Matrix();
                        m.rotate(Math.PI/2);
                        video.transform.matrix=m;

                        var m2:Matrix = new Matrix();
                        m2.translate((video.width+cameragroup.width/4)-this.frame.x, 5);
                        uic.transform.matrix=m2;

                        cameragroup.addElement(uic);
                        cameraButton.label="shoot";
                    }
                }
            }

            protected function view1_activateHandler(event:Event):void
            {
                this.cameraButton.label="shoot";
            }

        ]]>
    </fx:Script>

    <s:VGroup width="100%" height="100%" horizontalAlign="center" paddingBottom="30" paddingLeft="10" paddingRight="10" paddingTop="30">
        <s:Group id="frame" width="100%" height="100%">
            <s:Rect width="100%" height="100%">
                <s:fill>
                    <s:SolidColor color="0x000000" alpha="0.2"/>
                </s:fill>
            </s:Rect>
            <s:Group id="cameragroup" width="210" height="220"/>
        </s:Group>

        <s:Spacer height="100%"/>
        <s:HGroup width="100%" horizontalAlign="center">
            <s:Button id="cameraButton" width="50%" height="80" label="start" click="cameraButton_clickHandler(event)"/>
        </s:HGroup>
    </s:VGroup>
</s:View>

This is the complete .mxml file. And I overlooked the code line by line but didn’t found anything wrong.

Grtz

  • 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-28T08:08:54+00:00Added an answer on May 28, 2026 at 8:08 am

    In your Application-app.xml

    Ensure the following is there.

    <uses-permission android:name="string" />
    

    in our case:

    <uses-permission android:name="android.permission.CAMERA"/>
    

    This is explained in more detail here:
    http://developer.android.com/guide/topics/manifest/uses-permission-element.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to ask a question about the iPhone application. I write a program
Here goes a yet another SQL question about dates… I'm building a calendaring application
I have another question about restoring application state, on the iPhone. Simple data (like
I've recently made another question about connecting to MS-ACCESS database with .NET in C#
Another question asked about determining odd/evenness in C, and the idiomatic (x & 1)
Inspired by another question asking about the missing Zip function: Why is there no
Another question of mine about optimizing Objective C programs inspired the following: does anyone
i have another (probably unanswered) question about map views. I have a map view
I brought up a point about obfuscation in another question to which someone replied
Another poster asked about preferred syntax for infinite loops . A follow-up question: Why

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.