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




Security Error #2060



I have a program that will pass a string from the flash player to a form on the web page. I use the ExternalInterface. It works on one computer but on another I get the error "Security Error #2060"I am not sure what is different between my two computers that would cause any problem. Any advice would be helpful.



Adobe > ActionScript 3
Posted on: 01/08/2008 09:32:03 AM


View Complete Forum Thread with Replies

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

Security Error #2060
Hello,

I've a little problem, I have develop an application flash with CS3 professional. This application shows a picture where the url is crossed in parameter of the oject. When my swf type flash and my html page are on a domain, all process are succefull on all navigator.

Now My web site is on a domain and the flash file is on an another domain. My web site call swf file type. On navigator Internet explorer 6 and more the process is executed normaly but on navigator firefox 2.0 and more, i have the error :

SecurityError: Error #2060: Violation of Sandbox security : calling ExternalInterface domaine1.com/Flash/ZoomViewer.swf cannot achieve at domaine2.com/adlp/testFL3.html.
at flash.external::ExternalInterface$/flash.external:ExternalInterface::_initJS()
at flash.external::ExternalInterface$/addCallback()
at ZoomViewer_fla::MainTimeline/ZoomViewer_fla::frame1()

someone can help me please ?

Sorry for my bad english.

Error #2044: Unhandled SecurityError:. Text=Error #2048: Security Sandbox Violation
I've recently created a flash blog application and locally it works perfectly. However when I upload it to my web server it throws this error at me.

'Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation'

I've searched around it people have been saying that it's to do with loading in files from servers that are external to the one the flash file is hosted one. But my flash file only loads two XML files, both of which are on my server, albeit in a different directory.

If anyone has any ideas I'd appreciate the help

Using CS3 - Security Errors: Error #2148 And Error #2044
I am using Flash CS3. I'm doing everything by the book by creating and inserting a video into my web page.
When I use Dreamweaver CS3 I can get the video to display on the web page. However, when using Flash CS3 I get
the Security Errors: Error #2148 and Error #2044, and the video will not show up.

If the code would help to help me with this, it is below. I have two videos showing:
- the top one inserted by Dreamweaver, which works.
- the one below it, inserted by Flash and is doesn't.

When I view the Flash inserted video on an .html page it works fine, but when I try to view
it on our .asp page it will not. The paths to the files are the same, (but the file names are different) so that should not be the issue.

Any help out there?

Thanks.

Michael

<!--flash 1 insert begin -->
<tr>
<td valign="middle" align="center" style="background:url(../../images/video_bg2.gif) no-repeat" width="278" height="237">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width','261','height','194','id','FLVPlayer','align','middle','src','Flash_Video/YMCA/FLVPlayer_Progressive','flashvars','&MM_ComponentVersion=1&skinName=/flash_video/ymca/Clear_Skin_1&streamName=/flash_video/ymca/ymca3&autoPlay=true&autoRewind=false','quality','high','scale','noscale','name','FLVPlayer','salign','LT','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','Flash_Video/YMCA/FLVPlayer_Progressive','bgcolor','#000066' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="

SecurityError #2060
Hello,

I've a little problem, I have develop an application flash with CS3 professional. My web site is on a domain and the flash file is on an another domain. My web site call swf file type, and i set a parameter, this parameter is an url of picture.
On navigator Internet explorer 6 and more the process is executed normaly but on navigator firefox 2.0 and more, i have the error :

SecurityError: Error #2060: Violation of Sandbox security : calling ExternalInterface http://domaine1.com/Flash/ZoomViewer.swf cannot achieve at http://domaine2.com/adlp/testFL3.html.
at flash.external::ExternalInterface$/flash.external:ExternalInterface::_initJS()
at flash.external::ExternalInterface$/addCallback()
at ZoomViewer_fla::MainTimeline/ZoomViewer_fla::frame1()

someone can help me please ?

Sorry for my bad english.

Security Error
I am getting this weird security error and I don't know how to fix it please help.

Code:
SecurityError: Error #2070: Security sandbox violation: caller file:///Users/Tony/Documents/Test1/ACE/main.swf cannot access Stage owned by file:///Users/Tony/Documents/Test1/ACE/ACE.swf.
at flash.display::Stage/get stageWidth()
at org.flepstudio::Main/createThumbs()
at org.flepstudio::ImageLoader/createThumb()
at org.flepstudio::ImageLoader/completato()
Thanks in advance.

Security Error?
I am creating an image ticker with dynamically loaded xml. For some reason if I try add an onRelease event with my duplicate movie it throws a security sandbox error, but I've allowed both domains. It never seems to trigger the error at the same time. Sometimes it seems to work, but not always.


PHP Code:



import com.smizzle.XMLReader;
import flash.geom.*;
import mx.utils.Delegate;

Stage.scaleMode = "noScale";

//variables set by user
var domainName:String = _root.domainName||"philadelphiasoul.com";
var ismmediaAccount:String = _root.ismmediaAccount||'ISM3';
var targetXML:String = _root.targetXML||"http://ism3.infinityprosports.com/ismdata/2006090700/std-sitebuilder/sites/200601/www/en/index.html?content_type=xml&plugin_id=std-adspots.xml.pool";
var mediaCategory:Number = Number(_root.mediaCategory)||8;
var numOfMediaItems:Number = Number(_root.numOfMediaItems)||10;
var stageWidth:Number = Number(_root.stageWidth)||394;
var stageHeight:Number = Number(_root.stageHeight)||150;
var direction:String = _root.directon||"right";
var speed:Number = Number(_root.speed)||5;
var spacing:Number = Number(_root.spacing)||5;

