0

I'm trying to pass the file name of an image upload PHP script into Flash's UILoader component. So when a user uploads their image, the file name of the file is passed to flash so that the image displays within the Flash UILoader application.

Here's the PHP variable I'm trying to pass:

$filename= '';

And here's where Flash's UILoader gets it's source (ActionScript 3.0):

uiLoader.source = "freshly uploaded file.jpg ($filename)?";

So if anybody has any expert advice on how I'd going about doing this, that would be excellent. Thanks a lot in advance!

Aaron

1
  • I was going to suggest using URLLoader but I misread your question. Commented Aug 26, 2011 at 20:14

1 Answer 1

1

Try using FlashVars. You can then pass variables to the SWF when it's embedded.

Sign up to request clarification or add additional context in comments.

3 Comments

This worked well while passing HTML variables, but I have a separate PHP that I need Flash to get the variable from. Thanks for the speedy response!
As in you have a .php file you need to call to get data from within the SWF?
Vice versa actually. The SWF needs the url of the uploaded file that the PHP file creates on upload (the image preview URL).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.