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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:25:33+00:00 2026-05-25T00:25:33+00:00

I have an image uploader that runs on a separate PHP script, and then

  • 0

I have an image uploader that runs on a separate PHP script, and then updates the Preview Url after the file has been uploaded. But what I’d like to do is have a Flash SWF embedded in the same HTML that’s running the PHP Uploader to get that Preview URL and display it in the Flash Application.

What would you suggest be the best way to go about sending this PHP variable to Flash?

Thanks in advance!

Aaron

  • 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-25T00:25:33+00:00Added an answer on May 25, 2026 at 12:25 am

    You cannot asynchronously send a value from PHP (server-side) to Flash (client-side). You have to either pass it in on embed-time through a flashvar (although I doubt this will work in your case since you want this transfer of information to occur after a load operation) or your Flash application will need to query the server, and have the server return the correct value.

    A third option would be to use the ExternalInterface API in Flash to let your HTML notify the Flash application via javascript when the URL is available.

    Since I don’t know your general set-up, it’s hard to recommend one way over another, but the general reasons for going with one over the other are:

    • Choose the flashvar approach if the value is known when the embedding HTML is loaded, so that you can pass it in to the SWF as it’s being initialized, e.g. using the query-string: myflash.swf?previewUrl=<?php echo $previewUrl;?>
    • Choose the ExternalInterface approach if you are using an asynchronous approach (so the above is not possible) and the HTML/JS part of your application already is being notified. This way you can just invoke a javascript method on the SWF embed DOM object, and have it be received inside your ActionScript.
    • Choose the server query approach if none of the above works, but you have some way of knowing when the upload is complete. Just use a regular URLLoader to query the server for the preview URL, specifying the file id or similar as a GET or POST variable.

    Hope this helps. Please elaborate on the details of your architecture for a more thorough answer.

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

Sidebar

Related Questions

I have a php script that echoes a series of uploaded images and I
Let's say i have an image uploader script, i want to prevent the upload
I have a function in PHP that resizes images into a thumbnail, my image
I have an image uploader (http://valums.com/ajax-upload/) that uses an iframe as a fallback for
I have this script that loads in content, and should then bind the delete
I have an upload script that runs on a windows webserver 2008. The uploads
We have an image uploader that uploads to AWS, using django-storages. Right now it
I have an image uploader and cropper which creates thumbnails and I occasionally get
I have a site with an image uploader, and whenever a user tries to
I have image data and i want to get a sub image of that

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.