Photoshop Contest PhotoshopContest.com
Creative Contests. Real Prizes. Essential Resource.
You are not logged in. Log in or Register

 


Photoshop Contest Forum Index - Brain Storm - Flash Gits Only - Reply to topic

Goto page 1, 2  Next

splodge

Location: Yorkshire,

Post Thu Nov 15, 2007 9:25 am   Reply with quote         


anyone know how this site was built?
http://www.schematic.com
i want to build a simplified version for a photo album, click on a thumb to enlarge, click on the background to go back to thumbs, maybe put next/prev btn's on the images.
it's the drag, slide and gluide bit that has me beat and the rebound when you drag to the edge.
,,,,,,,,,,,,,,,,,,,,,,,
all i got,
.........
LearnWebDevelopment.com: Newsletter
Hi splodge,
SITE OF THE WEEK - SCHEMATIC
This week's Site of the Week is a great example of a recent trend where the entire site is just scattered across the stage, and in order to view individual pages, you simply zoom in and out. Oh yeah . . . and their client list is pretty impressive!




_________________


Hallcross Toots
Granulated

Location: London

Post Thu Nov 15, 2007 9:31 am   Reply with quote         


mathematics !


I'll see if I can unlock it and look at the scripting...

gimme a minute




FootFungas

Location: East Coast!

Post Thu Nov 15, 2007 9:56 am   Reply with quote         


hmmm...not sure how they do it.

It would look better as a photo album though, seems kind of pointless to have all those empty windows.




annajon

Location: DEAD THREAD DUMPINGGROUND NEAR YOU

Post Thu Nov 15, 2007 9:59 am   Reply with quote         


I am interested in the detective works too




ReinMan

Location: Kingston, ONTARIO, CAN

Post Thu Nov 15, 2007 12:04 pm   Reply with quote         


Oops!
Sorry - I thought you said...



...um, NEVERMIND.




_________________

_________________________________
THIS SITE REALLY DOESN'T EXIST
the way our EGO THINKS IT MIGHT!
_________________________________
FootFungas

Location: East Coast!

Post Thu Nov 15, 2007 1:04 pm   Reply with quote         


flash gits only?
what if we want to flash prats too?!!! Mad




splodge

Location: Yorkshire,

Post Thu Nov 15, 2007 1:12 pm   Reply with quote         


like anyone reads the sign on the door,

some of my tut's, i cant see anything that will help,
http://www.hallcross.co.uk/spices/flash%20tuts.html




_________________


Hallcross Toots
TutorMe
Site Moderator

Location: Sitting in this room playing Russian roulette, finger on the trigger to my dear Juliet.

Post Thu Nov 15, 2007 5:33 pm   Reply with quote         


splodge wrote:
like anyone reads the sign on the door,

some of my tut's, i cant see anything that will help,
http://www.hallcross.co.uk/spices/flash%20tuts.html


Google flash decompiler, and and see if you can decompile the swf back into a .fla.




splodge

Location: Yorkshire,

Post Thu Nov 15, 2007 5:55 pm   Reply with quote         


decompiler wont touch it, i'm sure you've tryed it, damn site is bomb proof, i dont want to steal anything from the guys, just thought it would make a great photo album, 10 x 10, more, less, what ever.
thing i noticed that bothers me, each page plus border = 1,000 x 700 pixels, in thumb format you can see 4.5 pages, that's 4,500 pixels, biggest viewable page you can build in flash is 2,880, i've built pages over 6,000 wide, but you can only see 2,880 in flash, 1024 on line, or what ever your personal res is set at, i'm talkin crap without knowing the words Sad




_________________


Hallcross Toots
TutorMe
Site Moderator

Location: Sitting in this room playing Russian roulette, finger on the trigger to my dear Juliet.

Post Thu Nov 15, 2007 5:59 pm   Reply with quote         


I wouldn't say "bomb-proof." http://www.netdisaster.com/go.php?mode=bomb&destruction=massive&sound=on&url=http://www.schematic.com/

I'm thinking some crazy actionscripting is going on. I mean crazy.




FootFungas

Location: East Coast!

Post Thu Nov 15, 2007 6:11 pm   Reply with quote         


