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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:19:43+00:00 2026-05-28T06:19:43+00:00

I have a simple swf file upload script that uploads a file as soon

  • 0

I have a simple swf file upload script that uploads a file as soon as user selects it. It works fine however I’m trying to pass the saved filename from the php script (simple echo “file_name.txt”;) back to the swf so it can pass it back to the form via javascript.

Here’s a simple snippet of the AS2 code, can someone who has some experience with the FileReference component help me out with a solution to get the output from the php script?

var file_fr:FileReference = new FileReference();
var list_obj:Object = new Object();
list_obj.onComplete = function() {
    // need to get response text from script.php
}
file_fr.addListener(list_obj);

if (!file_fr.upload("/path/to/script.php")) {
    feedback.text = "error";
}
  • 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-28T06:19:44+00:00Added an answer on May 28, 2026 at 6:19 am

    I believe FileReference.upload isn’t going to be made smart enough to return anything other than success fail codes. So what you need to do is pass a UID on the end of your URL and then use that to query php on what it did on its end in another call.

    Rereading your post, do you want the local file or the remote file name? Local should be available in the FileReference.

    Here is old code I dug up –

    Note: This is AS3. And it deals with 3 images, so…

    AS3 FileReference Example

    And then the PHP

    PHP AS3 FileReference Example

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

Sidebar

Related Questions

i have a SWF file with a simple function that returns a string. can
I have a simple swf file, it load three movie movie(swf) in to 3
I have a assets file that embeds things, [Embed(source='assets.swf', symbol='block')] public static const SYM_BLOCK:Class;
I have created a simple flash menu and the SWF file, JS files (swfoject.js
I have a SWF file emedded withing a HTML page. Trying to do a
I have an swf file which behaves strangely on IE. The thing is that
I have simple win service, that executes few tasks periodically. How should I pass
I have simple SSIS package which reads data from flat file and insert into
I have simple HTML code with some JavaScript. It looks like: <html> <head> <script
I have simple SSIS package where I import data from flat file into SQL

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.