Forum Moderators: open
function Peeler(myName)
{
var _ref = myName;
var backgroundColour = null;
var flipSideColour = null;
var contentWidth = null;
var contentHeight = null;
var contentPath = null;
var contentX = null;
var contentY = null;
var contentURL = null;
this.onComplete = null;
this.setColours = function (bgCol,flipCol)
{
backgroundColour = bgCol;
flipSideColour = flipCol;
}
this.setContentDims = function (w,h)
{
contentWidth = w;
contentHeight = h;
}
this.setContentPos = function (x,y)
{
contentX = x;
contentY = y;
}
this.setContentPath = function (path)
{
contentPath = path;
}
this.setContentClickThrough = function (clickThrough)
{
contentURL = clickThrough;
}
this.embedPeel = function (targetDIV,pathToSWF)
{
var flashvars = {};
flashvars._backgroundColour = backgroundColour;
flashvars._flipSideColour = flipSideColour;
flashvars._contentWidth = contentWidth;
flashvars._contentHeight = contentHeight;
flashvars._contentPath = contentPath;
flashvars._contentX = contentX;
flashvars._contentY = contentY;
flashvars._contentURL = contentURL;
flashvars._ref = _ref;
var params = {};
params.wmode = "transparent";
params.allowscriptaccess = "always";
var attributes = {};
swfobject.embedSWF(pathToSWF, targetDIV, "100%", "100%", "8.0.0", false, flashvars, params, attributes);
}
}
var peel = new Peeler("peel");
peel.onComplete = peelDone;
this.onComplete = function () {
alert('onComplete executed');
};