Archive for September, 2005

Critical change of security: Local or network?

There’s some developer began angry with MM for they changes the rule of security, limit local access or network access only as default. But in fact, you have the options.The issue is to forbid a ‘local’ swf file when running in your system(not downloaded from the website) to send data outside. Sure it’s a right policy, flash files could be developed by anyone including hackers.So what will this policy effect?

” NOTE: The restrictions that are discussed in this section do not affect SWF files that are on the Internet.”
Yes, it will mostly effect developer’s feeling but not end user I think. Developers have to test in local, it seems not so convenience to shut the door inside and outside.

One thing that some helps, but not too much on this, ” If you create the file in the Flash authoring environment (for example, when you select Control > Test Movie), your file is trusted because it is in a test environment. ” Though if it’s some big project, it almost useless.

So the question is, could developers access both local(inside of your OS file system) and network(outside)?

Fortunately but one more step, it could.

“This level of permission can be granted by the user or Flash developer in the following ways:
* Using the Global Security Settings panel in the Settings Manager.
* Using a global configuration file. ”
The first one is not our selection, so latter “A configuration file can be installed with the SWF file, created by a Flash developer, or added by an administrator (for all users or the current user) or any Flash developer (for the current user).”

Oooops, here it is.

The FlashAuthor.cfg file is located in the following approximate directories(work only during test movie with Flash 8 professional):

Windows boot disk / Documents and Settings / Application / Data / Macromedia Flash Player/ #Security
LocalSecurityPrompt=Author

In the #Security directory on your hard disk, you can create a FlashPlayerTrust directory where you can store unique configuration files. Inside these files, you can specify directories or applications to trust on your hard disk. This directory does not require administrative access, so users without administrative permissions can set permissions for SWF files and test applications.

If you create applications that install on an end user’s hard disk, you might need to create a configuration file in FlashPlayerTrust to specify a trusted directory for your application. You can create configuration files inside the FlashPlayerTrust directory that specify the location of the trusted application.

Windows boot disk / Documents and Settings / Application
Data / Macromedia Flash Player/#SecurityFlashPlayerTrust

I create a configuration file such as: myDevelopDir.cfg
Just add directories you want, for example:
e:flashmyflashdevelop
If you use e:flash, all swf files including sub-directories under it will be ‘localTrusted’.

To test SWFs communicate both with local and Internet, set publish as ‘network only’. Then everything ok!
TIP: If you do not want to use configuration files, you could publish your Flash applications to a separate, testing server instead of providing clients or other developers SWF files to run on their local hard disks.

New Dropshadow/Blur Filter

I tried a ball movie clip from library and add drop shadow filterwith as:

this.attachMovie("ball","ballmc",1);
var myDropFilter = new flash.filters.DropShadowFilter();
var myFilters:Array = ballmc.filters;
myFilters.push(myDropFilter);
ballmc.filters = myFilters;
ballmc.x = 150;
ballmc.y =150;
Then Blur Filter:
this.attachMovie("ball","ballmc",1);
var blurX:Number = 30;
var blurY:Number = 30;
var quality:Number = 3;
var myBlurFilter = new flash.filters.BlurFilter(blurX, blurY, quality);
var myFilters:Array = ballmc.filters;
myFilters.push(myBlurFilter);
ballmc.filters = myFilters;
ballmc.x = 150;
ballmc.y =150;