splodge wrote:
decompiler wont touch it, i'm sure you've tryed it, damn site is bomb proof, i dont want to steal anything from the guys, just thought it would make a great photo album, 10 x 10, more, less, what ever.
thing i noticed that bothers me, each page plus border = 1,000 x 700 pixels, in thumb format you can see 4.5 pages, that's 4,500 pixels, biggest viewable page you can build in flash is 2,880, i've built pages over 6,000 wide, but you can only see 2,880 in flash, 1024 on line, or what ever your personal res is set at, i'm talkin crap without knowing the words Sad

Wouldn't the zoomed out view/thumb page be a lower res with the indivivual pages being seperate pages/clips loaded in the template?




Post Thu Nov 15, 2007 9:47 pm   Reply with quote         


It took some time to figure this one out but i think i found the answer. This website uses software from a company called "Asual" (www.usual.com). They have three different project tools

1. SWFAddress - Deep linking for Flash and Ajax
2. EnLarge - Proprocessing for ActionScript
3. EnFlash - Rich UI for Flash

The third one "EnFlash" (http://www.asual.com/enflash/) is probably the one Splodge is looking for. It has rich graphic themes, Zoomable User Interfaces, and Liquid layouts.

The programming on the schematic site involves 3 things

1. an SWFaddress.js
2. an SWFobject.js
3. an SWFBridge.js
4. main.swf

The first three are javascript pages. The first one involves whats called "deeplinking". Essentually it will create a new address for your page through asual code.

For example, www.photoshopcontest.com/contest/h2h.html

would be replaced with www.photoshopcontest.com/#/h2h.html

The "#" symbol is used as a cloak by the asual coding to hide where the actual flash files are located

The "asual" SWFaddress is replaced with the "asual.SWFaddress".

The SWFobject.js is just checking for the which browser you are using.

The SWFBridge.js is the meat and potatoes. It loads the DOM flash content.

The main.swf file is just a preloader.

...seems as though they are very protective of their flash files.




_________________

Post Thu Nov 15, 2007 9:59 pm   Reply with quote         


here is the "SWFaddres.js" code

/**
* SWFAddress v1.1: Deep linking for Flash - http://www.asual.com/swfaddress/
*
* SWFAddress is (c) 2006 Rostislav Hristov and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
*/
if(typeof asual == "undefined") var asual = new Object();
if(typeof asual.util == "undefined") asual.util = new Object();
asual.util.Browser = new function() {
var agent = navigator.userAgent;
this.supported = false;
this.ie = false;
this.gecko = false;
this.safari = false;
this.opera = false;
this.version = -1;
if ((/MSIE/).test(agent)) {
this.ie = true;
this.version = parseFloat(agent.substring(agent.indexOf('MSIE') + 4));
this.supported = this.version >= 6;
} else if ((/AppleWebKit/).test(agent)) {
this.safari = true;
this.version = parseFloat(agent.substring(agent.indexOf('Safari') + 7));
this.supported = this.version >= 312;
} else if ((/Opera/).test(agent)) {
this.opera = true;
this.version = parseFloat(navigator.appVersion);
this.supported = this.version >= 9.02;
} else if ((/Firefox/).test(agent)) {
this.gecko = true;
this.version = parseFloat(agent.substring(agent.indexOf('Firefox') + Cool);
this.supported = this.version >= 1;
} else if ((/Camino/).test(agent)) {
this.gecko = true;
this.version = parseFloat(agent.substring(agent.indexOf('Camino') + 7));
this.supported = this.version >= 1;
} else if ((/Netscape/).test(agent)) {
this.gecko = true;
this.version = parseFloat(agent.substring(agent.indexOf('Netscape') + 9));
this.supported = this.version >= 8;
} else if ((/Mozilla/).test(agent) && (/rv:/).test(agent)) {
this.gecko = true;
this.version = parseFloat(agent.substring(agent.indexOf('rv:') + 3));
this.supported = this.version >= 1.8;
}
/* if (!this.supported && top.location.href.indexOf('#') != -1) {
document.open();
document.write('<html><head><meta http-equiv="refresh" content="0;url=' + top.location.href.substr(0, top.location.href.indexOf('#')) + '" /></head></html>');
document.close();
}*/
};
asual.util.Functions = new function() {
this.extend = function(superclass, subclass) {
function inheritance() {}
inheritance.prototype = superclass.prototype;
subclass.prototype = new inheritance();
subclass.prototype.constructor = subclass;
subclass.superConstructor = superclass;
subclass.superClass = superclass.prototype;
return subclass;
};
this.bindAsListener = function(method, object, win) {
return function(evt) {
return method.call(object, evt || ((win) ? win.event : window.event));
};
};
};
asual.util.Events = new function() {
var cache = new Array();
this.addListener = function (obj, type, listener) {
if (obj.addEventListener){
obj.addEventListener(type, listener, false);
} else if (obj.attachEvent){
obj.attachEvent('on' + type, listener);
} else {
obj['on' + type] = listener;
}
cache.push({o: obj, t: type, l: listener});
};
this.removeListener = function (obj, type, listener) {
if (obj.removeEventListener){
obj.removeEventListener(type, listener, false);
} else if (obj.detachEvent){
obj.detachEvent('on' + type, listener);
} else {
obj['on' + type] = listener;
}
};
var unload = function() {
for (var i = 0, evt; evt = cache[i]; i++) {
asual.util.Events.removeListener(evt.o, evt.t, evt.l);
}
};
if (asual.util.Browser.ie || asual.util.Browser.safari) {
this.addListener(window, 'unload', asual.util.Functions.bindAsListener(unload, this));
}
};
asual.SWFAddress = new function() {
var browser = asual.util.Browser;
var supported = browser.supported;
var iframe, form;
var swfaddr, swfid, swfupdate = false;
var swftitle = document.title;
var swflength = history.length;
var swfhistory = new Array();
var js = 'swfaddress.js';
var html = 'swfaddress.html';
var getHash = function() {
var index = top.location.href.indexOf('#');
if (index != -1) {
return top.location.href.substring(index);
}
return '';
};
var hash = getHash();
var listen = function() {
if (browser.safari) {
if (swflength != history.length && !swfupdate) {
swflength = history.length;
if (typeof swfhistory[swflength - 1] != 'undefined') {
hash = swfhistory[swflength - 1];
}
update();
}
} else if (browser.ie) {
if (hash != getHash()) {
if (browser.version < 7) {
top.location.reload();
} else {
asual.SWFAddress.setValue(getHash().replace(/#/g, ''));
}
}
if (top.document.title != swftitle) {
asual.SWFAddress.setTitle(swftitle);
}
} else {
if (hash != top.location.hash) {
hash = top.location.hash;
update();
}
}
};
var update = function() {
var addr = hash.replace(/#/g, '');
if (addr != swfaddr) {
swfaddr = addr;
var obj = document[swfid] || document.getElementById(swfid);
if (obj) {
obj.setSWFAddressValue(addr);
}
}
};
var loadSuccess = function() {
if (iframe.contentWindow && iframe.contentWindow.location) {
var win = iframe.contentWindow;
win.document.title = top.document.title = swftitle;
var src = win.location.href;
if (src.indexOf('?') > -1) {
hash = '#' + src.substring(src.indexOf('?') + 1);
} else {
hash = '#';
}
if (hash != getHash()) {
update();
top.location.hash = hash;
}
}
};
var load = function() {
if (browser.ie || browser.safari) {
var content = document.createElement('div');
content.id = 'swfaddress';
var scripts = document.getElementsByTagName('script');
for (var i = 0, s; s = scripts[i]; i++) {
if (s.src.indexOf(js) > -1) {
html = (new String(s.src)).replace(js, html);
}
}
content.innerHTML = '<iframe id="swfaddress-iframe" src="' + html + getHash().replace(/#/g, '?') + '" frameborder="no" scrolling="no"></iframe>';
document.body.appendChild(content);
content.style.position = 'absolute';
content.style.left = content.style.top = '-9999px';
iframe = content.getElementsByTagName('iframe')[0];
}
if (browser.ie) {
asual.util.Events.addListener(iframe, 'load', asual.util.Functions.bindAsListener(loadSuccess, this));
}
if (browser.safari) {
form = document.createElement('form');
form.id = 'swfaddress-form';
form.method = 'get';
content.appendChild(form);
if (typeof top.document.location.swfaddress == 'undefined') {
top.document.location.swfaddress = new Object();
}
if (typeof top.document.location.swfaddress.history != 'undefined') {
swfhistory = top.document.location.swfaddress.history.split(',');
}
}
track.call(this);
update.call(this);
setInterval(listen, 50);
};
asual.util.Functions.load = load;
var track = function() {
if (typeof urchinTracker != 'undefined'){
var path = top.location.pathname + this.getValue();
path = path.replace(/\/\//, '/');
path = path.replace(/^\/$/, '');
urchinTracker(path);
}
};
this.getId = function() {
if (!supported) return null;
return swfid;
};
this.setId = function(id) {
if (!supported) return null;
swfid = id;
};
this.getTitle = function() {
if (!supported) return null;
return top.document.title;
};
this.setTitle = function(title) {
if (!supported) return null;
if (title == 'null') {
title = '';
}
if (typeof title != 'undefined') {
swftitle = title;
top.document.title = swftitle;
}
};
this.getStatus = function() {
if (!supported) return null;
return top.status;
};
this.setStatus = function(status) {
if (!supported) return null;
if (!browser.safari) {
if (status == 'null' || typeof status == 'undefined') {
status = '';
}
var index = top.location.href.indexOf('#');
if (index == -1) {
status = top.location.href + '#' + status;
} else {
status = top.location.href.substr(0, index) + '#' + status;
}
top.status = status;
}
};
this.resetStatus = function() {
top.status = '';
};
this.getValue = function() {
if (!supported) return null;
var addr = hash.replace(/#/gi, '');
return addr;
};
this.setValue = function(addr) {
if (!supported) return null;
if (addr == 'null') {
addr = '';
}
if (swfaddr == addr) {
return;
}
var checkaddr;
var obj = document[swfid] || document.getElementById(swfid);
if (obj) {
checkaddr = obj.getSWFAddressValue();
if (checkaddr == 'null') {
checkaddr = '';
}
}
hash = '#' + addr;
if (checkaddr == addr) {
swfaddr = addr;
update();
} else {
update();
swfaddr = addr;
}
if (browser.safari) {
form.action = hash;
swfhistory[history.length] = hash;
top.document.location.swfaddress.history = swfhistory.toString();
swfupdate = true;
swflength = history.length + 1;
form.submit();
swfupdate = false;
} else if (checkaddr == addr) {
top.location.hash = hash;
}
if (browser.ie) {
var win = iframe.contentWindow;
var query = '?' + getHash().substring(hash.indexOf('#') + 1);
win.location.assign(win.location.pathname + query);
}
track.call(this);
};
if (!supported) {
return;
}
if (browser.safari) {
for (var i = 1; i < swflength; i++) {
swfhistory.push('');
}
swfhistory.push(top.location.hash);
}
if (browser.ie) {
if (hash != '') {
top.location.hash = getHash();
}
}
asual.util.Events.addListener(window, 'load', asual.util.Functions.bindAsListener(load, this));
swfaddr = this.getValue();
};
if (typeof deconcept != 'undefined' && deconcept.SWFObject) {
asual.SWFAddressObject = asual.util.Functions.extend(deconcept.SWFObject,
function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
asual.SWFAddressObject.superConstructor.apply(this, arguments);
asual.SWFAddress.setId(id);
});
SWFObject = deconcept.SWFObject = asual.SWFAddressObject;
};
SWFAddress = asual.SWFAddress;




_________________

Post Thu Nov 15, 2007 10:00 pm   Reply with quote         


The SWFobject.js code

/**
* SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
*
* SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
*/

if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
if (!document.getElementById) { return; }
this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params = new Object();
this.variables = new Object();
this.attributes = new Array();
if(swf) { this.setAttribute('swf', swf); }
if(id) { this.setAttribute('id', id); }
if(w) { this.setAttribute('width', w); }
if(h) { this.setAttribute('height', h); }
if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
if (!window.opera && document.all && this.installedVer.major > 7) {
// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
deconcept.SWFObject.doPrepUnload = true;
}
if(c) { this.addParam('bgcolor', c); }
var q = quality ? quality : 'high';
this.addParam('quality', q);
this.setAttribute('useExpressInstall', false);
this.setAttribute('doExpressInstall', false);
var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
this.setAttribute('xiRedirectUrl', xir);
this.setAttribute('redirectUrl', '');
if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
useExpressInstall: function(path) {
this.xiSWFPath = !path ? "expressinstall.swf" : path;
this.setAttribute('useExpressInstall', true);
},
setAttribute: function(name, value){
this.attributes[name] = value;
},
getAttribute: function(name){
return this.attributes[name];
},
addParam: function(name, value){
this.params[name] = value;
},
getParams: function(){
return this.params;
},
addVariable: function(name, value){
this.variables[name] = value;
},
getVariable: function(name){
return this.variables[name];
},
getVariables: function(){
return this.variables;
},
getVariablePairs: function(){
var variablePairs = new Array();
var key;
var variables = this.getVariables();
for(key in variables){
variablePairs[variablePairs.length] = key +"="+ variables[key];
}
return variablePairs;
},
getSWFHTML: function() {
var swfNode = "";
if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
if (this.getAttribute("doExpressInstall")) {
this.addVariable("MMplayerType", "PlugIn");
this.setAttribute('swf', this.xiSWFPath);
}
swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'"';
swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
var params = this.getParams();
for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
var pairs = this.getVariablePairs().join("&");
if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
swfNode += '/>';
} else { // PC IE
if (this.getAttribute("doExpressInstall")) {
this.addVariable("MMplayerType", "ActiveX");
this.setAttribute('swf', this.xiSWFPath);
}
swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'">';
swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
var params = this.getParams();
for(var key in params) {
swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
}
var pairs = this.getVariablePairs().join("&");
if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
swfNode += "</object>";
}
return swfNode;
},
write: function(elementId){
if(this.getAttribute('useExpressInstall')) {
// check to see if we need to do an express install
var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
this.setAttribute('doExpressInstall', true);
this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
document.title = document.title.slice(0, 47) + " - Flash Player Installation";
this.addVariable("MMdoctitle", document.title);
}
}
if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
n.innerHTML = this.getSWFHTML();
return true;
}else{
if(this.getAttribute('redirectUrl') != "") {
document.location.replace(this.getAttribute('redirectUrl'));
}
}
return false;
}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins && navigator.mimeTypes.length){
var x = navigator.plugins["Shockwave Flash"];
if(x && x.description) {
PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
}
}else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE
var axo = 1;
var counter = 3;
while(axo) {
try {
counter++;
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
// document.write("player v: "+ counter);
PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
} catch (e) {
axo = null;
}
}
} else { // Win IE (non mobile)
// do minor version lookup in IE, but avoid fp6 crashing issues
// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
try{
var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
}catch(e){
try {
var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
} catch(e) {
if (PlayerVersion.major == 6) {
return PlayerVersion;
}
}
try {
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
} catch(e) {}
}
if (axo != null) {
PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
}
}
return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
if(this.major < fv.major) return false;
if(this.major > fv.major) return true;
if(this.minor < fv.minor) return false;
if(this.minor > fv.minor) return true;
if(this.rev < fv.rev) return false;
return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
getRequestParameter: function(param) {
var q = document.location.search || document.location.hash;
if (param == null) { return q; }
if(q) {
var pairs = q.substring(1).split("&");
for (var i=0; i < pairs.length; i++) {
if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
return pairs[i].substring((pairs[i].indexOf("=")+1));
}
}
}
return "";
}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
var objects = document.getElementsByTagName("OBJECT");
for (var i = objects.length - 1; i >= 0; i--) {
objects[i].style.display = 'none';
for (var x in objects[i]) {
if (typeof objects[i][x] == 'function') {
objects[i][x] = function(){};
}
}
}
}
// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
if (deconcept.SWFObject.doPrepUnload) {
if (!deconcept.unloadSet) {
deconcept.SWFObjectUtil.prepUnload = function() {
__flash_unloadHandler = function(){};
__flash_savedUnloadHandler = function(){};
window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
}
window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
deconcept.unloadSet = true;
}
}
/* add document.getElementById if needed (mobile IE < 5) */
if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;




