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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:23:42+00:00 2026-05-22T14:23:42+00:00

I need some help with loading a PNG file from a server into my

  • 0

I need some help with loading a PNG file from a server into my flash project. What I want to do it be able to call a PHP page and send it a variable which I can do. Then I want to access a db and get a path for the image, I can do this too. What I’m not sure about is what to do then.
What I need to happen is the PHP to return the PNG to flash somehow. Can I just add the PNG to the php page and use a loader somehow? I’ve been searching around google but most tutorials seem to be getting PNGs out.

Thanks
Ben

  • 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-22T14:23:43+00:00Added an answer on May 22, 2026 at 2:23 pm

    It is actually pretty easy. : )

    <?php
        // do some mysql magic.
        // let's assume you get a filename back as $file_name;
    
        header('Content-type: image/png');
        readfile($file_name);
    

    Note that you may have to include some path info as well. Not sure where your images are stored, but if the image are in /var/www/public/images, you’d wany to prepend that into your file_get_contents call.


    Added: also, if you just want to return a path to the PNG, you can do a URLRequest to a PHP file, let it figure out where the image lives, and return a URL. This is even easier… I’d just recommend standardizing on a data interchange protocol like XML or (even better) JSON… that way, if you ever decide that you want to break out of Flash and into browser technologies, your backend will already be waiting for you.

    <?php
        // do some mysql magic.
        // let's assume you get a filename back as $file_name;
    
        $retVal = array('pathname'=>$file_name);
        header('Content-type: application/json');
        echo json_encode($retVal);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need some help about with Memcache. I have created a class and want to
Need some help from javascript gurus. I have one page where http://www.google.com/finance/converter is embedded
I need some help from the shell-script gurus out there. I have a .txt
I need some help on showing Progress bar upon loading data on my DataGridView.
I'm writing an application and need some help with consistently storing and loading preferences
I need some help to get the ContentType of a file that is uploaded
Please i need some help in adding items to a JComboBox in Java from
I'm new to WPF, and I need some help. I have a slow-loading WPF
I want to add some feature to this project and I need smartgwt for
Need some help, please. I have a line of horizontal thumbnails loaded as ONE

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.