Jump to content
GreenSock

newdevide

Help with error#2070

Recommended Posts

Guys, i don't know, i've tried looking for solutions but found none. So i post this here hoping someone know how to fix this (maybe using greensock too, who knows?)

I try loading en external swf into the main swf, when i tested it locally averything works, but in an online mode i get a security sandbox error #2070 and every buttons in the external swf wont work. Any idea?

Link to comment
Share on other sites

Hi sorry to hear you are having problems. We will need more info to troubleshoot the problem.

 

have you read the SWFLoader documentation that addresses common security issues? http://www.greensock.com/as/docs/tween/ ... oader.html

 

It would really help if you could provide a bit more information. what does "in an online mode" really mean?

are both swfs hosted somewhere? are they on the same server? if not, do you have a crossdomain.xml policy file?

 

after googling the error code, what similarities does your project have with the other projects that have experienced the same error?

 

The more information you provide (including the full text of the error message) the better suited we will be to help.

Unfortunately swf security errors are a bit of a hassle and very difficult to troubleshoot without more info. SWFLoader has features to avoid the most common security hassles but there are still situations where you have to take certain measures.

 

If you can create extremely simplified versions of your files with the least amount of code and functionality to exhibit the problem that would be a big help.

Link to comment
Share on other sites

Hi Carl thx for ur reply.

So i prepared the files in the attachment. Sorry i couldn't get the full error text. The browser just freeze and i couldn't scroll or print screen the error. I was only able to capture the image using my cellphone (and it's in a bad quality, hope it would help).

So here's the flow of the flash:

I made a main.swf as a parent to load one.swf. In the one swf i made a button using eventdispatcher to load two.swf into the main.swf. Everything works fine in the offline mode (not connected to the net), but when i put it into the server/site (the online mode, connected to the internet), the button won't work and i get a security sandbox error #2070. All files are on the same server.

I checked (googling) that error #2070 got something to do with loosing the stage ownership (whatever that means).

 

I tried looking for the full text form the ner of the #2070 error and i got something like this:

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

Maybe its the same prob with mine

Link to comment
Share on other sites

Hi, I finally had some time to look at your files, sorry for the delay.

 

It appears you aren't using LoaderMax or anything GreenSock related at all.

I have to admit that I'm probably not that well equipped to troubleshoot these security errors but if an obvious solution was present I would love to help.

We really have to focus our efforts in this forum on issues related directly to the GreenSock products.

 

I read a bunch of google results on the 2070 errors and I didn't really find anything conclusive. Perhaps you will have better luck posting your files in the kirpua.com or actionscript.org forums where this issue seems to come up more often.

 

I did take the time to put your files on my server and they appear to work the same way as they do locally, so I really have no way of troubleshooting an error I can't reproduce.

 

have a look:

 

http://www.snorkl.tv/dev/errorTest/main.html

 

if you find the solution, feel free to let us know. Perhaps it will benefit others in the future.

 

Carl

Link to comment
Share on other sites

Carl, thx for all the help.

Now i'm confused, :) but u see, the app i'm building is a facebook app. I wish i could give u the link, so maybe u can see what went wrong, but i cant coz for this project i included a company and they have a very strict rule. I haven't used any greensock in this app, coz it wasn't really necessary (before the prob that is), and thought maybe someone experineced this and used greensock to solve it. Thx a lot and i will post the solution once i found it

Link to comment
Share on other sites

Carl, i think i found the solution for my prob

 

I have to add these script (i don't know on which file i should put these, so i put in all of them):

 

import flash.system.Security;

Security.allowDomain("*");

Security.allowInsecureDomain("*");

 

I don't wanna confused or lead anyone to the wrong direction by making this a new thread so i wanna consult with you first about this script. So what do you think about these script? I think that somehow maybe it could generate error in the future since it uses allowinsecureDomain.

 

Oh and other thing, if i wanna consult with you about AS3 and its runtime Error should i put it here or just contact you by pm?

Link to comment
Share on other sites

Hi newdevide,

 

In all honesty the best I can do with issues relating to this error and security is perform google searches for you, which is really all I do when these problems come up.

Since your files are on the same server though, I really don't think there should be security problems. Its very possible that facebook is messing something up.

 

I built one facebook "app" a few years ago and I remember it generally being a pain in the neck to get certain "easy" things to work.

The facebook developer forums are probably your best resource for getting to the bottom of this issue.

 

If I felt I could be of real help I would gladly work on this.

 

Carl

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×