No one else has encountered this?
What is the absolute URL of the SWF and the service?
Its running on a debian box running apache. The webroot is /var/www
The absolute address is http://10.101.50.60
The script that I'm looking for is parser.php hence all the developement work I've done originally I had spelled out "http://10.101.50.60/parset.php" in flex. Now though that I'm ready to go into production with it, I changed the httpservice call to "http://localhost/parser.php" because I can't gurarantee that any linux box I use will have an IP address of 10.101.50.60. All I know is that any place this .swf file will be is in the root of the linux appliance service. (I"m working on a configuration tool for a network appliance type device, so the user could change the IP address of the unit).Following this change to the service call to localhost, I ddi the release build and copied it over to the /var/www directory. This is when the problem started.
Still works from Flash builder though with the http:10.101.50.60 call?
Did anything change in the .html wrapper that the release build makes in 4.0 compared to 3.5? I'm still using the old wrapper, and I I did was recompile between 3.5 and 4. (I know this is a long shot.... IT doesn't look like it).
You might need to set the --use-network=false compiler option.
Project - Properties - Flex Compiler
add --use-network=false to the "Additional compiler arguments:" section.
When deploying to a live server you probably have to recompile with --use-network=true.
Who knows, maybe in your situation it needs to be set to true.
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
Flex Training and Support Services
4.0 uses SWFObject in the wrapper instead of AC_OETags.js, but that
shouldn't be the issue. There are three urls we need to know: the absolute
url of the SWF, the absolute url of the httpservice, and the absolute url of
the crossdomain.xml. Test them by typing the urls into a browser if there
If the SWF is loaded from http://10.101.50.60/myswf.swf, it cannot access
the httpservice call at http://localhost/parser.php even if localhost maps
to 10.101.50.60. Flash security checks the strings, not the resolved IP
Gave the compiler flag a shot with no luck.
I do not know if this is your issue but it make sence to me. When you specify localhost it is referring to the box the users machine. I usually leave the machine name off and let it use the one specified in the browser like /php/myphppgm.php
Hope this helps
Thanks for the info Flex harUI,
So I tried bringing up the 3 files (crossdomain.xml, main.swf, and parser.php) from a browser and they call exist and are reachable.
So I get the localhost vs. absolute address this. That makes sense. So I recoded the httpservice call to url="http://10.101.50.60/parser.php". Which is the actual fully qualified address in this case (There is no DNS server), and what I'm pulling up in the browser is "http://10.101.50.60/index.html". So after making this change, I can still access and have everything working in Flash builder, but again, when I standalone compile and upload the main.swf to the var/www directory and pull it up in the browser via http://10.101.50.60/main.swf. I get "Security error accessing URL". So basiclly, same thing.
Spent two days on it now.....
So interesting thing here. I put some echo's in my php script to record what $_POST
item'm I'm getting when the main.swf runs. With the debugger running the program (Or flash builder), I
get calls to the parser.php script with $_POST parimeters as expected, however when run after uploaded, it is running the parset.php file as it should, but the parser.php script doesn't seem to be seeing any of the required $_POST headers. Weird? How could I be losing my POST parimeters on a release build?
So interesting thing here. I fixed it. Solution
--use-network="true" was the key here. but there is one other problem. The browser cache. I ran in circles for days on this.Clear your browser cache before trying the release build. Solved everything.