Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




System.security.loadPolicyFile



Hi, I'm attempting to load a crossdomain.xml file from a folder. I have an ad banner and my client wants all the jpgs and xml file to live on amazon's s3 server, so I of course need a crossdomain.xml file. But it can't live on the root of the domain. So I've tried using System.security.loadPolicyFile("



Adobe > ActionScript 1 and 2
Posted on: 12/05/2008 05:31:52 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

System.security.loadPolicyFile
Hi, I'm attempting to load a crossdomain.xml file from a folder. I have an ad banner and my client wants all the jpgs and xml file to live on amazon's s3 server, so I of course need a crossdomain.xml file. But it can't live on the root of the domain. So I've tried using System.security.loadPolicyFile("

[Q] What's A FP6 Alternative For System.security.loadPolicyFile()?
Howdy...

I thought that my project can be FP7 piece, so I just used System.security.loadPolicyFile() to pull the dynamic data into the Flash piece...

Guess what... My big boss was doing a presentation and his notebook happens to be the one with FP6 and he could not get the dynamic data...

Now, I've got to change it so that the app will run in FP6 as well... Dang it...

So... Here is a question...
What's a FP6 alternative for System.security.loadPolicyFile()???
I have my movie on the http://www.mydomain.com, and it's loading some live data from the http://www.mycompany.com domain's ASPX page via LoadVars().sendAndLoad() function...

The only thing I can remember/find is this one which requires FP6.0.65.0...
Loading data across domains
http://www.macromedia.com/cfusion/kn...fm?id=tn_16520
Any other option do we have???

Listener For System.security.loadPolicyFile?
I need to figure out a way to check if a crossdomain policy file has been loaded before initializing a certain component. The component won't work correctly if the crossdomain policy hasn't been loaded. Is there a way to do this? I can't figure out a way to get this working. This is the script I'm using:

System.security.loadPolicyFile("http://www.remotewebsite.com/crossdomain.xml");

System.security.loadPolicyFile In MOZILLA
I use System.security.loadPolicyFile("www.domain.com") and I try loading something from www.domain.com, but if www.domain.com is unavailable and the policy file can't be loaded, then in Mozilla I get no error that the URL is unavailable, because Flash awaits forever and ever for that policy file...

Anyone has any sugestion or clues on what happnes there?
In IE everything works great...

Thanks

Security.loadPolicyFile
Hello
If i need to load media content(gif, jpg files) from two different domains can I load two different crossdomain.xml from there?
For example:
Security.loadPolicyFile("

Problem With Security.loadPolicyFile
in actionscript 3 I'm noticing it only allows 1 call to this? to the same ip/port combination..?

Because for whatever reason some of my clients arn't sending the right Policy File Request <policy-file-request/> to my server, which serves policy files. now this is a problem. so I tried to rig up a lil timer to check if a user is connect ed, if not, it'd try to redo the connection phaze, connect -> request policy file -> send message, -> recieve data.

however, like my luck seems to always go, this is not a very good answer to my problem. if anybody here knows a solution? :S Thanks

System.security.allowDomain
i made a chat flash movie in flash. I have also made a Visual Basic application. The flash movie (located on the server) tries to make a socket-connection with my local ip (visual basic application). This works fine when both applications are running on my local pc. But when i upload the flash movie 2 the server it doesn't work anymore. This is because off the following reason:

The XMLSocket.connect method can connect only to computers in the same subdomain where the SWF file (movie) resides. This restriction does not apply to movies running off a local disk. (This restriction is identical to the security rules for loadVariables, XML.sendAndLoad, and XML.load.)


System.security.allowDomain
This undocumented method (System.security.allowDomain) grants permission for the specified domain(s) to access objects and variables in the flash movie that calls the allowDomain command. This property had to be implemented because of the changes made to the Security Sandbox in the Flash 6 Player...

My question is: DOES SOMEBODY NOWS HOW THIS METHOD WORKS>??????
My Flash movie still doesnt connect 2 my local VB application. PLEASE HELP! Thank you

System.security.allowDomain Help
Hi there!
Im having trouble with this script!
My server is on my comp which is connected to the net through a net work. The network has no firewall (Should do!) but the swf doesnt seem to connect to it.

Could you give me any pointers...

Thanks!
Stevz!

System.security & Crossdomain Help...
System.security & crossdomain help...

ok.. I cant seem to figure out why.. when I test locally the PHP scripts I call.. work fine..they do their job..and return the required data.. (yeah)

however each of these 3 php scripts are located on 3 different servers..

when I upload my project to a LIVE host.. the PHP scripts stop working.

I have tried putting a crossdomain.xml file on the server that hosts the .swf and loading THAT through loadPolicy (just something I had read here to try)

I have also tried putting a crossdomain.xml

PHP Code:



<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy sYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
  <allow-access-from domain="*" />
</cross-domain-policy>



on each of the servers,,,in the same directory where these .php scripts are that I am calling.

System.security.allowDomain()
Hi,

I'm using a container.swf, (loaded over HTTP) to load a form in the
same domain over HTTPS.

I have tried using both System.security.allowDomain() and System.security.allowInsecureDomain() to achieve this, will little sucess.

Has anybody had any similar problems/experience that could offer an insight
on this?

What's The System.security.allowDomain()
I don't understand Flash2004's Help about System.security.allowDomain().
Please help me

What's The System.security.allowDomain()
I don't understand Flash2004's Help about System.security.allowDomain().
Please help me

System.security.allowDomain()
i'm having trouble with the new security model.

when i type in the URL for my site like this:
http://www.mysite.com

everything's peachy. however, when i type in the URL like this:
http://mysite.com

i receive a flash player security warning.

i tried putting this code:

ActionScript Code:
System.security.allowDomain("http://www.mysite.com", "http://mysite.com");

at the top of the first frame of my main movie, but to no avail. i tried putting it at the top of all of my movies - still no luck. macromedia's tech docs aren't helping any either, though i haven't tried the 'policy file' thing yet.

this is even more of a problem for me than just the annoying security dialog - my movie loads movies (from the same server) that can only be controlled via AS when i use the full 'www.' URL.

sooo....what am i doing wrong?

thanks!
-depth

System.security.allowDomain
Hi, there all!

I have a problem, that it some of you know how ro solve it! PLEASE HELP!

I have to movies
one is located in www.A.com and the other in www.B.com

The one who is hosted in A has a script wich load data froma a filemaker database; this works fine.

Then when I load this movie into an empty MC in movie B the database info dont work. I try Ssytem.security.allowdomain as it follows:

System.security.allowDomain("www.B.com", "www.A.com");
my_lc.allowDomain = function(sendingDomain) {
return (sendingDomain == "www.B.com" || sendingDomain == "www.A.com");
};

BUT NOTHING HAPPENS...
DO YOU GUYS EVER USE System.security.allowDomain before?

CAN YOU SEND ME SOME CODE TO START ALL OVER AGAIN OR SOMETHING?

my mail: felipe@mexmags.com

THANKS A LOTfelipe@mexmags.com

System.security.allowDomain() ?
Hi.

I have php script in http://www.domain1.com/script.php

And swf flie in http://www.domain2.com/main.swf which is calling php from domain2 .

when I'm calling php from domain2 it doesn't work. I'm using loadvars.sendAndLoad() method( post) .

I try System.security.allowDomain("http://www.domain1.com") in swf , but still doesn't work .

Can anyone help me ?

System.security.allowDomain - How Much Is Allowed?
In reading the Flash docs, it looks like the allowDomain function will let your movie load movies from other sites and access the variables of that movie, but what else does it allow? Does it allow XML loading from other domains, image and MP3 loading, etc?

System.security.allowDomain() Not Working
I have a movie that resides on www.mydomain.com. The actionscript used to load content specifies "www.mydomain.com." When the movie is accessed via mydomain.com (no www.) it fails to load the content.

I've read the help file and used the exact code recommended, as follows:


Code:
System.security.allowDomain("www.mydomain.com", "mydomain.com");
But it doesn't work. Am I missing something? Any advice would be greatly appreciated. I'm using Flash Player 7.

Thanks in advance!

afro

System.security.allowDomain Not Working?
Hi

I am trying to load a Flash Paper document into my IDE. I used:


ActionScript Code:
System.security.allowDomain ("http://www.mydomain.com");

Which doesn't work. When I load the Flash Paper, I get this error (about 2,500 of them):

*** Security Sandbox Violation ***
SecurityDomain 'http://www.mywebsite.com/files/MyFlashPaper.swf?POPUP_ENABLED=false' tried to access incompatible context ‘file:///C|/AppServ/www/mywebsitefile.swf’
*** Security Sandbox Violation ***
SecurityDomain 'http://www.mywebsite.com/files/MyFlashPaper.swf?POPUP_ENABLED=false' tried to access incompatible context ‘file:///C|/AppServ/www/mywebsitefile.swf’
*** Security Sandbox Violation ***
SecurityDomain 'http://www.mywebsite.com/files/MyFlashPaper.swf?POPUP_ENABLED=false' tried to access incompatible context ‘file:///C|/AppServ/www/mywebsitefile.swf’
*** Security Sandbox Violation ***
SecurityDomain 'http://www.mywebsite.com/files/MyFlashPaper.swf?POPUP_ENABLED=false' tried to access incompatible context ‘file:///C|/AppServ/www/mywebsitefile.swf’
*** Security Sandbox Violation ***
SecurityDomain 'http://www.mywebsite.com/files/MyFlashPaper.swf?POPUP_ENABLED=false' tried to access incompatible context ‘file:///C|/AppServ/www/mywebsitefile.swf’
*** Security Sandbox Violation ***
SecurityDomain 'http://www.mywebsite.com/files/MyFlashPaper.swf?POPUP_ENABLED=false' tried to access incompatible context ‘file:///C|/AppServ/www/mywebsitefile.swf’
*** Security Sandbox Violation ***
SecurityDomain 'http://www.mywebsite.com/files/MyFlashPaper.swf?POPUP_ENABLED=false' tried to access incompatible context ‘file:///C|/AppServ/www/mywebsitefile.swf’
*** Security Sandbox Violation ***
SecurityDomain 'http://www.mywebsite.com/files/MyFlashPaper.swf?POPUP_ENABLED=false' tried to access incompatible context ‘file:///C|/AppServ/www/mywebsitefile.swf’
*** Security Sandbox Violation ***
SecurityDomain 'http://www.mywebsite.com/files/MyFlashPaper.swf?POPUP_ENABLED=false' tried to access incompatible context ‘file:///C|/

Anyone else have this issue?

System.security.allowDomain Has Anyone Ever Been Able To Get This To Work
Woot i finally get to ask a question.

System.security.allowDomain("64.215.157.130")
_root.allowDomain = function (sendingDomain){
return(sendingDomain =="64.215.157.130")
}

Does anyone have any direciton on how this is supposed to work? I cant find any good documentation. i need to access the data within swf files on a different domain?

any help would be greatly appriciated.

System.security And Crossdomain.xml Question
System.security.allowDomain("www1067.ssldomain.com");
I am also trying this
System.security.allowDomain("www1067.ssldomain.com/perlygates");

Hi everyone,

 I've added this to my code so I can sendAndLoad using https which is on another domain

http://perlygates.net (redirects after checking for Flash Player 7)
This prompts for a user name and password when in flash
(click on the door for guests then click on login)
I don't want it to prompt for anything from the browser.  

But when the login url is typed directly in the browser it goes to the url without prompting for a password.

https://www1067.ssldomain.com/perlygates/cgi-bin/composer/clients/perlygates_net/loginBoard.cgi?usr=guest&psw=noPass

I put this crossdomain.xml file in the base directory at perlyates.net

CODE<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy
  SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
   <allow-access-from domain="www1067.ssldomain.com/perlygates" />
   <allow-access-from domain="perlygates.net" />
</cross-domain-policy>

[HELP] System.security.allowDomain Any Domain
I have finished reading this, but cannot find any solution
http://www.macromedia.com/devnet/fl...r_security.html

I have a utility.swf file hosted at http://www.utility.com
I have a caller.swf file hosted at http://www.mysite.com

In caller.swf, I used loadMovie to load utility.swf and try to access the method(scripting, variable, etc).

I have setup a policy xml file, grant all permission

I know that is a way to allow caller.swf to access method, running scripting on utility.swf by setting

Code:


System.security.allowDomain("http://www.mysite.com");

on utility.swf

However, in future I want any domain to able to access utility.swf no matter where they load my utility.swf from.

How to do it? I wish there is a way to put, example:

Code:


System.security.allowDomain("*");


I have tried above, it is invalid and not working.

Advanced Help Needed System.security.allowDomain
i made a chat flash movie in flash. I have also made a Visual Basic application. The flash movie (located on the server) tries to make a socket-connection with my local ip (visual basic application). This works fine when both applications are running on my local pc. But when i upload the flash movie 2 the server it doesn't work anymore. This is because off the following reason:

The XMLSocket.connect method can connect only to computers in the same subdomain where the SWF file (movie) resides. This restriction does not apply to movies running off a local disk. (This restriction is identical to the security rules for loadVariables, XML.sendAndLoad, and XML.load.)


System.security.allowDomain
This undocumented method (System.security.allowDomain) grants permission for the specified domain(s) to access objects and variables in the flash movie that calls the allowDomain command. This property had to be implemented because of the changes made to the Security Sandbox in the Flash 6 Player...

My question is: DOES SOMEBODY NOWS HOW THIS METHOD WORKS>??????
My Flash movie still doesnt connect 2 my local VB application. PLEASE HELP! Thank you

How Does System.security.allowDomain(domain) Exactly Work?
Hi,

how does it work?


ActionScript Code:
var domain = "http://www.mydomain.com";System.security.allowDomain(domain)



regards

System.security.allowDomain - Works Locally But Not On Webserver
I'm using flash 7. My application is a weather bug on a portal page. I'm getting the feed from yahoo and compile the application using System.security.allowDomain("

Status Of A LoadPolicyFile() ?
This thing is driving me INSANE. I am connecting to a Java game server via an XMLSocket and serving the crossdomain.xml policy file via loadPolicyFile(). The problem is, the thing either works, or it doesn't. Is there any way I can get any status information back from loadPolicyFile() ? Anything would help -- file didn't load, file is invalid, anything. Is there a way to attach an onLoad handler to this? The documentation claims that this thing will wait for a response before it attempts any connections. But I have no idea if it is doing that and THEN failing, or what.

Thanks for any help!

XMLSocket And LoadPolicyFile
Writing an XMLSocket based flash client and socket server app - all is running - have figured out crossdomain issues - all (finally!) working great...

HOWEVER:
I think repeated calls to System.security.loadPolicyFile with the same uri ("xmlsocket//blah:x" during an install process to detect the socket server running) are not working for us - my only theory is that the first call is cached internally - and subsequent calls to loadPolicyFile with the same uri are ignored.

Can anyone confirm? My tests with a tcpip monitor seem to confirm... though i could just be dead wrong anyway. I have tried appending "/" + getTime() to the uri to trick flash into not caching, but no luck. Any theories welcome...

LoadPolicyFile For Sub Directory
I put a security policy xml file in a subdirectory and the following code in the fla file:

Code:
Security.loadPolicyFile("

Status Of A LoadPolicyFile() ?
This thing is driving me INSANE. I am connecting to a Java game server via an XMLSocket and serving the crossdomain.xml policy file via loadPolicyFile(). The problem is, the thing either works, or it doesn't. Is there any way I can get any status information back from loadPolicyFile() ? Anything would help -- file didn't load, file is invalid, anything. Is there a way to attach an onLoad handler to this? The documentation claims that this thing will wait for a response before it attempts any connections. But I have no idea if it is doing that and THEN failing, or what.

Thanks for any help!

How To Tell If LoadPolicyFile Succeeded?
Hi all, I am confused by ActionScript 3's loadPolicyFile function. It returns void, so how can I tell whether the request was successful?

Why do I care? I want to first request the policy file on the default port 843, then try other ports eventually landing on port 80. This is how Flash Media Server does it. I want to mimic that behavior. I need to know if a call to loadPolicyFile fails so I know to try the next port in the sequence.

Also, assuming the request for a policy file successfully retrieved the policy file, how do I know whether it granted access to the port I want to open? I presume I could just try to open the port and look for a security exception of some sort, but I am a noobie AS3 programmer and I have no idea how to trap such an exception.

All comments are welcome!

Crossdomain.xml And LoadPolicyFile
My xml news feed is located on a different server than my actual site, so I was told I needed to make a crossdomain.xml file and do a loadpolicy command in flash.

Code:

System.security.loadPolicyFile("http://blindedblack.airboxstudios.com/crossdomain.xml");
var policy_xml:XML = new XML();
policy_xml.load("http://blindedblack.airboxstudios.com/crossdomain.xml");
System.security.allowDomain("http://feeds.easyasair.com/37/newsfeed.asp");
System.security.allowDomain("http://www.easyasair.com");
System.security.allowDomain("http://feeds.easyasair.com");
System.security.allowDomain("http://easyasair.com");


crossdomain.xml:
Code:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
  <allow-access-from domain="feeds.easyasair.com" />
  <allow-access-from domain="feeds.easyasair.com/37/newsfeed.aspx" />
  <allow-access-from domain="www.easyasair.com" />
  <allow-access-from domain="easyasair.com" />
  <allow-access-from domain="*.easyasair.com" />
</cross-domain-policy>



I cant get it to work anyone know why?

LoadPolicyFile Produces Error
I'm trying to use the command System.security.loadPolicyFile( url:String ):void so that my swf can access a socket server on another domain. I've check the syntax 100 times and I know it's correct becasue I copied and pasted it from Macromedia's example code in the the help documentation. However, when I compile the swf, it says I have 1 error in my code "No such method 'loadPolicyFile'..." Even the syntax auto-complete offers the method as a suggestion!

I upgraded my Flash player to 7.2 as recommending in other forums but that did not solve the problem. Any ideas?? Thanks!

LoadPolicyFile/crossdomain.xml Broken ?
I think Adobe broke loadPolicyFile() in player 9.0.115.0, and am wondering if anybody can confirm this or escalate the issue. Related threads:

http://www.adobe.com/cfusion/webforu...&enterthread=y
http://www.adobe.com/cfusion/webforu...&enterthread=y
http://www.adobe.com/cfusion/webforu...&enterthread=y

Basically, loadPolicyFile() seems to be completely ignored in the plugin player, at least on OS X.

This is bad. It broke all my production code. I can't imagine it won't break others' when lots of users start upgrading. Which leaves me wondering what's going on. Is anybody else seeing this problem?

LoadPolicyFile / Crossdomain.xml Problems
I am attempting to communicate with a web service via flash across sub domains. All works fine and dandy on my local machine, but when i upload to my web server there is no communication across the domains. I have this line on the first frame of the first layer of my file


Quote:




System.security.loadPolicyFile("http://MYDOMAIN/StudentConnect2Apply/crossdomain.xml");




The way the servers are configured, i don't have access to the root of the domain to place the crossdomain.xml file there, so i have it in the folder next to the web service and link to it directly shown above.

The server containing the flash file is insecure and the web service is secure (https). this is what my crossdomain.xml file looks like:


Quote:




<cross-domain-policy>
<allow-access-from domain="*.MYDOMAIN.net" secure="false"/>
</cross-domain-policy>




I have also enabled logging within my flash player to track down problems, when i initially load the page in the browser, it approves the policy file:


Quote:




OK: Policy file accepted: https://MYDOMAIN/StudentConnect2Apply/crossdomain.xml




But after submitting the form and attempting to interact with the web service, i get an error saying permission is denied due to lack of policy file permissions and


Quote:




Warning: Failed to load policy file from http://MYDOMAIN/crossdomain.xml




It is looking in the root of the domain after i defined and it accepted the overridden location. Anybody have any clues on how to fix this?

LoadPolicyFile - POST Method?
Is it possible to have loadPolicyFile use an HTTP POST request like loadMovie can? The policy file server may need authentication via POST before it lets someone access files on its server.

Thanks in advance

Crossdomain.xml & LoadPolicyFile Error
I made a demo application that loads a crossdomain.xml file from a custom location, using "System.security.loadPolicyFile" method ... When I run this application in a browser, I see in my debug logs that its not only trying to access the policy file from the custom location, but the default location as well (a location in which there is no policy file there).

So its trying to pull from:
http://dev.myserver.com:8080/dir/subdir/crossdomain.xml as well as
http://dev.myserver.com:8080/crossdomain.xml

The other curious fact is that its a blank application- there's nothing except a "System.security.loadPolicyFile" method- so i don't know why it'd be trying to access the default crossdomain.xml location anyways, unless it was trying to make a call to that server.

I'm currently on Safari on Mac with Flash 9, but the error occurs on PC IE, etc... the app is compiled for Flash 8

Any help would be appreciated. Thank-you.

CrossDomain LoadPolicyFile Player 9.0.124
System.security.loadPolicyFile("xmlsocket://localhost:843")

this command line worked fine until I upgrade my player to version 9.0.124
Now it doesn't work at all !!

LoadPolicyFile On Xmlsocket Problem
Hi,

I have some strange problem regarding the security settings in Flash Player. I'm using AS3 to connect to port 80 on my server. Because this is only allowed after downloading a policy file, I'm calling

Security.loadPolicyFile("xmlsocket://"+_httpServer+":20");

just before

socket.connect(_httpServer, _httpPort);

On my server I tell inetd to listen on port 20 and start the following bash script after a connection has been established:

#!/bin/bash
read
printf '<?xml version="1.0"?><!DOCTYPE cross-domain-policy SYSTEM "

LoadPolicyFile / Crossdomain.xml Problem
I am at the end of my rope. Can someone provide any insight into this loadPolicyFile() problem?

-- I have a game server running on port 22777
-- I have my firewall routing all traffic from 80 to 22777 so both ports can be used identically
-- Port 82 is a HTTP port serving my crossdomain.xml file
-- Ideally I want clients to connect to port 80 as many users are restricted from other ports and cannot use my game

If you load http://72.32.145.244:82/crossdomain.swf you will see it fails on port 80 and succeeds on port 22777. When it gets the "status:" message response, it is working correctly. My policy file is at http://72.32.145.244:82/crossdomain.xml

By contrast, as a test, I do the exact same thing via PHP (connecting directly to port 80) and it works fine (I had to put it on another server so the firewall routes the external port): http://infinitefish.com/temp/status_test.php

The Flash side should load the crossdomain.xml policy file, then see that it is ok to connect to port 80 and do so. It does not. Below is the code for the Flash side:
(FLA available at http://72.32.145.244:82/crossdomain.fla)


Code:
class crossdomain extends MovieClip{

var mc:MovieClip;
var socket:XMLSocket;

var policy_port:Number = 82;
var policy_url:String;
var ip:String = "72.32.145.244";
var ports:Array;
var port_index:Number = 0;

var connected_to:String = "";

public function socket_send(msg:String){
output("Sending: <font color="#FF8800">"+msg+"</font>");
socket.send(msg + String.fromCharCode(1) + String.fromCharCode(1) + String.fromCharCode(0));
}
public function output(msg:String){
mc.out.htmlText += msg+"<br>";
}
public function socket_connect():Void{
if (port_index < ports.length){
output("Attempting Connection to "+ip+":"+ports[port_index]);
socket.connect(ip, ports[port_index]);
}
}
public function init():Void{
policy_url = "http://"+ip+":"+policy_port+"/crossdomain.xml";

ports = new Array();
ports.push(80);
ports.push(22777);

var crossdomain_mc:MovieClip = this;
socket = new XMLSocket();
socket.onConnect = function(success){
if (success){
crossdomain_mc.connected_to = crossdomain_mc.ip + ":" + crossdomain_mc.ports[crossdomain_mc.port_index];
crossdomain_mc.output("Connection Established");
crossdomain_mc.socket_send("status:");
}else{
crossdomain_mc.output("<font color="#FF0000">Connection Failed</font>");
crossdomain_mc.port_index++;
crossdomain_mc.socket_connect();
}
}
socket.onData = function(str){
crossdomain_mc.output("Receiving: <font color="#FFFF00">"+str+"</font>");
if (str.indexOf("players:")==0){
crossdomain_mc.output("<font color="#00FF00">Test Successful on "+crossdomain_mc.connected_to+"</font>");
}
}
mc.out.text = "";

output("[Note: Ports "+ports.join(", ")+" on "+ip+" are the same service]");
output("Loading policy file from "+policy_url);

System.security.loadPolicyFile(policy_url);

socket_connect();


}

public function crossdomain(){
mc = this;
init();
}
}
And here's the PHP example connecting directly to 80, demonstrating that the services are identical:


PHP Code:



<?$fp = @fsockopen("72.32.145.244", 80, $errno, $errstr, 10);if (!$fp){      echo '<font color="#880000">Server is down.</font>';}else{            $cmd = 'status:'.chr(1).chr(1).chr(0);      fwrite($fp, $cmd);      $out = fread($fp, 256);                  fclose($fp);                  $out = str_replace(chr(0), "", $out);      echo $out;}?>




Thanks very much for any insight!

Xmlsocket, Loadpolicyfile, Weird Problems
Goodmorning!

I'm desperate, i have a flash application which needs to check if a local server has started... this server answers to my xmlsocket requests.

In order to access the server i have to do a:
System.security.loadPolicyFile("xmlsocket://localhost:80");
then i do a
myXmlSocket.connect("localhost","80");

This works as expected when server is running.

problems arise when i need to check if this server is running or not (it may not be always up)...
if i do a loadPolicyFile when server is down i get no errors...
then EVERY following socket connection (including new loadpolicyfile requests) is not being sent (!!!) by the flash player.

Any suggestion/experience with this problem ?

Thanks in advance for any answer,
Dario De Agostini

LoadPolicyFile / Crossdomain.xml Firefox Problem
I'm developing a flash tool which needs to send and receive data from an external webservice.

The flash tool is hosted on another domain than the webservice, so I need to specify the location of the crossdomain.xml file (because the crossdomain.xml file is not located in the root of the domain)

To make this work I use the following line of code:
System.security.loadPolicyFile("http://..../subdir/crossdomain.xml");

When I run the flash from within Internet Explorer the Webservice is working as expected. In Firefox however I receive a popup with an authentication window. It looks like the flash applet in firefox is trying to load the crossdomain.xml from the root of the external domain (because in this case the root of this domain is password protected) and doesn't use the url of the crossdomain.xml file location which i defined.

Can anyone help me with a solution for this problem?

[ActionScript 2] - LoadPolicyFile / Crossdomain.xml Firefox Problem
I'm developing a flash tool which needs to send and receive data from an external webservice.

The flash tool is hosted on another domain than the webservice, so I need to specify the location of the crossdomain.xml file (because the crossdomain.xml file is not located in the root of the domain)

To make this work I use the following line of code:
System.security.loadPolicyFile("

Flash.system.System.totalMemory Different Than Windows Mem Display
Anyone know why flash.system.System.totalMemory is much different than what I see FlashPlayer taking up in the Windows Task Manager?

I would expect to see some overhead, but the differences I'm seeing are quite large (i.e. 80MB vs 150MB).

Thanks

What Does System.capabilities.language Return On Your System?
I am working on a multi-lingual web site that automatically detects the user's OS or browser language by using System.capabilities.language .

Since I am running a german OS/browser, this returns 'de' in my case, but I wonder what it returns on other systems (english, french, spanish etc.)

To find this out, please copy and paste this code into a Flash doc and see what it says:

trace( System.capabilities.language );

Thx!

Mike

System.pause(); And System.resume();
I've been looking for a simple way to pause everything inside the flash player when a user clicks on a pause button. I found what I thought to be a solution by running System.pause() method. This sounds funny but the problem is that this method does exactly what it's supposed to do, meaning it pauses EVERYTHING.

There is another System method call resume(). But with the entire player pause, how is one supposed to call this method when the pause button is clicked a second time?

This is what I thought about using:


ActionScript Code:
public function pauseSystem(evt:MouseEvent):void {
            if(!sytemPaused){
                sytemPaused = true;
                System.pause();
            } else {
                sytemPaused = false;
                System.resume();
            }
        }

But once the pause() method runs, nothing is clickable. I've got tons of event listeners and things happen all at once, so I'd rather not have to go through removing and adding event listeners every time the user clicks a pause button. Any ideas? Thanks.

Security
I realise that it not the most secure site in the world but I have organised a static site that has password access using arrays in flash. Simple but Adv.s and Disadv.s from anyone? I have already taken care of the obvious and put all important frames not on the scene timeline (in nested movie clips instead) so that the user can't just right-click and progress the frames to get access.
It is a temporary arrangement but I would like a deeper understanding of the current situation.

Any help and insight would be very useful thankyou.

SWF Security
I just wanted to ask if SWF files are secured? What I mean is that can programmers/hackers get or take a view on the source code by using the swf. Or can hackers determine the variables that are being passed from one swf to another swf or can they track variables sent from swf to databases? Hope to hear from you guys.

Security
Does anybody know how to really protect yor actionscript in flash MX.
It's so frustrating spent so many hours to develop an application and people using swfdecompiler, flasm or etc still your code.

Security
question: how to disable to someone link my flash to another site, or should i said steal?

Security
Can we make our flash movie run on computer only when that CD is inserted in CD rom. it should not run by copying the same flash file on hard disk. it should always ask for cd.

Copyright © 2005-08 www.BigResource.com, All rights reserved