System.security.allowDomain(domainName+".ismmedia.com");
System.security.allowDomain(domainName);
System.security.loadPolicyFile("http://ismmedia.com/crossdomain.xml")

var origH:Number = 200;
//program Vars
var offsetH:Number =(origH-stageHeight*1)/2;
var totalAds:Number = 0;
var curNum:Number = 0;
var vX:Number = (direction == "right")?speed:-1*speed;
var totalWidth:Number;
var startPos:Number = 0;
var minX:Number;
var ads:Array = new Array();

var reader:XMLReader = new XMLReader(mediaCategory, numOfMediaItems, domainName, targetXML, ismmediaAccount);
reader.addEventListener("loaded",this,"xmlLoaded");

function xmlLoaded():Void{
    totalAds = reader.getLength();
    var banner:MovieClip = _root.createEmptyMovieClip("banner",1);
    makeTape();
}

function targetLink(){
    var id:Number = Number(this._name.split("_c")[0])
    var newWindow:Number = Number(reader.getProperty(id,"is_blank"));
    var path:String = reader.getProperty(id, "url_tracked")
    //getURL(path,(newWindow)?"_blank":"_self");
    trace(path+": "+newWindow)
}

function onLoadInit(target:MovieClip):Void{
    target._xscale = target._yscale = (stageHeight/target._height)*100;
    target.onRelease = targetLink;
    imgLoader.position = new Point(startPos,offsetH)
    target._x = startPos;
    target._y = offsetH;
    startPos += target._width +spacing;    
    curNum++;
    if(curNum<totalAds){
        makeTape()
    }else{
        totalWidth = Math.max(startPos,stageWidth);
        minX = startPos - target._width;
        _root.banner.onEnterFrame = Delegate.create(this,mover);
    }    
}

function makeTape():Void{
    totalWidth = _root.banner._width
    var ad = _root.banner.createEmptyMovieClip(curNum,curNum);
    ads.push(ad)
    var imgLoader:MovieClipLoader = new MovieClipLoader();
    imgLoader.addListener(this);
    imgLoader.loadClip(reader.getProperty(curNum, "image"), ad);    
}

function mover():Void{
    for(var i:String in ads){
        ads[i]._x += vX;
        if(vX > 0){    
            if(ads[i]._x > totalWidth){
                removeMovieClip(ads[i])
                ads = ads.slice(ads[i]);
            }
            if(ads[i]._x + ads[i]._width > totalWidth){
                var newAd:MovieClip = duplicateClip(ads[i]);                
                if(newAd){
                    newAd._y = offsetH;
                    newAd._x = -ads[i]._width-spacing;
                    if(!checkArray(newAd,ads))
                        ads.push(newAd)
                }
            }
        }else{
            if(ads[i]._x + ads[i]._width < 0){
                removeMovieClip(ads[i])
                ads = ads.slice(ads[i]);
            }
            if(ads[i]._x  < 0){
                var newAd:MovieClip = duplicateClip(ads[i]);
                if(newAd){
                    newAd._x = totalWidth + spacing;
                    newAd._y = offsetH;

                    if(!checkArray(newAd,ads))
                        ads.push(newAd)
                }
            }

        }
    }
}

function duplicateClip(m:MovieClip):MovieClip{
    var copy:String = m._name+"_c";
    var orig:String = m._name.substring(0,m._name.length -2);
    if(!_root.banner[copy] and !_root.banner[orig]){
            var temp:MovieClip = m._parent.createEmptyMovieClip(m._name+"_c",m._parent.getNextHighestDepth())
            var id:Number = Number(m._name.split("_c")[0])
            var mcListener:Object = new Object();
            mcListener.onLoadInit = function(target:MovieClip){
                target._xscale = target._yscale = (stageHeight/target._height)*100;
                target.onRelease = targetLink;
            }
            var imgLoader:MovieClipLoader = new MovieClipLoader();
            imgLoader.addListener(mcListener);
            imgLoader.loadClip(reader.getProperty(id, "image"), temp);
            //duplicateMovieClipImage(m,temp)
            return temp;
    }
}

function duplicateMovieClipImage(from, target):Void{
    var visuals = new flash.display.BitmapData(from._width, from._height);
    var m:Matrix = new Matrix();
    m.scale(from._xscale/100,from._xscale/100)
    visuals.draw(from,m);
    target.attachBitmap(visuals, 1);
}


this.onMouseMove = function(){
    vX = (banner.hitTest() == true)?5:(this._xmouse-(stageWidth/2))/30;
}