_________________

Post Thu Nov 15, 2007 10:01 pm   Reply with quote         


The SWFBridge.js code

/**
* @fileoverview This is a namespaced mini-library for Schematic
* The meat n' potatoes here is the SWFBridge function.
*
* @author Richard Herrera rherrera@schematic.com
* @version 1.0
*/

/**
* Does Schematic have a namespace? Use this in the meantime...
*/
if (typeof Schematic === "undefined") {
var Schematic = {};
}

/**
* Load objects when the DOM loads
* @author Dean Edwards / Matthias Miller / John Resig / Mark Wubben / Paul Sowden
*/
Schematic.dom = {
stack : [],
compile : function() {
if (arguments.callee.done) {
return;
}
arguments.callee.done = true;
for (var i = 0; Schematic.dom.stack[i] !== undefined; i++) {
Schematic.dom.stack[i]();
}
},
load: function(e) {
this.stack.push(e);
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", Schematic.dom.compile, null);
}
/*@cc_on
document.write("<script id=__ready defer src=//:><\/script>");
document.all.__ready.onreadystatechange = function() {
if (this.readyState == "complete") {
this.removeNode();
Schematic.dom.compile();
}
}@*/
if (/KHTML|WebKit/i.test(navigator.userAgent)) {
var _timer = setInterval(function() {
if (/loaded|complete/.test(document.readyState)) {
clearInterval(_timer);
Schematic.dom.compile();
}
}, 10);
}
window.onload = Schematic.dom.compile;
}
};

