Solved

How to add local flash file to trusted locations programmatically

Posted on 2011-03-01
5
2,221 Views
Last Modified: 2012-05-11
Hi, Experts.

I will appreciate any help on the issue of installing a flash-based website locally.

I have written an elaborate website featuring multiple flash educational mini-games, with html-based framework wrapping the whole thing up. Flash files use ExternalInterface to call functions (mostly navigation) from underlying html files.
None of the functionality requires any server-side scripting.

It all works perfectly while deployed on the web. But, one of the required deployment modes is deploying on local computer (via CD-Rom or local installation). I've made sure all the functionality is preserved in this mode.

Now, the problem is with ExternalInterface calls. Flash player's security by default blocks ExternalInterface when running local SWFs embedded in local HTML. The solution (which works) is to manually open the global security settings and add the folder containing the flash files to locally trusted list.
(i am referring to this panel: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html or the likes)

The question is - how can I do it programmatically, via install script that comes with the CD-Rom, and without forcing end-users changing security settings manually.

Technical notes:

1) The flash is compiled using Flash SDK (mxmlc)

2) The flash is written in ActionScript 3 for flash 9-10 or later. Flash 9 can't run some of the resulting SWFs due to known bugs in Flash 9.

3) The flash applications use additional libraries (swf files) for resources, which they download from relative path (i.e. from local disk if installed locally). This part works fine.

4) Using Flash IDE for any part of the solution is unacceptable (I have hundreds of files, the only way to recompile them must be automated (now i rebuild them using script that runs mxmlc)
5) Solution that works on both Windows and MacOS is preferred (linux is a bonus)

Please note that the end users will be running this in browser, not on standalone flash player or any debug player.

Also, I've tried creating .cfg files in C:\WINDOWS\system32\Macromed\Flash\FlashPlayerTrust - to no avail.

If the solution is via editing settings.sol, I will need a preferably free SDK or DLL to allow changing it programmatically.
0
Comment
Question by:mico20
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 17

Expert Comment

by:deepanjandas
ID: 35044207
You cannot set that settings programatically, that will require manual input atleast for the first time.

This is due to security imposed on Flash Player in accessing clients' machine.

Warm Regards
Deepanjan Das
0
 
LVL 5

Author Comment

by:mico20
ID: 35046281
Perhaps, you misunderstood the situation. I know I shouldn't be able to change this setting from neither flash nor html files or any other web entity - otherwise, it would be worthless security-wise.
In my case, however, I have a setup.exe (or the equivalent) that will be run by user (I can even require administrative permissions for this one), and that should be able to access any local setting...

It seems I have found at least a partial solution, though it is a bit convoluted. If no better solution is found here, I'll have to close the question on it. Here it is:

1)Installer runs a flash applet locally, to create a local shared object with some dummy settings
2)Installer locates that LSO in the filesystem
3)Installer copies system.sol into that folder and makes it writable for the flash applet
4)Installer runs the flash applet again, that this time, patches the system.sol with needed trusted folder
5)Installer replaces the original system.sol with the patched one.

This has been feasibility tested (but not yet completely implemented) on at least Windows XP.
0
 
LVL 17

Expert Comment

by:deepanjandas
ID: 35051383
I have not done anything which involves writing the settings.sol directly from the installer.
So will not be able to suggest on this.

Are you using MDM as installer.

Warm Reagrds
Deepanjan Das
0
 
LVL 5

Accepted Solution

by:
mico20 earned 0 total points
ID: 35184678
Ok, as expected, nothing is really impossible.
Turns out, .sol file format is quite simple and is derived from .amf format. I ended up using hxformat library with haXe language (for cross-platform portability) and was able to edit the permission files directly. The solution works perfectly for both MacOS and windows.
0
 
LVL 5

Author Closing Comment

by:mico20
ID: 35221286
No solution was given by the experts. I had to find, develop and use my own solution, with the help from haXe development team.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Technology Resume 7 67
Downside of adding characters set in ASP pages 6 36
Help in good tutorials for PHP, HTML and CSS 6 53
Start Auto-download of File when page loads? 1 32
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

761 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question