PDA

View Full Version : testing flash on local machine (woes!!!!!!) help!



iamthwee
February 13th, 2009, 06:41 AM
Right, I have a few questions I hope to get answers for.

I am working on a flash application on my local machine. It involves reading and writing to an xml file. I am facing a lot of security problems because of flash sandbox.

In order to get around this I have installed php+apache to call an external file that writes to a file. I have created the crossdomain.xml and put it in the root of the web server on my local machine.

However, I can ONLY run the flash file in the flash program AND IT DOES WRITE TO A FILE. If I publish it as a html I still get the security error msg.

Now another requirement of my program is as the user interacts with my flash application it changes an xml and the page should refresh to show the changes.

But because I can't run my flash program as a html file I can't refresh the damn page!

I'm half thinking of setting up a vm machine as a pretend server to get this damn thing working. Then I at least have the server + client model.


What the hell should I do?

Thanks in advance

Help!
:confused:

wvxvw
February 13th, 2009, 02:26 PM
You need to serve your HTML page that wraps flash from your server too... not from the file system...
You don't need to refresh the HTML page containing flash unless you need to refresh the HTML, flash can send / receive data to server and update whenever the sever tells it to... But if you need to refresh the HTML page, just
ExternalInterface.call("document.location.refresh"); or whatever the appropriate JS code you use for it.

iamthwee
February 14th, 2009, 03:41 AM
OK so what you're saying is that I need to set up the server + client model, because at the moment I only have the client model.


I was hoping I could avoid this for testing purposes...

Thanks for the feedback.

wvxvw
February 14th, 2009, 06:22 AM
this depends on what exactly you wanted to do...
Assuming you wanted to:
Open an XML file from local machine, modify and save to local machine it in FP10, then you don't need server.
In any other case you do need server.
If you don't feel totally comfortable with doing all the installation yourself, I'd stick to XAMPP / WAMP solution. That'd install everything you need and give you handy API for managing it.