function checkArray(o:Object, a:Array):Boolean{
    for(var i:String in a){
        if(a[i] == o){
            return true;
        }
    }
    return false;


Security Error
I figure I write in these forums also since I have always recieved great help in here.
Have been working with smartfoxserver for a short while now and have the server up and running, and working great localy.
But with so many others I run into problem when I try to use it outside my own "sandbox".

I have had the usual problem for a time now when it told me it was a sandbox violation that I was facing and I have been trying to get it to load the security approval through xml.
Now I don't get the error where it specificly say sandbox violation but instead it says
Quote:




Security error: Error #2048




I'm not familiar with servers and sadly not enough of a computernerd even though I wish I was

Is this new security error stil an error that reflects on sandboxes or could it be something else like perhaps firewalls etc?
I'm using servers as part of a schoolproject and since it's located on the school there might very well be something like that.
Anyone else that have recieved this error and know where it comes from?

Also wondering on how to run
Quote:




System.security.loadPolicyFile("something/dir/crossdomain.xml")




Since I get the error
Quote:




1119: Access of possibly undefined property security through a reference with static type Class.




Any help would really be appreciated

Please Help Security Error
Hi. I am fairly new to actionscript and flash, so i need help with a problem which is probably trivial. My website ran perfectly while I was developing it in flash but when I uploaded it to the server, it stopped working.

My flash site gets its data from a MySQL database through a PHP script. both the php scripts and the flash movie are located on the same server. so why does flash throw this error:

"Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://www.nymotor.org/site.swf cannot load data from http://nymotor.org/php/getbrands.php.
at site_fla::MainTimeline/carcatalogmainfunction()
at site_fla::MainTimeline/site_fla::frame46()
"

When it tries to access the php script?

Any help would be greatly appreciated. Thank you very much for your attention.

Security Error Help
Ok i have 2 files here:
- game.swf (On localhost)
- room.swf (http://labs.henriwatson.com/oabbo/game/media/)

So game.swf loads up room.swf then on room.swf there is a button that when clicked game.swf goes to frame 4, but when doing this flash gives me a security error (room.swf tried to access incompatible content)

Security Error
Hey,
I am receiving a security error caused by a embedded swf that is attempting to place a MovieClip, which contains a few flash components, on the root of the embedded swf. I have isolated the cause of the error to the components. If any component is in the display list of the MovieClip, I get the error. Once I remove all of the components from the display list, it works just fine. I've tried embedding the components into the library of the base swf with no luck. Here's the error I'm receiving:


Code:
*** Security Sandbox Violation ***
SecurityDomain 'file:///Users/marc.smith1/marCus/hgProjects/D2R v2.0/site/swf/main.swf' tried to access incompatible context 'file:///Users/marc.smith1/marCus/hgProjects/D2R v2.0/site/swf/base.swf'
SecurityError: Error #2070: Security sandbox violation: caller file:///Users/marc.smith1/marCus/hgProjects/D2R v2.0/site/swf/main.swf cannot access Stage owned by file:///Users/marc.smith1/marCus/hgProjects/D2R v2.0/site/swf/base.swf.
at flash.display::Stage/flash.display:Stage::requireOwnerPermissions()
at flash.display::Stage/addEventListener()
at fl.core::UIComponent/::callLaterDispatcher()
at flash.display::DisplayObjectContainer/addChildAt()
at com.d2r.framework::Main/loadLogin()
at com.d2r.framework:Base/private:_checkAuth/com.d2r.framework:parseAuth()[/Users/marc.smith1/marCus/hgProjects/D2R v2.0/flash/com/d2r/framework/Base.as:81]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
Not sure what exactly is happening. Never come across this issue before. If anybody can shed some light on this I would be most grateful, this thing is driving me crazy.

Thanks in advance.

SecurityError Number 2060 -
The documentation for the runtime error for 2060 states:
"2060Security sandbox violation: ExternalInterface caller _ cannot access _."
And, using the debugger flash player, when you catch an error it fills in those string values of the message property with URLs, ie:
Error #2060: Security sandbox violation: ExternalInterface caller http://myhost.com/test/Test.swf cannot access http://otherhost.com/test/Test.html.

Now, the documentation indicates for the release version, the error text is left out for size reasons. So, I assume in the run time engine, before the error is thrown, it does not set the securityError's message property at all - it leaves it null. However, I'm curious... are the URLs still available? I'm interested in the second one (in my example, the otherhost.com/test/Test.html).

I have some AS3 code that runs a quick javascript to get location.toString to get the URL. If allowScriptAccess is allowed, this works fine. If not, it throws the error. That's fine, but I'd really like to get the URL that the debugger has - obviously the player has access to it and knows it, so is this stored anywhere? Is there some under-the-hood method or property that I can call to get this after the error is thrown?

Thanks a lot...






























Edited: 12/18/2007 at 05:47:51 AM by oguru

Security Sandbox Error
Has anyone ever seen this when trying to use dropdown mwnus in a scrollpane?

*** Security Sandbox Violation ***
SecurityDomain 'http://www.welcomerunners.com/site/swf/sweepsEntryForm.swf' tried to access incompatible context 'file:///Macintosh%20HD/Users/Mary/projects/JetBlue/FLA/JBHomeB.swf'

Security Error Issue
Hello,
I made a button into my SWF file. When the use clicked on it, the user will be leadto a web address ( e.g www.google.com). I get this error when I clicked to my button.
SecurityError: Error #2028: Local-with-filesystem SWF file file:///D|/test.swf cannot access Internet URL http://www.google.com.

As I got we should use allowdomain(dom1,dom2,...) method accept other SWF files which are resides into dom1,dom2,..
Whats happen if we want to move user to other web page without any security error or involving user to sandbox setting.
Best,

Security Sandbox Error...
*** Security Sandbox Violation ***
SecurityDomain 'file:///C|/Projects/MediaManager/src/main.swf' tried to access Player UI context

it happens on a line of code that says:


Code:
this.stage.focus = ioFocus;
where ioFocus is of the type InteractiveObject. It only seems to happen when ioFocus is null...why would setting the stage's focus object to null cause a sandbox error?

Security Sandbox Error
I am trying to do the following yet I am receiving a security sandbox error. I'll explain my situation in detail:

I am hosted on server A and would like to connect to server B on port 13000 using the URLLoader / URLRequest classes.

Obviously, locally everything works fine, when deployed online it doesn't work.

Server B on port 13000 does not have a web server so I can't deploy crossdomain.xml on the root of server B at port 13000.

I have tried to set up a socket policy server using Zapp Monkey FPS server (http://blog.zappmonkey.com/2008/01/1...policy-server/) on server B at port 843 but it doesn't seem that Flash was connecting with the policy file server when trying to access server B on port 13000.

I have read that Flash checks only for the socket policy file server if you are using Socket / XMLSocket classes.

Anybody can guide me to what I need to do to be able to successfully access server B on port 13000 from server A using the URLLoader Class?

Sandbox Security Error?
I have a site that I've migrated to a VPS hosting account about the same time the new Flash player came out so I cannot nail down the problem. It's an upload/downloading portal for a client to connect to his clients using a control panel, in Flash.

It used to upload and download fine. However I had to move it to a VPS server to allow for large uploads. It uploads fine still but now it doesn't download anything uploaded. I get a sandbox security error. I have a crossdomain file in place to allow access from any domain....

Ideas?

Security Sandbox Error
I keep getting this sandbox violation when I try and stream this video using NetStream and NetConnect. I'm getting the path from an XML file. If i just pop the path into an FLVPlayback component, it works just fine. Any Ideas?

Edited to hide IP.







Attach Code

*** Security Sandbox Violation ***
Connection to "rtmp://myIPAddress/mystreamingvideos/stafford.flv" halted - not permitted from file:///Macintosh%20HD/Users/dzedward/Desktop/seminarVideo/newSkin.swf
SecurityError: Error #2147: Forbidden protocol in URL "rtmp://myIPAddress/mystreamingvideos/stafford.flv".
at flash.net::NetStream/play()
at MethodInfo-53()
at MethodInfo-40()
at flash.net::NetConnection/connect()
at MethodInfo-39()
at MethodInfo-54()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()

Security Sandbox Error
I am trying to access flv from flash media server which is in my pc..F:/FlashServer/.

nc.connect ("rtmp://localhost/vod/");

its throwing an error "SecurityError: Error #2123: Security sandbox violation: http://127.0.0.1/flexcfm_login/KMG_TV/KMG_TV.swf cannot access rtmp://localhost/vod/. No policy files granted access."

http://127.0.0.1 : it is coldfusion server ip(installed in my pc).


I put an crossdomain.xml file in F:/FlashServer/

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy
SYSTEM

"

Security Sandbox Error
I am trying to use a swf to send emails from my webserver. All the code to send the email is in the swf in AS3, an external script is not required. I have tried the swf locally and I can send email fine, but when I upload it I get a security error. It mentions that it could not find a socket policy file, I contacted my webhosts and even pointed them to a url;

http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_04.html

This seems to be related to the latest flash player, if anyone could offer any advice as to what I could tell the support team at my webhosts, I would be very grateful, I am having a difficult time getting them to understand the issue!

Thanks

Neil

Plz Help Solve This Security Error
i get this error

SecurityError: Error #2121: Security sandbox violation: Sound.id3: app:/sampleLayout.swf cannot access . This may be worked around by calling Security.allowDomain.
at flash.media::Sound/get id3()
at Song/getTags()[D:Flash ProjectsMP3 playerphase2Song.as:44]
Cannot display source code at this location.

i dont have any idea about allowDomain
need help as soon as possible
thanks in advance

Security Sandbox Error
i have this problem....thanks for help so far guys....where I can't get an external swf to play a frame in my main movie.......it should be straightforward....i.e. _rootgotoAndPlay(xx) etc....

It doesn't work...usually it just does nothing...

I retried this morning and got the error message.....

could it be that my loaded swf can't talk to my main movie because it trying to access it from a different domain?

Any ideas? If this is right how do I get around it ?

I've tried to open the external file in my pc ...but mx2004 won't see it...it says
"can't open url c:/ocume%20/ebsit%20...etc...

thanks in advance

jason

Actionscript 3.0 Security Error
Hi everyone,

I'm working on a small RSS Reader thingy right now and I've came up to a pretty brick-wall problem.

I'm printing the rss data with a very simple PHP as follow (proxy.php) :

PHP Code:



<? php readfile($_GET[FeedAdress]) ?>




So I can do something like this :
"proxy.php?FeedAdress=http://www.ventilate.ca/?feed=rss2"


Everything works when I browse the swf file from my local server, but when I embed it in a HTML, I get this #2048 error. No more info.

This is pretty weird...

Thanks for your help!

Security Sandbox Error
I am trying to access flv from flash media server which is in my pc..F:/FlashServer/.

nc.connect ("rtmp://localhost/vod/");

its throwing an error "SecurityError: Error #2123: Security sandbox violation: http://127.0.0.1/flexcfm_login/KMG_TV/KMG_TV.swf cannot access rtmp://localhost/vod/. No policy files granted access."

http://127.0.0.1 : it is coldfusion server ip.


I put an crossdomain.xml file in F:/FlashServer/

<?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="127.0.0.1" /><allow-access-from

domain="http://127.0.0.1/flexcfm_login/KMG_TV/bin-debug/" /><allow-access-from domain="*"

/>
</cross-domain-policy>

Still this error is coming ..

Any help is appreciated.

Security Sandbox Error
i have this problem....thanks for help so far guys....where I can't get an external swf to play a frame in my main movie.......it should be straightforward....i.e. _rootgotoAndPlay(xx) etc....

It doesn't work...usually it just does nothing...

I retried this morning and got the error message.....

could it be that my loaded swf can't talk to my main movie because it trying to access it from a different domain?

Any ideas? If this is right how do I get around it ?

I've tried to open the external file in my pc ...but mx2004 won't see it...it says
"can't open url c:/ocume%20/ebsit%20...etc...

thanks in advance

jason

Security Sandbox Error
I am loading text and pictures dynamically by buttons I have set up.
One button loads a picture and text from a text file. The other does the same. They work, but when I press one then press the next I get a error : " Security Sandbox Error " with more behind it.

Can someone tell me what this means??

Dynamic Link-security Error
Hi,

Im trying to allow my flash movie to be dynamic by placing the links in .txt files which of course can be changed without opening flash.

I was able to get the .txt to load and the data to be placed in the navigateToURL function-however, flash outputs a security error when the invisible MC is pressed:
SecurityError: Error #2147: Forbidden protocol in URL "http://www.google.com".
at global/flash.net::navigateToURL()
at MethodInfo-1()

Here is the code in the flash file:

Code:
var myURLLoader:URLLoader=new URLLoader();
var myURLRequest:URLRequest=new URLRequest("link.txt");
myURLLoader.load(myURLRequest);
myURLLoader.addEventListener(Event.COMPLETE, dataOK);
function dataOK(myevent:Event):void{
var myURLVariables:URLVariables=new URLVariables (myURLLoader.data);
var extURL:String = new String(myURLVariables.link1);
trace(extURL)


var myURL:URLRequest=new URLRequest(extURL);

function clickButton(myevent:MouseEvent):void {
navigateToURL(myURL, "_blank");
}

invisibleButton.addEventListener(MouseEvent.CLICK, clickButton);
}

invisibleButton.buttonMode=true;


The trace statement shows that the .txt file was loaded correctly--that is, it outputs--"http://www.google.com" with quotes-
The text file is simply this:
link1="http://www.google.com"

Does anyone know the security work around or is there another way to achieve this perhaps by using flash.events.TextEvent.LINK although there is no textfield displayed--just an invisible MC ?




Thanks,
Yvette

Security Sandbox - Error #2122
this is going to be a relatively common occurance for those interested in dynamic drawing applications with AS3, specifically Spectrum.computeSpectrum().

i am no exception.

I have created a small jukebox in AS3 with a visualization using the computeSpectrum() method. I at first was receiving sandbox violations requesting a policy file before it would download the mp3 needed for playback. I looked into this matter and found a solution to add a SoundLoaderContext object to the Sound.load() method that told the sound object to check for a policy file before downloading. here is my challenge:

i have a tab in firefox open to youtube, on a video's page. in another tab, my website with jukebox (including visualization). when the jukebox attemps to compute the spectrum, i receive Error #2122 (more specifically: SecurityError: Error #2122: Security sandbox violation: SoundMixer.computeSpectrum: http://kingthief.com/assets/flash/jukebox.swf cannot access http://sjc-v28.sjc.youtube.com/get_video?video_id=iRHDuMkgZ10. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.)

these warnings prevent spectrum from operating and jukebox functionality until warning is dismissed.

my question: why would i get sandbox violations in the jukebox for a flash app in a different website, in a different tab? i know that flash 9 is now a VM so they must be inherently linked, but my warning indicates i'm trying to read a policy file from a site it is not even connecting to (or requesting from)

i'm completely stumped. help?





























Edited: 06/05/2007 at 09:19:26 AM by nak5ive

Security Error When Accessing EBay API
Hello,

I'm developing a Flash widget that uses the eBay Trading API. I managed to get everything to work locally, but as soon as I try to run the swf from a website, I'm getting a security exception:

[SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048"]

This exception occurs whenever I try to send a request to eBay using URLLoader.load()

I'm already loading the crossdomain.xml file and allowing all the domains:

Security.loadPolicyFile("https://api.sandbox.ebay.com/crossdomain.xml");
Security.allowInsecureDomain("*");
Security.allowDomain("*");

Any idea what I'm doing wrong?

Thanks,

Laurent

Socket Security Error 2048
Hi,

I'm trying to make a socket connection using AS3. I am aware of the new Security policies. I've read all the articles and set up a socket policy file server and a socket server to handle the socket.connect().


Im calling Security.loadPolicyFile("xmlsocket://myhost.com:843") but continually get this message in the debugger:
Error: Failed to load policy file from xmlsocket://myhost.com:843 // why did it fail?? the file is there and port is open

and then:

Error: Request for resource at xmlsocket://myhost.com:11500 by requestor from http://myhost.com/myswf.swf has failed because the server cannot be reached. // why can't the server be reached?? the port is open



I've made sure I have no firewall blocking the port, no SELinux enabled policies, and I've verified port 843 and 11500 are actually open using a custom php script.


Also when I type nmap localhost port 843 shows up as open using tcp. It does however say that the service is unknown. I don't understand that since I have edited the /etc/services file and created the service "flashpolicy" in /etc/xinetd.d and restarted inetd using: /etc/rc.d/init.d/xinetd restart.

Heres the string my socket policy file server is suppose to return when it receives <policy-file-request/> :

<cross-domain-policy><site-control permitted-cross-domain-policies="master-only"/><allow-access-from domain="myhost.com" to-ports="11500" /></cross-domain-policy>


Can anyone give me some clues as to what I'm doing wrong? I think I've read every article out there regarding this subject. I even see that there are two bugs listed for the flash player: http://bugs.adobe.com/jira/browse/FP-67 and
https://bugs.adobe.com/jira/browse/FP-269.

But it seems likes someone out there has achieved socket connections with AS3.

Thank You





























Edited: 09/15/2008 at 10:31:12 PM by depth9

IE8 And Flash Security (error #2048)
Oddly, my page works in IE7, FF, Chrome, etc. But now that I've upgraded by browser to IE8b2 (for work), I'm seeing a Flash Security (error #2048).

Here's what the app does...

Flash is running on Site A. Flash tries to read an XML file from Site B (which has a proper crossdomain.xls file in place). When visiting in IE8 Flash runs, but displays a security error.

Very odd. Any ideas folks?
~Paul

Socket Security Error Problem
I've met the problem about to use the action script socket to connect my server.I used the phase 2 flash player(flash player 10).

When the socket connected to my server with the 1024 or above port it will be throw security error some time.

Inorder to solve this problem I've read the article written by Deneb Meketa which link is below:
http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html

I followed the step by the article said and use the flash player's log file to check if my socket policy file were working.

Strangely,in every time I use socket to connect my server.I got the confirm infomation from the log file which said that flash player had already got the authorization from the master policy file and permit the current socket to get the resource from the current port, but some times I've get security error throw by my flash player and my log file log no waring or error about this.

This made me confused,I don't know where the problem is.The log file said my socket policy file was functioned normally,but it still throw Security Error in the flash player some times.

I hope someone can help me.

Here I list my Master Policy File:
<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="*" to-ports="1024-2048"/>
</cross-domain-policy>


I use the 2000 port to do my test.

By the way, Merry Christmas To Everyone!







Attach Code

<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="*" to-ports="1024-2048"/>
</cross-domain-policy>

Sandbox Security Error 2048
I have done an IRC client in flash, it works fine in local but not on my site. I load the policy file at the root of my site (http://skurcey.sk.ohost.de/crossdomain.xml).
Could someone could explain me what to do to get this done, please. I really don't understand much at flash help, thanks.
Heres my swf http://skurcey.sk.ohost.de/FlashZone/IRCClient.html i can provide the sources if needed but be i code like a pig

[Q-error] Security Sandbox Violation
Hi all

I got the following error , when i was trying to load an external XML file,

this script woks fine in FLASH ...
but after I uploaded to web and test it ... the error comes up

Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://www.abc.com/test.swf cannot load data from http://www.abc.com/test.xml

Any body could help ??
thanks ~!!

Flex Security Error In XML Loading
Hi!

Security problems are surely the most annoying ones.
Well, I try to lead an XML file, in the usual way.
Everything works fine from the development folder (the XML is local, on the same folder as the SWF), but when I copy the both files to somewhere else (i.e. the Desktop) I get the following message:

SecurityError: Error #2148: SWF file file:///C|/Documents%20and%20Settings/myung/Desktop/Gallery.swf cannot access local resource file:///C|/Documents%20and%20Settings/myung/Desktop/data.xml. Only local-with-filesystem and trusted local SWF files may access local resources.
at flash.net::URLStream/load()

What can I do with it???

Tnx

Local Security Sandbox Error
If I have a swf1 in a folder below swf2, but I want to load swf2 into swf1 I get a security sandbox error. I understand why you would'nt want to allow this to happen, but as far as locally testing, what is the way to allow this type of loading. I've read a lot on the local security sandbox without figuring out a solution. Any ideas would be great.

Error #2121: Security Sandbox Violation:
I have two swf's running on a page one uses computeSpectrum and generates the following error:

SecurityError: Error #2121: Security sandbox violation: SoundMixer.computeSpectrum: http://dev1.kbrcomm.com/OLA/soundSpectrum_rev2.swf cannot access http://dev1.kbrcomm.com/OLA/ICE_intro_rev9.swf. This may be worked around by calling Security.allowDomain.
at flash.media::SoundMixer$/computeSpectrum()
at soundSpectrum_rev5_fla::mc_6/loop()



http://dev1.kbrcomm.com/OLA/ICE_intro_rev9.swf. is the SECOND flash on the page...

This error just recently appeared and may be cause by Flash Player 10

http://dev1.kbrcomm.com/OLA/

Bitmap.draw - Sandbox Security Error
This is a two fold query involving the same issue. As you know, if you attempt to use bitmap.draw() with an object (image or swf) that is not in the same domain as the calling swf the bitmap will not draw. As described by Adobe livedocs, if Security.allowDomain() is setup in the calling swf then draw() will work. However, I cannot get this method to work. I have supplied an example fla (make sure to get the .as for it too).

1. How do I get Security settings right to permit bitmap.draw() to work with objects from another domain? (not any domain - just the domain I define in the allowDomain parameter)

2. How do I setup an event handler (listener) for bitmap.draw() so I can detect when it doesn't draw?

Example
http://posting.imitationstudios.com/...or-Example.swf

associated files
http://posting.imitationstudios.com/...or-Example.fla
http://posting.imitationstudios.com/...imageLoader.as

Note: This same question have been asked by me on Kirupa. At the time of this posting: 52 views and no replies. ( http://www.kirupa.com/forum/showthread.php?t=285345 ) Any help is much appreciated. I'm not sure why this is going unanswered.

SMTP Mailer -> Sandbox Security Error :(
So I am trying to use the SMTP Mailer and haven't been able to get any email responses or forum replys from the creator. Basically when I try to run it on a Localhost or from my website, I get the following error:


Code:
Error #2044: Unhandled SecurityErrorEvent:. text=Error #2048: Security sandbox violation: http://www.affordableimage.com/SMTPMailer.swf cannot load data from smtp.west.cox.net:25.
at SMTPMailer_fla::MainTimeline/frame1()
I have done alot of research and it seems alot of people talk about using crossdomain.xml or a Actionscript socket code.

Help pleaseeee!

Flash Player 9 Update Causes Security Error
I'm experiencing a security error in the just released Flash 9 Player Update (9.0.60 and higher) that I did not experience in prior versions of Flash 9 player (9.0.47 and below).

The situation I'm encountering:
1. I access a web service over HTTPS from a Flex application hosted on HTTPS on a different server.
2. The HTTPS service being accessed has a crossdomain.xml file in the root permitting access by my Flex application.
3. The service can be accessed without problems when the Flex application is running inside Flash Player 9.0.47 and below.
4. When the serviced is accessed from a Flex application running in Flash Player 9.0.60 and higher on Windows (IE or Firefox), I get a “Security error accessing url” error.

Macromedia Flash Player Security Error
hi everyone,

I have an SWF that accesses an ASP file to fetch me results from MS SQL database. Whenever I run this SWF file I get a "Macromedia Flash Player Security" message. I have Flash Player 8 installed on my computer. Can someone help me avoid this annoying pop-up?

thanks!

Manish

Bitmap.draw - Sandbox Security Error
This is a two fold query involving the same issue. As you know, if you attempt to use bitmap.draw() with an object (image or swf) that is not in the same domain as the calling swf the bitmap will not draw. As described by Adobe livedocs, if Security.allowDomain() is setup in the calling swf then draw() will work. However, I cannot get this method to work. I have supplied an example fla (make sure to get the .as for it too).

1. How do I get Security settings right to permit bitmap.draw() to work with objects from another domain? (not any domain - just the domain I define in the allowDomain parameter)

2. How do I setup an event handler (listener) for bitmap.draw() so I can detect when it doesn't draw?

Example
http://posting.imitationstudios.com/...or-Example.swf

associated files
http://posting.imitationstudios.com/...or-Example.fla
http://posting.imitationstudios.com/...imageLoader.as

How I Can Catch Security Sandbox Violation Error?
Ok this simple script that I made

Code:
try {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadedPicture);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
loader.load(new URLRequest("http://msnbcmedia1.msn.com/j/msnbc/Components/Photo_StoryLevel/080429/080429-sadr-city-6a.hmedium.jpg"), new LoaderContext(true));
} catch(е) {
error_txt.appendText("ERROR! ");
}


function loadedPicture(info:Event):void {
error_txt.appendText("NOPE ");
addChild(info.target.content);
}

function errorHandler(info:IOErrorEvent):void {
error_txt.appendText(" IO proxy");
}

function securityErrorHandler(info:SecurityErrorEvent):void {
error_txt.appendText(" S proxy");
}
Like you see I'm trying to catch the SecurityError error, but I cannot catch it, it appears again:

Quote:




SecurityError: Error #2123: Security sandbox violation: LoaderInfo.content: http://www.blablablabla.com/loading.swf cannot access http://msnbcmedia1.msn.com/j/msnbc/C...6a.hmedium.jpg. No policy files granted access.
at flash.display::LoaderInfo/get content()
at loading_fla::MainTimeline/loadedPicture()




Is it not supposed to catch it with try..catch???? When I run only NOPE appears in error_txt. Any ideas how I catch this error?

Security Sandbox Error Using FuseKit Blur
*** Security Sandbox Violation ***
SecurityDomain 'http://www.mywebsite/image.png' tried to access incompatible context 'file:///Macintosh%20HD/%2DMe/flash.swf'

Anyone else seen something like this?

SecurityError: Error #2122: Security Sandbox Violation
Hi

I have issue with loading images

This works

ActionScript Code:
var loader:Loader = new Loader();
loader.load(new URLRequest("http://l.yimg.com/www.flickr.com/images/tour/hp_1.jpg"));
loader.contentLoaderInfo.addEventListener(Event.INIT, onInit);

function onInit(evt:Event):void
{
    addChild(loader)
}
Here is sample
http://oceanic.wsisiz.edu.pl/~hamela/Igor/NoBitmap.html

This Do Not Work
If I try to make any changes to image like this

ActionScript Code:
var loader:Loader = new Loader();
loader.load(new URLRequest("http://l.yimg.com/www.flickr.com/images/tour/hp_1.jpg"));
loader.contentLoaderInfo.addEventListener(Event.INIT, onInit);

function onInit(evt:Event):void
{
    var bitmap:Bitmap = (evt.target.content);
    if (bitmap != null)
    {
        bitmap.smoothing = true;
    }
    addChild(bitmap);
}

error appears in debug version of FlashPlayer and image never appears ;/

SecurityError: Error #2122: Security sandbox violation: LoaderInfo.content: http://oceanic.wsisiz.edu.pl/~hamela/Igor/Bitmap.swf cannot access http://l.yimg.com/www.flickr.com/images/tour/hp_1.jpg. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.
at flash.display::LoaderInfo/get content()
at Bitmap_fla::MainTimeline/onInit()


Here is sample
http://oceanic.wsisiz.edu.pl/~hamela/Igor/Bitmap.html

"Error #2048: Security Sandbox Violation:
Hello, I seem to be getting this error everytime I try to connect to my XMLSocket server, does anyone have any idea what this is. I do have a crossdomain.xml file at the server root.

The crossdomain file consists of:

<cross-domain-policy>
<allow-access-from domain="*" to-ports="4000,4444" />
<allow-access-from domain="*" to-ports="5000" />
<allow-access-from domain="*" to-ports="10017" />
</cross-domain-policy>

Any help would be greatly appreciated.

Thanks

SecurityError: Error #2123: Security Sandbox Violation
I am loading the Google Maps tiles into the Flash, and adds some objects on top of it... Now, I want to create a screenshot of it and send it to the server to save it...

The Google Maps does not provide crossdomain.xml file which in turn creates this error message when I try to use BitmapData to draw which is expected error message because Google does not allow it by not providing the crossdomain.xml file...

Quote:




SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: http://localhost/file.swf cannot access http://mt0.google.com/mt?n=404&v=w2p.83&x=4246&y=6423&zoom=3. No policy files granted access.




The only solution I am aware of is to create a proxy script on my localhost and have it fetch the images from the Google Maps site...

So, my question is, is there any other way to bypass this security issue other than the proxy method???

One thing that is somewhat weird about this issue is that I can actually load the image fine but Flash Player won't allow creating a bitmap image out of it... If it is a security issue, wouldn't Flash Player block it from viewing the image as well??? Why does it let me see the image??? I am just curious on that...

Thanks...

Security Error Appears When Playing Flash Content On A CD
Hi All,

Any one come across this situation where users of a cd-rom gets security problems when for example click on pdf button to view in separate window.

Need a quick resolve for a friend.

Kind Regards,

Boxing Boom

AS3 - Unable To Load Local XML File Due To Security Error
Hi,

I am trying to create a simple SWF in AS3 that will read some data from a local (i.e. on my machine) XML file but when I try to load the file using a URLLoader object and a URLRequest object, a security error is thrown and I am unable to open the file.

Eventually I will post this SWF on a web server and the XML doc will also be on the same web server, not on my local machine, but I wish to run it on my machine for testing/development purposes.

note: I am compiling this AS3 SWF with the Flex 2.0.1 SDK mxmlc.exe AS3 compiler as I do not have Flash CS3.

>>

It appears the problem is that the Security.sandboxType property is being set to:localWithNetwork
whereas I really want it to be set to:localTrusted
>>

Having read through the ActionScript 3 security docs, I have tried to modify the mms.cfg file but this file does not exist anywhere on my system!

I do, however, have the following Flash Player security files:C:WINDOWSsystem32MacromedFlashFlashAuthor.cfg
C:Documents and Settings[MyUserName]Application DataMacromediaFlash Player#SecurityFlashAuthor.cfg
And in both of these files the only setting is:LocalSecurityPrompt=Author
>>

My AS3 code is:
...

// main class
public class OpenXMLFileSample extends TopLevel
{
public function OpenXMLFileSample()
{
// add the stage in TopLevel to the display list
stage.addChild( new Output( stage ) );

// load the XML doc
var _urlMenu:URLRequest = new URLRequest( "xml/menu01.xml" );
var _ldrMenuXMLFile:URLLoader = new URLLoader();

// try to open the XML doc
try
{
_ldrMenuXMLFile.load( _urlMenu )
}
catch( error:SecurityError )
{
Output.trace( "A SecurityError occurred when trying to open the XML menus doc." )
}

} // end constructor: Main

} // end public class

...
Which when run, outputs:
"A SecurityError occurred when trying to open the XML menus doc."
is output.

>>

My Flash Player settings are :flash.system.Capabilities.version
WIN 9,0,28,0 on XP Pro
flash.system.Capabilities.localFileReadDisable:
false

flash.system.Capabilities.isDebugger:
true

flash.system.Security.sandboxType:
localWithNetwork
>>

1) Does anyone know how to fix this problem ?

2) Is it unusual not to have a mms.cfg file ?

SecurityError: Error #2000: No Active Security Context.
Hi,

I have used the com.adobe.images.PNGEncoder from the AIR package in my flash file.
When I published into html and swf, when running the result has the following error:

SecurityError: Error #2000: No active security context.

I have tried this on both starting a new document with Flash File (ActionScript 3.0) and Flash File (Adobe AIR), but still do not work.

It seems that Adobe AIR can create .air file which can use the PNGEncoder, but if the file publish into webpages with swf file, it cannot use PNGEncoder, or the entire AIR package.

Am I missing something here?

Thanks in advance.

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