Page 1 of 1

Flash and NorCascade

Posted: Fri Mar 30, 2007 10:39 am
by bwshop
Morning! Another problem encountered...

Put some flash on the home page by creating a new fragment in Actinic (copying and pasting the coding from Dreamweaver) - looks fine, but I've noticed the NorCascade JavaScript Array actually 'pops out' BEHIND the flash movie.

Could you advise on how to fix this?


Posted: Fri Mar 30, 2007 11:13 am
by norman
This is a well-known problem with Flash and other widgets (like SELECT boxes). The fix is from (who wrote and get paid for the DHTML code ( ) that NorCascade uses.

Twinhelix have this ( ... phelp/1279 ) support article.

The code referred to is quite complex. Here it is.

Code: Select all

// I have included two methods here for you to use; see which one suits you best...

// This will allow the menus to display over SELECT boxes in IE5.5+ browsers.
// It will do nothing for NS4 or IE5.0 and earlier.
// To activate: paste this afte your menu data (either in the POP_DATA file, or your frameset)
// and then make sure you call IE55SelectBoxFix() for all your menu objects you want fixed.

function IE55SelectBoxFix(menuObj) { with (menuObj)
 if (window.createPopup) for (var mN in menu) with (menu[mN][0])
  extraHTML += '<iframe src="about:blank" style="position: absolute; left: 0px; top: 0px; width: ' +
   menuW + 'px; height: ' + menuH + 'px; z-index: 0; border: none; ' +
   'filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"></iframe>';

// This can hide any element, like applets, movies and IFRAMEs, and it is more complicated :).
// To activate: Paste this into your menu data file (either POP_DATA or the frameset).
// This must be near the end of the file, after your menu animation settings in particular.
// It will automatically apply itself to all menus in that page.
// This function will have no effect on NS4's form behaviour.

PopupMenu.prototype.elementHide = function(mN, show)
 var hideTags = [];
 // <select> is hidden in all IE versions, and Opera < 7.0.
 if ((isIE && !isOp) || (isOp && !document.documentElement)) hideTags[hideTags.length] = 'SELECT';
 // <iframe> is hidden in IE < 5.5, all Opera versions, and Mozilla < 1.0.
 if ((isIE && !isOp && !window.createPopup) || isOp ||
  navigator.userAgent.match('rv:0.')) hideTags[hideTags.length] = 'IFRAME';
 // <object> and <applet> are hidden in all browsers.
 hideTags[hideTags.length] = 'OBJECT';
 hideTags[hideTags.length] = 'APPLET';

 with ([mN][0])
  if (!lyr || !lyr.ref) return;

  var oldFn = show ? 'ehShow' : 'ehHide';
  if (this[oldFn]) this[oldFn](mN);
  else[mN][0].lyr.vis(show ? 'visible' : 'hidden');
  if (!isDOM && !isIE) return;

  if (hideTags.length == -1) return;
  if (!this.hideElms) this.hideElms = [];
  var hE = this.hideElms;
  if (show)
   var elms = [], w = par?eval(par):self;
   for (var t = 0; t < hideTags.length; t++)
    var tags = isDOM ? w.document.getElementsByTagName(hideTags[t]) :
     isIE ? w.document.all.tags(hideTags[t]) : null;
    for (var i = 0; i < tags.length; i++) elms[elms.length] = tags[i];
   for (var eN = 0; eN < elms.length; eN++)
    var eRef = elms[eN];
    with ( var eX = x, eY = y;
    if (!(lyr.x()+menuW<eX || lyr.x()>eX+eRef.offsetWidth) &&
        !(lyr.y()+menuH<eY || lyr.y()>eY+eRef.offsetHeight))
     if (!hE[eN]) hE[eN] = { ref: eRef, menus: [] };
     hE[eN].menus[mN] = true; = 'hidden';
  else for (var eN in hE)
   var reShow = 1, eD = hE[eN];
   eD.menus[mN] = false;
   for (var eM in eD.menus) reShow &= !eD.menus[eM];
   if (reShow && eD.ref)
   { = 'visible';
    delete hE[eN];
for (var p in PopupMenu.list)
 var pm = PopupMenu.list[p];
 pm.ehShow = pm.showMenu;
 pm.showMenu = new Function('mN','this.elementHide(mN, true)');
 pm.ehHide = pm.hideMenu;
 pm.hideMenu = new Function('mN','this.elementHide(mN, false)');
Unfortunately you probably need the long winded METHOD TWO.

Posted: Fri Mar 30, 2007 11:32 am
by bwshop
HI Norman

Thanks for that - any advice on the best place to put the code? Also, our site is slow and I've been told it's very Javascript heavy - is this down to the NorCascade, and if so any ideas on how to improve the performance?


Posted: Fri Mar 30, 2007 11:43 am
by norman
Try putting the code into Norcascade / Advanced / Extra Code. Put it after anything that's already there. Support on the DHTML bits is best done via Twinhelix as I did not write (or indeed fully understand) this code.

As to page size and speed. You Section structure generates about 70Kb of JavaScript data. This will only be downloaded once per customer visit (it'll be cached for subsequent pages). For broadband users the initial load will be negligible and dial-up users will need about 20 seconds to get it all.

Posted: Fri Mar 30, 2007 11:53 am
by bwshop
OK - given that a try, but made no difference - it's only on the flash movies on the home page - one way round it is to move it around, but it would be useful for future obstacles...all builds on the knowledge as they say.

With regards to the slow speed, I suspect it's something to do with the Actinic coding - I'll have a play!

Cheers Norman,