Select to view content in your preferred language

Help with Flex App - Works in Flash Builder, but not outside of FB.

1089
5
Jump to solution
04-20-2012 12:16 PM
StevenCummings
Emerging Contributor
I am having trouble with my URLLoader.addEventListener (at least I think that's it).  The weirdest thing is the Flex app will run fine when I run from Flash Builder.  But when I load the SWF and HTML files to our web server to test it, the next button will not work (what the addEventListener is attached to).

The app is a simple photo viewer.  The user can select a Muni from the dropdown, the app will zoom to that Muni, the user can click on a feature to get a InfoWindow with some info in it.  They can click on the "View More Pictures" to view more pictures in a PopUp.  (This is where the difference is)  The PopUp will appear, Next and Prev buttons work fine when run from Flash Builder.  But when run from the web server, when the user clicks on the Next arrow, nothing happens.

Note: Not all of the features have associated images.  Suggestion is to Zoom to West Chester Borough, and click on the short Green line on N High St.  The "No Photo Available" image is fine (hard-coded that way).  The PopUp should display with an image, but neither button will work.

Link to app:   http://www.landscapes2.org/ccpc/DCD_CRP/DCD_CRP2.html

Sorry if the code is a little sloppy, still getting use to programming Flex.  Code for the app is attached

Flash Builder 4.5, Win XP SP3, ESRI Flex SDK 2.5, ArcGIS Server 9.3.1.

Thanks,

Steve C.
GIS Analyst II, CCPC
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Michael,

   Yes the server that contains the images needs it's own crossdomain.xml.

View solution in original post

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus
Steve,

   The big issue is you do not have a http://www.chesco.org/crossdomain.xml on your site. Next can you verify that this is a proper url for your image:
http://www.chesco.org/ccdcd/lib/ccdcd/dcd_webapp/WestChester/wc4416_2002-2003/image1.jpg
or
http://www.chesco.org/ccdcd/dcd_webapp/WestChester/wc4416_2002-2003/image1.jpg

neither of these are pulling anything up for me.
0 Kudos
MichaelVolz
Esteemed Contributor
Robert:

I have a question in regards to this application.  The code is written against the Flex API where the application is stored on an IIS Server, the GIS mapservices orginate from a different IIS Server that has ArcGIS Server with a crossdomain.xml in place for all mapservices, and the images are stored on another IIS Server.  Would the IIS server where the images are stored need to have its own crossdomain.xml file so the application Flex API can access these images?  Your feedback is greatly appreciated.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Michael,

   Yes the server that contains the images needs it's own crossdomain.xml.
0 Kudos
StevenCummings
Emerging Contributor
Hi Robert,

Thanks for your quick responses, and sorry for my delayed response.  I added the crossdomain.xml to the root folder where the images are stored, but that did not solve my issue.  After moving a sample of images off of our County servers, and onto a third-party web server, the application was working.  So we figured out that between our Firewall and the DSF content management system (an ancient technology that we are in the process of moving away from) there is a limitation that restricts/blocks Flex's URLRequest.

The particular image you tried to hit does not exist.  Not all of the features on the map have associated images, so it can be hard to test.

I am going to rewrite the part of the application that sends the URLRequest to get it to work with our limitations.  I'll post again with progress.

Thanks for your help!!  It is much appreciated.
0 Kudos
StevenCummings
Emerging Contributor
I figured out my issue.  I was using URLLoader() when I should have been using Loader().  Thanks to a previous post Robert helped with http://forums.arcgis.com/threads/12417-check-if-files-exist-on-server?highlight=loader%28%29

Thanks for your help!
0 Kudos