Reputation: 883
I have one swf file in that i used fscommand to get final output when submit button clicked in that swf , i am loading that swf in SWFloader in flex3 .i need to get fscommand value as Alert, how to get that value first and display as alert.
Thanks in advance
Upvotes: 0
Views: 1036
Reputation: 82058
TECHNICALLY this is feasible, but a bad idea. You'd need to register a callback which would call the child swf (generally done from the child swf). But, you will risk a good deal of headache, and you'll have to rely a lot more on the browser than other options. It would also be slower than an AS only solution.
You're much better off (in this order):
ApplicationDomain
, but even with that, there are work-arounds
event.target
recorded by the
parent swf. You may have to adjust to avoid
SecuritySandboxViolation
s, however.
loader.content.foo.bar.baz
;
I don't like this solution because it is much harder to maintain. It is
also much worse from a design perspective: you want to use
encapsulation as much as possible in this situation -- this technique
actively works against that.
Upvotes: 0
Reputation: 59461
fscommand
cannot be used for communication between loaded and containing SWFs.
From livedocs
fscommand: Lets the SWF file communicate with either Flash Player or the program hosting Flash Player, such as a web browser. You can also use the fscommand() function to pass messages to Director or to Visual Basic, Visual C++, and other programs that can host ActiveX controls.
You can call a method in the loaded swf OR access its properties directly OR use events OR use local connection to pass data between parent and loaded SWFs.
Upvotes: 1