Using plugins

Plugins are external modules in swf format to extend functionality of the Flash Panorama Player.

How to add a plugin

1. Open the example we built in the Simple tutorial and create the new file: nature.xml.

Hint: you can do right-click, select in the context menu new -> Text Document and then rename it to nature.xml.

2. Now open this empty file in Notepad (or use any other text or XML editor), write these lines:

<?xml version = '1.0'?>
<panorama>
    <parameters>
        layer_1 = fps.swf
    </parameters>
</panorama>

You can read about the xml data format in this tutorial: Using parameters.

3. Save the file.

4. Copy file fps.swf from the plugins folder of the Flash Panorama Player package to your working directory, like this:

5. Now run nature.swf, you can see something new in the top-left corner of the panorama:

fps.swf is very simple plugin showing frames-per-second counter, just a small tool to test performance of the panorama.

Using Autorotator plugin

6. Add to the working directory one more file from the Flash Panorama Player plugins folder: autorotator.swf. This is a module to panning your panorama automatically.

7. Change nature.xml file like this:

<?xml version="1.0" ?>
<panorama>
    <parameters>
        layer_1 = fps.swf
        layer_2 = autorotator.swf
    </parameters>
    <autorotator>
        speed = -0.1
        interval = 30
        pause = 1000
        quality = low
    </autorotator>
</panorama>

8. And do not forget to save it.

Param name layer_2 means that Autorotator plugin will be loaded to the layer number 2, you can use any unique number.

Tag <autorotator> provides the possibility to customize autorotation settings. You can change parameters speed (speed of rotation in degrees), interval (redrawing interval in milliseconds), pause (time of inactivity in millisecond after which autorotation begins) and quality (antialiasing mode: low, medium, high or best).

9. Now you can run nature.swf application again.

Using Borders plugin

10. Open the Flash Panorama Player plugins folder again and copy to the working directory the file borders.swf.

This plugin provides a possibility to restrict pan and tilt ranges (for cylindrical and other partial panoramas).

11. Now change nature.xml data file like this:

<?xml version="1.0" ?>
<panorama>
    <parameters>
        layer_1 = fps.swf
        layer_2 = autorotator.swf
        layer_3 = borders.swf
    </parameters>
    <autorotator>
        speed = -0.1
        interval = 30
        pause = 1000
        quality = low
    </autorotator>
    <borders>
        pan_min = -40
        pan_max = 40
        tilt_min = -10
        tilt_max = 80
    </borders>
</panorama>

12. Save the XML file.

13. Run nature.swf once again.

Now you can move the panorama only within the limits: from -40 till 40 degrees by horizontal and from -10 till 80 degrees by vertical.

Example 1. This content requires Adobe Flash Player.
Example 2. This content requires Adobe Flash Player.

Copyright © 2006 flashpanoramas.com. All rights reserved.