OpenURL

From FFC & FPP Wiki

Jump to: navigation, search

openURL is a built-in Flash Panorama Player function that will open a Web page or document from a specific URL (ex: http:⁄⁄www.flashificator.com ). openURL can be used by the Global, Pano, Spot and Box Objects of the Hotspot Plugin.

Syntax 1: openURL([url]) Example: onClick="openURL( http:⁄⁄www.flashificator.com )"

Syntax 2: openURL([url]) Example: onClick="openURL( myFile.pdf )"

Syntax 3: openURL([url], [target]) Example: onClick="openURL( http:⁄⁄www.flashificator.com, _self )"

onClick="openURL( http:⁄⁄www.flashificator.com )" opens the webpage http:⁄⁄www.flashificator.com in a new browser window.

onClick="openURL( myFile.pdf )" opens a file called "myFile.pdf" in a new browser window. In this example, the file must be in the same folder as the HTML that calls the panorama.

onClick="openURL( http:⁄⁄www.flashificator.com, _self )" opens the webpage http:⁄⁄www.flashificator.com in the same browser window. The [target] parameter is optional and determines were the document ([url]) should open, the allowed values are: "_self" and "_blank" The "_self" value opens the document in the same browser window. The "_blank" value opens the document in a new browser window, this is the default behavior of openURL. Omitting the [target] parameter is the same as using "_blank".

Notes: When testing your panorama locally (from your hard drive) the Flash Player won't access the web -- you can only access local files. Example 1 and 3 won't work locally, example 2 will work locally. This is a security restriction of the Flash Player. This restriction won't happen when you upload your files to a Web server. Full XML example: <?xml version='1.0'?>

 <panorama>
   <parameters>
     layer_20 = hotspots.swf
   </parameters>
   <hotspots>
     <global>
       <spot id="myLink" url="hotspotButton.png" onClick="openURL(http:⁄⁄www.flashificator.com)"/>
     </global>
   </hotspots>

</panorama>

Personal tools