Hello,
I'm trying to install a gigya widget into the pano. I've looked at clearspring as per Graydon's suggestion however if I can use the gigya method the button can be within the pano area which I feel is more suitable for me.
The code gigya suggests is below
Code
import flash.system.Security;
import flash.external.*;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.display.MovieClip;
import flash.events.*;
import flash.text.TextField;
//--- This code configures and loads Wildfire ---
//Set up security to allow your widget to interact with Wildfire
Security.allowDomain("cdn.gigya.com");
Security.allowInsecureDomain("cdn.gigya.com");
var wfAlreadyLoaded:Boolean = false;
var mcWF:MovieClip = new MovieClip();
// Create a load-Wildfire-Button and add an event listener to it.
var loadWildfireButton:TextField = new TextField();
loadWildfireButton.width = 150;
loadWildfireButton.text = 'Press to load Wildfire';
loadWildfireButton.x = 70;
loadWildfireButton.y = 50;
addChild(loadWildfireButton);
loadWildfireButton.addEventListener(MouseEvent.CLICK, loadWildfire);
function loadWildfire(evt:Event) : void{
//prevent creation of multiple instances of wildfire
if (wfAlreadyLoaded) {
mcWF.visible = true;
return;
}
else {
wfAlreadyLoaded = true ;
}
//This code creates an empty movie clip to host the wildfire interface
addChild(mcWF).name='mcWF';
//Please position Wildfire in your Flash
mcWF.x=15;
mcWF.y=42;
// This code creates a configuration object through which Wildfire will communicate with the host swf
var ModuleID:String='PostModule1'; // pass the module id to wildfire
// Build configuration object
var cfg:Object = { }; // initialize the configuration object
//This code assigns the configurations you set in our site to the Wildfire configuration object
cfg['width']='200';
cfg['height']='250';
cfg['useFacebookMystuff']='false';
cfg['partner']='706771';
cfg['UIConfig']='<config baseTheme="v2"><display showEmail="true" showBookmark="true" showCloseButton="true"></display><body><controls><snbuttons iconsOnly="true"></snbuttons></controls></body></config>';;
// Please set up the content to be posted
cfg['defaultContent']= ''; // <-- YOUR EMBED CODE GOES HERE
var ldr:Loader = new Loader();
// set up an event handler for the onClose event, this is called when the Wildfire UI is closed.
cfg['onClose']=function(eventObj:Object):void{
mcWF.visible = false;
ldr.content['INIT']();
//you can do additional cleanup here
}
// This code calls up wildfire
var url:String = 'http://cdn.gigya.com/WildFire/swf/wildfireInAS3.swf?ModuleID=' + ModuleID;
var urlReq:URLRequest = new URLRequest(url);
mcWF[ModuleID] = cfg;
ldr.load(urlReq);
mcWF.addChild(ldr);
}
Display More
I can't get the button to load the gigya interface.
I was wondering if this might be something to do with it being a plugin and needing to interface directly with krpano flash. This is what I'm not sure how to do, and would really appreciate some help with.
If I can get this working I would also like some way of passing the variable of which pano is loaded, so a user can post their favourite pano to their facebook, twitter etc. Is this possible?