FORUMS: list search recent posts

crossdomain policy file issues

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Rob Maples
crossdomain policy file issues
on Jan 5, 2009 at 5:31:12 pm

Hello,

I am writing a flash application that runs as a windows standalone projector. The purpose of this file is to read a text file from a specific location on the company's intranet and fill in specified text boxes dynamically.

Specs:
Flash CS3 professional
AS 3.0
Flash Player 9

The projectors live on the desktop of each individual playback machine.
The text file(s) live at the address: http://gai-dsmsvr/galleryUpdates/fileName.txt
The Crossdomain file lives at: http://gai-dsmsvr/galleryUpdates/crossdomain.xml

The beginning of my code reads as follows:


// file.fla
import flash.system.Security;

// create a loader context that
// checks for policy files
//var gContent:LoaderContext = new LoaderContext();
//gContent.checkPolicyFile = true;
// loader context didn't check properly, commented out.
/////////////////////////

// var for the policy file URL
var policyFile:String = "http://gai-dsmsvr:82/galleryUpdates/crossdomain.xml";

Security.allowDomain("*");
Security.allowInsecureDomain("*");
Security.LOCAL_TRUSTED;
Security.loadPolicyFile(policyFile);

//internal web server, port 82
var gRequest:String = "http://gai-dsmsvr:82/galleryUpdates/oceanVoyager.txt";

var gEvents:URLLoader = new URLLoader();
gEvents.load(new URLRequest(gRequest));
gEvents.dataFormat=URLLoaderDataFormat.VARIABLES;
gEvents.addEventListener(Event.COMPLETE, onLoaded);
// Code Continues....


The Cross Domain file is very simple and reads as follows:
< ?xml version="1.0"?>
< !DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
< cross-domain-policy>
< allow-access-from domain="*" secure="false"/>
< /cross-domain-policy>
(I added spaces into the front of each tag to make the code display since it's xml code and the forum wanted to parse it.)


When I run the flash file from CS3 via 'preview movie' I get the following message in the Output window: Error loading URL: "http://gai-dsmsvr:82/crossdomain.xml"

Why is the file trying to load a crossdomain file there? I thought the 'Security.loadPolicyFile(policyFile); line should tell Flash to load the specific file located at http://gai-dsmsvr:82/crossdomain.xml... Is this not the case? If not, how can I make the flash movie look to that specific crossdomain policy? This error is keeping the program from functioning properly.

In my test environment, the program works fine, just as it should. But in the public areas it does not. The only difference I can see is that the machines in the public are authenticated on our Active Directory Domain and require secure login from our IT department. My test box on the other hand is just plugged into the network and not authenticated. I'm sure I can remedy the problem in the public area by getting it to read the proper cross domain file, but I'm not having any success... Any recommendations?

Right now the public machines behave as follows:
Boot up the .exe projector
1) Within 60 seconds the app goes full screen
2) the app loads the txt file from the server
3) the app replaces the dynamic text boxes with the variables in the text file
4) the app stops

What SHOULD be happening is:
Boot up the .exe projector
1) Within 60 seconds the app goes full screen
2) the app loads the txt file from the server
3) the app replaces the dynamic text boxes with the variables in the text file
4) the app repeats from step 2 every 60 seconds.

Currently, in the output box of my development machine it replaces the text and then gives me the error about the crossdomain file. Is there a way to trace out the load of a cross domain file to see what the flash is processing?

Thanks, hope that was clearly annunciated.



Return to posts index

Rob Maples
Re: crossdomain policy file issues
on Jan 6, 2009 at 4:21:12 pm

UPDATE:

I was able to get access to the root directory of the webserver via a different port. so now everything is going through http://gai-dsmsvr:83/crossdomain.xml which got rid of that error I was getting in the output.

My question now is this:

With my given code, the files pull the initial update but after that they no longer pull the information. This only happens on the screens authenticated on the active directory domain.

The file works as planned without error on machines on the internal network NOT authenticated on the domain... which is puzzling.

So does anyone have any insight on making a flash file read external data through an internal network with active domain??....

Thansk.

--
Doobie Doobie Doo
beware the penguins


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]