|
|
#1 |
|
FI
Join Date: May 2004
Location: Jakarta
Posts: 114
|
global function problem
I have a problem with executing global function from loaded .swf file with secure load.
I've made a global function in main application than try to execute that function in my loaded movie... but it didn't work. The function is not executed. PHP Code:
here an example I've made |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Jun 2002
Location: Ottawa
Posts: 4,368
|
I posted this in another thread where you asked the same question, but it definitely belongs in it's own thread
![]() Is the loaded SWF a different version than the main SWF? For example, was the loaded SWF published for Flash player 6 and the main SWF published for Flash player 7? mbd |
|
|
|
|
|
#3 |
|
You can call me Jeff
Join Date: Aug 2003
Location: GA
Posts: 445
|
This could be something like Jesse Warden was recently mentioning on his blog (maybe 2 weeks ago). I didn't mention the specific post because it mentions one of their competitors.
In the child SWF, try putting this code before you make the call: Code:
System.security.allowDomain(_parent._url); |
|
|
|
|
|
#4 |
|
FI
Join Date: May 2004
Location: Jakarta
Posts: 114
|
both files were published in flash player 7
and I have try to put this code Code:
System.security.allowDomain(_parent._url); global function work when executed in main movie but not in external movie |
|
|
|
|
|
#5 |
|
Administrator
Join Date: Jun 2002
Location: Ottawa
Posts: 4,368
|
How are you loading the child SWF? What code?
mbd |
|
|
|
|
|
#6 |
|
FI
Join Date: May 2004
Location: Jakarta
Posts: 114
|
Code:
in main.swf :
_global.globalTrace = function ()
{
ssDebug.trace("calling Global Function", "#ff00ff");
};
ssSecure.loadMovie({url: "assets\child.swf", target: "_root.clip_mc"});
in child.swf:
globalTrace();
|
|
|
|
|
|
#7 |
|
FI
Join Date: May 2004
Location: Jakarta
Posts: 114
|
Looks like not only global function/vars but also a a variabel in main movie cannot called using _root or this._parent in loaded movie using secure load.
So I have manage to secure all my files... but I can't do anything with that it's not good...Can anyone help me on this here my script in main movie Code:
_global.testVar = "this is global var";
rootVar = "call variabel using root";
parentVar = "call variabel using parent";
_global.globalTrace = function(arg) {
ssDebug.trace(arg);
}
ssSecure.loadMovie({url:"assets\\child.swf",target:"_root.clip_mc"});
//ssSecure.loadMovie({url:"assets\\child.swf",target:"this.clip_mc"}); fail to load using this.clip_mc
//ssSecure.loadMovie({url:"assets\\child.swf",target:"clip_mc"}); success to load using clip_mc
//clip_mc.loadMovie(ssGlobals.ssStartDir+"\\assets\\child.swf");
globalTrace("call from parent");
Code:
_global.ssDebug.trace(testVar);
root_txt.text = _root.rootVar;
parent_txt.text = this._parent.parentVar;
this._parent.globalTrace("call from child with this._parent");
_root.globalTrace("call from child with _root");
globalTrace("call from child");
all function and variabel was successfully executed and called. But I need to use No AutoExtract with Encription for my project... ![]() here is my SWF Studio project file |
|
|
|
|
|
#8 |
|
Administrator
Join Date: Jun 2002
Location: Ottawa
Posts: 4,368
|
This has been found to be a security issue with the Flash player. When you load a movie securely through the API the parent SWF understands the child SWF to be from a different domain and so limits the child SWF's access.
We're working on a solution that will be invisible to SWF Studio users. mbd |
|
|
|
|
|
#9 |
|
FI
Join Date: May 2004
Location: Jakarta
Posts: 114
|
wow... I think it's a crucial bug since most of developer wants to secure their files without limitation of function/vars access among .swf files.
I hope this could be fixed A.S.A.P... I really need to secure my project files ![]() |
|
|
|
|
|
#10 |
|
FI
Join Date: May 2004
Location: Jakarta
Posts: 114
|
just wondering if this issue have been fix yet?
because I really need the solution on this... secured files & granted access between swf |
|
|
|
|
|
#11 |
|
Administrator
Join Date: Jun 2002
Location: Ottawa
Posts: 4,368
|
For you project, and possibly other projects, would you be loading all SWFs from the secure layout, or a mixture of files from the layout and some from external sources?
mbd |
|
|
|
|
|
#12 |
|
FI
Join Date: May 2004
Location: Jakarta
Posts: 114
|
I would like to load all .swf file type from secure layout 'cause every child swf have some function to communicate with main application.
|
|
|
|
|
|
#13 |
|
FI
Join Date: May 2004
Location: Jakarta
Posts: 114
|
any update on this?
because I have to release my project this monday... I guess I have to use attribute AutoExtract & encrypt... on next update I hope attribute No AutoExtract & encrypt can work properly without messing with props and vars access |
|
|
|
|
|
#14 |
|
Super Moderator
Join Date: May 2003
Location: Ottawa
Posts: 396
|
4d3,
We think we have a solution for that issue, and we might be able to get it together for Monday, but I can't guarantee anything. |
|
|
|
|
|
#15 |
|
FI
Join Date: May 2004
Location: Jakarta
Posts: 114
|
thanks alot Dan,
I hope i can get some light on Monday ![]() |
|
|
|
|
|
#16 |
|
FI
Join Date: May 2004
Location: Jakarta
Posts: 114
|
Any fix on this issue? I really need this ASAP
![]() |
|
|
|
|
|
#17 |
|
Tim
Join Date: May 2001
Location: Ottawa
Posts: 10,761
|
I created a problem report for this one and I'll be working on that next. I'd like to get this one done before we put out the maintenance release since it's pretty serious. I'm working on this one now.
|
|
|
|
|
|
#18 |
|
You can call me Jeff
Join Date: Aug 2003
Location: GA
Posts: 445
|
Pardon my OT intrusion on this thread.
Knowing your speed, you're probably almost done with this issue now that you have an idea in mind. However, regardless of whether this particular problem gets fixed, could you please upload a "maintenance release" at the end of today or early Monday morning? I have a CD project that needs the Outlook Express Shell.invoke mailto: fix, and I have to burn some CDs on Monday for sure. The other guy who needs it probably could have used it a while ago too. Seems like the vacation did you a lot of good. You seem to be working even faster than before. Keep up the pace. Thanks. |
|
|
|