开发者

A way to use ExternalInterface locally?

开发者 https://www.devze.com 2023-04-12 17:49 出处:网络
I\'ve got a big problem. I already searched this site for answers, but found nothing really useful for me now.

I've got a big problem. I already searched this site for answers, but found nothing really useful for me now.

The problem is this: I have an swf embedded in an html. I must call a js function in the page from the swf via ExternalInteface. Ok. But it must work locally, for any user, without doing nothing. That's bec开发者_如何学Goause this thing must be distributed in cdroms.

Is there a way to avoid the problem of running ExternalInterface locally without asking the user to configure a trusted folder or things like that?

Thank you


There is no reliable way around this security measure I think. You could ship one or more light webservers on the CD (one per supported OS), and ways to start them (batch files or equivalent) + open the browser to the server (eg using 127.0.0.1 at some obscure port).


Johnatan Hedborg is correct. You cannot circumvent this security feature from flash. However, you could use a product such as MDM zinc to create an executable that has more power, or create the project as an adobe Air project. Both of these grant the user extended local permissions, which include the ability to launch executable content on the users machine. Here are some programs that could help you solve your problem by packaging a custom projector that does not require an install to run:

Link to zinc http://www.multidmedia.com/software/zinc/

Link to MProjector http://www.screentime.com/software/flash-projector

Link To SwfStudio http://www.northcode.com/


Read about enabling controlling access to scripts.


Can't you just include a web page on the CD and have them open that instead of the SWF?

0

精彩评论

暂无评论...
验证码 换一张
取 消