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 9270107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:17:23+00:00 2026-06-18T15:17:23+00:00

I have a flash code which capture an image. Here is code: <object id=main

  • 0

I have a flash code which capture an image. Here is code:

<object id="main" width="300" height="400" align="middle" type="application/x-shockwave-flash" name="main" data="<?php echo JS_PATH;?>bin-debug/dev.swf">
    <param name="quality" value="high">
    <param name="bgcolor" value="#ffffff">
    <param name="allowscriptaccess" value="sameDomain">
    <param name="allowfullscreen" value="true">
    <param name="flashvars" value="<?php echo HTTP_PATH.DS?>user/changeprofilepic_byweb">
</object>

in the above code:

 <param name="flashvars" value="<?php echo HTTP_PATH.DS?>user/changeprofilepic_byweb">

the value parameter contains the path of controller which function changeprofielpic_byweb contains the code for update the profiel image. I am not able to update the image. Where am I going wrong? Is my flash code is right? My flash code is working fine and it capture image but it is not storing in to the database. Here is the code of controller:

 function changeprofilepic_byweb() 
    {
         echo "<script> alert('In to the function'); </script>";
        $sess_data = $this->session->userdata('logged_in');
        $this->load->library('photoslibrary');
        $this->load->Model('usersocialprofile');
        $upload_path = COMM_USER_IMAGE_PATH.$sess_data['user_id']; 

        if(!is_dir($upload_path)) 
        {
            umask(0);
            @mkdir($upload_path,077);
        }

        $db_userprofile = $this->usersocialprofile->getThumb($sess_data['user_id']);


        if(is_file(COMM_USER_IMAGE_PATH.$sess_data['user_id'].DS.$db_userprofile[0]->imageTitle)) 
        {
            $this->usersocialprofile->unlinkImage($db_userprofile[0],PROFILE_IMAGE_THUMB);

        }

        $this->load->helper("Image");
        $fileImage="";
        $data['error']="";


        $fileext='jpeg';    
        $timestamp=md5(time());
        $filename="photo".$timestamp.".".$fileext;

        $filesize = floatval((filesize($filename)/1024)/1024); // bytes to MB  
        list($width, $height, $type, $attr) = getimagesize($filename);

        $req_size=explode(",",PROFILE_IMAGE_THUMB);
        $req_size=explode("x",$req_size[0]);

        if($width<$req_size[0] || $height<$req_size[1])
        {
            $data['error']="Image required minimum ".$req_size[0]."x".$req_size[1]." pixels";
        }else {

            $data['error']="";
            $newthumb_path = "thumb".DS;

        if(!is_dir($newthumb_path))  {
            umask(0);
            @mkdir($newthumb_path,0777);
        }                

        $fileImage=imageresize($filename,$filetempname,PROFILE_IMAGE_THUMB,$upload_path.DS,false,true,true,$newthumb_path);
        $result=$this->usersocialprofile->updateImage($sess_data['user_id'] , $fileImage);
        }
    }

i think the function is not calling by flash code.i am not getting any error.just the captured image is showing but not updating in folder.

  • 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-06-18T15:17:24+00:00Added an answer on June 18, 2026 at 3:17 pm

    For uploading the image using web cam you just have to create the image and get the values of variables which are set to the flash code.and at the time of getting the image ,you just have to create the image insted of using any get or post method.something like that:

        $fileext='jpeg';    
        $timestamp=md5(time());
        $filename="photo".$timestamp.".".$fileext;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following piece of code which play the flv file, <embed align=middle
I have a flash object embedded in my website with the embed code that
I have a flash code, in which i am loading images and opening urls
Ok here's the the thing. I have a flash slideshow which runs from an
I have this code which shows/hides a menu when a button is cicked $('#main-menu
I have some older AS2-style Haxe code which uses flash.Lib.Current.CreateEmptyMovieClip() to create a slideshow
Currently I have the following code to flash a DataGrid cell when it's value
Sorry, I'm new to flash I have this line of code: BaseEntry( _entryList[i] ).topTeamName
I have made a code that read data from flash Nand (without filesystem). fd
I have been looking through the source code for the Flash-based Google TV example

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.