/**
* Graceful redirection for Flash/non-Flash users.
* @author Richard Herrera rherrera@schematic.com
* @version 1.0
*/
Schematic.SWFBridge = {
init : function() {
if (!so) {
/**
* If no SWFObject on the page (subpages), create a dummy one.
* Actually, all we need is the version, so everything else can be 0...
*/
var so = new SWFObject(0, "main", 0, 0, "9.0.28");
}
var versionIsValid = so.installedVer.versionIsValid(so.getAttribute("version")),
hash = (/#/g.test(location.href));
if (versionIsValid) {
Schematic.SWFBridge.enable();
} else {
document.getElementsByTagName("html")[0].className += " expressInstall";
}
/**
* The magic. If either of the following scenarios, trigger the redirect:
* 1. Flash is installed and is the correct version, but no anchor is found.
* 2. An anchor is present, but Flash is not installed or not the correct version.
*/
if ((!hash && versionIsValid) || (hash && !versionIsValid)) {
document.getElementsByTagName("html")[0].className += " hideContent";
var link = Schematic.SWFBridge.redirect(hash);
location.replace(link);
}
},
redirect : function(hash) {

var protocol = location.protocol + "//",
host = location.host,
path = location.href.split(host)[1];

if (path == "/" || path == "/#") {
return "/Home/";
}

if (hash) {
path = path.replace(/#\/?/g, "");
} else if (!(/\//.test(path.charAt(0)))) {
path = "/" + path;
}

return (protocol + host + (hash ? "" : "/#") + path);

},
enable : function() {
document.getElementsByTagName("html")[0].className += " enableFlash";
}
};
window.onload = Schematic.SWFBridge.init;




_________________

Goto page 1, 2  Next

Photoshop Contest Forum Index - Brain Storm - Flash Gits Only - Reply to topic

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Navigate PSC
Contests open  completed  winners  prizes  events  rules  rss 
Galleries votes  authentic  skillful  funny  creative  theme  winners 
Interact register  log in/out  forum  chat  user lookup  contact 
Stats monthly leaders  hall of fame  record holders 
PSC advantage  news (rss)  faq  about  links  contact  home 
Help faq  search  new users  tutorials  contact  password 

Adobe, the Adobe logo, Adobe Photoshop, Creative Suite and Illustrator are registered trademarks of Adobe Systems Incorporated.
Text and images copyright © 2000-2006 Photoshop Contest. All rights reserved.
A venture of ExpertRating.com