1 person found this helpful
If you simply moved the content of the release build folder somewhere else on your local machine, 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.
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
1 person found this helpful
Does the click handler fire? Is the EBS_new_OW1.SWF in the same folder as
the release SWF? If you attach event listeners to the SWFLoader, do they
fire? What if you use a simple SWF instead of EBS_new_OW1.SWF?
I gave this a try, but when set to false, the app didn't run at all, set to true the app ran, but with same problem. At this point the production and release build are just on my C: drive - havent' even gotten to the network part yet. But perhaps when I do, your suggestions may come in handy - good to know about this.
The event to load the loader fires - I know this because that event also moves the titleWindows slightly (in this test version, but it moves it a lot more in the real version). I tried loading a simpler swf that just displays a message with same results.
Yes, the swf is in same directory. By now, I've copied it to all possible directories/folders. I believe when the application can't "find" the swf, you get a little broken icon displayed, but I'm not getting that. I belive the application can find the swf, but is "ignoring" it.
Please recall that both the Captivate swf and simpler swf load fine in development environment.
Finally, I like your idea about listening for events on the SWF, but I don't know how to do it.
I'm wondering now it I should try to load the SWF in a different manner.
The documentation lists a set of events for SWFLoader:
I would listen to each one of them
<mx:SWFLoader id="loader" x="0" y="0" depth="10" width="1024" height="905"
complete="trace(event)" httpStatus="trace(event") ... /
swf Security Error
Don't know what the error is, but getting a security error in the release build. That might explain it. Now, how to fix it?
What is the text of the error?
That's it? No more information? Are you seeing output in the console or
I presume that since I'm running this in the browser, ouside Flash Builder, there is no console active or log files. When I run inside Flash Builder, there is no error and it works fine.
I hope I'm answering your questions accruately.
Most of us have debugger flash players installed in the browsers. Then
whether you launch from FlashBuilder or not, flashlog.txt will be written.
Oh - I see. I don't have that on the test system, only the dev. I'll see about putting debugger on the test system.
It is funny, but another part of the application can load swfs OK.
I wrote a simple version of this application on my system with the debugger browser and got this:Error #2044: Unhandled securityError:. text=Error #2140: Security sandbox violation: file:///Users/douge99/Desktop/COMITrelease/loadSWFS.swf/[[DYNAMIC]]/3 cannot load file:///Users/douge99/Desktop/COMITrelease/EBS_new_OW1.swf. Local-with-filesystem and local-with-networking SWF files cannot load each other.What do you think?Thanks.
Actually, I was wrong - the other method can't load external swfs either. I turned that other swf into a custom component via Flash, so I guess since it is a component, Flex looks at it like an internal thing, not some rogue network thing. I don't think I can do that with these SWFs because they are created in Captivate - not sure though and am keeping options opened in case this doesn't work in Flex.
If you are using debugger versions of the Flash Player, if you did not have
a securityError handler, you should have either seen a dialogbox popup with
the security error details or security warnings and errors would be in the
If you are loading the external SWF from the same folder as the main SWF you
shouldn't be getting security errors at all unless the SWFs have been moved
to a folder that isn't in the FlashPlayerTrust files if you are loading from
the file:// system. If you are loading the main SWF via http:// you should
not be getting any errors if the SWFs are in the same folder.
It is possible that a Captivate SWF has other assumptions that will prevent
it from running as a sub-SWF, but if the SWF is "trusted" you would get
other errors, not security errors.
For simplicity I have put all the SWFs in the same folder. But I didn't originally have it that way which may have complicated things. I did get a bunch of errors in the browser as well after setting the network=true and network=false.
Anyway, I'll digest what you have provided and see where we go.
Thanks very much for your diligence in answering my questions and providing feedback.
If the end goal is to deploy the SWFs on the network, set use-network=true
(default), and when you test from file:// make sure the folder the SWFs are
in are in the FlashPlayerTrust file. Folders created by FlashBuilder or
specified in FlashBuilder project settings should be listed for you. Others
you will have to add yourself.
If your end goal is to deploy on a desktop, use AIR
Got my simple example to work finally. I had to use the network=false, otherwise I got nothing when files were on the network. Then I had to add about four URLs to the Adobe configuration utility that pops up by hitting the "settings" button.
Is there a way to set those browser security settings when the user "hits" the application through some program?
If this app is going to live on a computer and get launched by a program,
you may have to make the captivate SWFs also use network=false, and I don't
know if there is a setting for that.
An AIR app might be the better option.
If you have an install script, maybe you can update the FlashPlayerTrust
If it is going to launch from a browser, I would think use-network should be
I tested both "=true" and "=false" they both work on the network drive proding I add the location in the Flash Player Settings. I presume that since I'm accessing the release files from a network drive "s:" or "k:" that my PC believes these are local files. Probably if I accessed the files through a URL it would be different.
My main goal will now be to find a way to deploy the project to people without too much interruption to their PC operations.
Thanks all for your help.
UCLA - CTS
You were correct! Once I put the files on the web server and accesed via http, the external swf loaded.
When I was testing the original Release build on my local drive, or even a network drive (without http) the external swf would not load.