I want to link to other viewlets locally on a PC

General Tips & Tricks
Site Admin
Posts: 1078
Joined: Fri May 26, 2006 3:15 pm
Location: San Jose, CA

I want to link to other viewlets locally on a PC

Postby James » Sun Nov 11, 2007 6:00 pm

You can link to to another Viewlet on your computer via the Display URL action, by setting the URL to a relative path, such as "../foo/bar.html". This is useful if you are creating training delivered on CD and want to break it down into several Viewlets.

One issue you need to be aware of is that the Flash 8 security model doesn't allow a flash file to access files on the local machine and have access to the network at the same time. The reasoning is that a flash file could be sent as an email attachment, that when opened will read a file off your computer and send it to a remote site.

This is only an issue when you are running the Viewlet locally off the computer. It doesn't apply when the Viewlet is being run from a web server. In that case, the Viewlet Flash file is running under the security context of the user's browser.

By default Viewelts compiled in ViewletBuilder 5.0.x have network access enabled. This means that they don't have access to local files. The effect you will see is that when you click on a link to the other file nothing will happen.

There are 2 ways to work around this issue.

Run from a Trusted Folder

When a Viewlet is running from a Trusted Folder, it can have both local and network access. There are several ways to mark a folder as trusted.

1. Any "Local or Network Folders" that are added to the Publishing Wizard in ViewletBuilder are automatically trusted. VielwetBuilder will automatically setup this folder as trusted. This is why Viewlets run from "My Viewlets" won't display the error message.

2. Open the Adobe Global Security Settings Panel in your browser and click on "Edit Locations..." and add the folder your Viewlet is in on the local machine to the list of trusted folders.

3. Add a text file to the following directory (where is the currently logged in user) that lists the names of the trusted directories, one per line:

C:\Documents and Settings\Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust

You can take a look at the file ViewletBuilder sets up in this folder named QarbonTrustLocations.txt for an example.

If you are setting up Computer Based Training where a users installs Viewlets from a CD. You will need to modify your installation script to add an a trust entry for the location where the Viewlets were installed.

Change the SWF file to Local Access Mode

Adobe has a free command line utility to convert SWF files to allow local access. This will mean that the Viewelt can access local resources, but not not network resources. You can download it here: ... s.html#lcu

Unzip the file and read the README.txt file

Running this utility you can convert a SWF file from network access to local content access.

For more info on Flash security in general check out this page: ... ty_04.html

We will be adding a feature to compile in Local Access mode in version 6.0 of VB6 and 3.0 of ViewletQuiz.

Return to FAQs - ViewletBuilder 5.x

Who is online

Users browsing this forum: No registered users and 1 guest