Thanks Guys,
Unfortunately, I am having difficulty getting both strategies to work.
1. Embed the xml file
- It seems xml file format (xml) is not specifically supported by Flex
and will require me to set the MIME type and the embedded object is a
ByteArrayAsset. Is this the only way?
- tried to embed both as a metadata tag and directive and the error states: no
transcoder registered for mimeType
2. Use the compiler arg '-use-network false'
- it seems the argument -use-network does not support additional
parameters such as 'false'. When I use just '-use-network' it does compile but
errors at runtime loading the local XML file as before.
My mxml is as follows (loading 'images/gallery/photos.xml is giving the
problem'):
<mx:HTTPService id="photosIn" url="images/gallery/photos.xml"
result="photosInHandler(event)" />
The resulting ArrayCollection is used to bind as the dataProvider of a TileList.
Am I missing something? Just wanted an easy way to support launching off local
file system and hoped I could have an easy strategy to toggle both deployment
strategies (web server, local file system).
Any comments much appreciated.
-Greg
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew
D. Goodfellow
Sent: Monday, January 28, 2008 11:37 AM
To: [email protected]
Subject: Re: [flexcoders] Running a flex app from local file system
Hi Greg,
I think if you go to "Project | Properties | Flex Compiler" and add "
-use-network false" to the Additional Compiler Arguments that might do the
trick.
You'll need to rebuild. I think the problem you are having is due to security
constraint built into the Flash player. It will allow the swf to either load
external resources via HTTP from the network OR from the local filesystem. Both
are not allowed, you have to choose a setting for one or the other when you
build/publish.
-Andy
On Jan 28, 2008 9:38 AM, Greg Hess <[EMAIL PROTECTED]<mailto:[EMAIL
PROTECTED]>> wrote:
Hi All,
I am working with a remote team and I need to send them the application
prototype for review. I thought all I need to do is add all the files in the
output dir to a compressed file and send via email ect... The prototype is
loading a local XML file to populate an UI component to simulate a remote
HTTPService call and it seems to be generating security violations accessing
the local file system. The client workstations are Windows Vista.
How do I build or configure the application so it can be launched from the
local files system?
Any comments much appreciated.
Thanks,
-Greg