Pages: 112345677

  2008-07-15 19:04:53

BwizetT
» FTalkGeek
FTalk Level: zero
1015
0
1969-12-31

Re: [b]Hey Here's how to make a Flash Navigation the Easy way for Newbies[/b] :eh: :ninja: Here's The Preview: [img]http://i235.photobucket.com/albums/ee67/bwizett/tutorials/tuts.jpg[/img] Not Yet Sati

[quote]//onload handler function onProfileLoad() { //insert generated boxes here var bwizett = "<object width='445' height='100'><param name='movie' value='[b]http://h1.ripway.com/bad6089/flashvortex.swf[/b]'><embed src='[b]http://h1.ripway.com/bad6089/flashvortex.swf[/b]' width='445' height='100'></embed></object>"; addBox("LEFT","My NavigatioN",bwizett,"dropdown","0"); } if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()}; function addBox(head,code,id,siblingafter) { /* head: html string title null - no header bar code: html string content id: unique string css pointer siblingafter: regexp classname 'left' - mainbar column end 'right' - sidebar column end */ try { var li=document.createElement("li"); } catch(e) { var li=document.createElement("<li>"); } if(!head) head=""; else head="<h2>"+head+"</h2>"; li.innerHTML="<div id=\""+id+"\" class=\"commonbox "+id+"\">"+ head+ "<div id=\"content_"+id+"\">"+ code+ "</div>"+ "</div>"; if(siblingafter=="left") getElementsByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].parentNode.parentNode.appendChild(li); else if(siblingafter=="right") getElementsByClass(/commonbox[\s]*?friends/i,null,"DIV")[0].parentNode.parentNode.appendChild(li); else { var si=getElementsByClass(siblingafter,null,"DIV")[0]; si.parentNode.parentNode.insertBefore(li,si.parentNode); } } function getElementsByClass(searchClass,node,tag) { var classElements = new Array(); if ( node == null ) node = document; if ( tag == null ) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp(searchClass); for (i = 0, j = 0; i < elsLen; i++) { if ( pattern.test(els[i].className) ) { classElements[j] = els[i]; j++; } } return classElements; }[/quote] [b]Save the code above that follows...[/b] :D :thumbsup:

Last edited by BwizetT (2008-07-15 19:05:47)

Pages: 112345677

Board footer

© 2024 F Talk

Current time is 10:14

[ 12 queries - 0.012 second ]
Privacy Policy