Extending the portfolio, rollOver action on the sub-links
Some days ago, i got a pretty interesting e-mail from a fellow designer from
I remembered that I had this working in a previous version of the portfolio, but for some reason I somehow deleted this option or action. Well I took the time to Update this and make it work again without changing much of the code.
I have added the code, i hope it works.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | renderItems = function (id, totalsubLinks, newposCont, fatherID) { if (BsubLinks.length>0) { cleansubLinks(BsubLinks); } BsubLinks = new Array(); for (n=totalsubLinks-1; n>=0; n--) { initCont = mc_menu.holder.mc_cont.attachMovie("mc_contbutt", "sb", this.getNextHighestDepth()); var newCont = initCont.duplicateMovieClip("sb"+n, 1+n); BsubLinks[n] = newCont; newCont.label = "- "+mainContent[id][n]["title"]; newCont.trackinglabel = mainContent[id][n]["title"]; newCont.txtCaption = mainContent[id][n]["caption"]; newCont.newID = mainContent[id][n]["id"]; newCont.fatherID = fatherID; newCont.childID = n; newCont.pressed = false; newCont.totalTabs = mainContent[id][n][0].length; newCont._y = newposCont; newposCont = newCont._y+newCont._height; newCont.onRelease = function() { doTabs(this.totalTabs,this.fatherID,this.childID); showCaption(this.txtCaption); mc_caption._alpha = 100; mc_main._alpha = 100; mc_shadow._alpha = 100; turnofSublinks(BsubLinks); this.gotoAndStop(2); this.pressed = true; }; newCont.onRollOver = function() { this.gotoAndStop(3); }; newCont.onRollOut = newCont.onReleaseOutside=function () { if (this.pressed == true) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } }; } initCont.removeMovieClip(sb); }; function turnofSublinks(buttonsArr) { var totalB = buttonsArr.length; for (n=0; n<totalB; n++) { buttonsArr[n].pressed = false; buttonsArr[n].gotoAndStop(1); } } |
January 3rd, 2008 at 6:08 pm
how do i get the sublink title in each menu section to appear differently? no matter what i do the titles of all the sublinks appear to be the same in every section. i’d appreciate it if you could tell me…also, i dont know how to make your rollOver action to work properly…when i rollover, the word LINK appear instead of the title of the sublink…
January 7th, 2008 at 11:11 am
Hi Sasha,
Sorry that I replied this late, but could you show me what you have done so far? That way I can understand better what you are trying to achieve.
Regards,
Frank Fernow
February 22nd, 2008 at 10:43 am
I uderstand what happen when u check base.xml the first section ID its 0 0 and second section got the same ID 0 u should change the ID of second section to 1 and for third section to 2. Hope this helps.
Example:
0
Link 01
1
Proyect 01
Proyect 01,Text1Online link: http://www.google.com]]>
http://www.google.com
images/portfolio_image01.jpg
images/portfolio_image02.jpg
images/portfolio_image03.jpg
1
Link 02
1
Proyect 02
Proyect 01,text2Online link: http://www.google.com]]>
http://www.google.com
images/portfolio_image01.jpg
images/portfolio_image02.jpg
images/portfolio_image03.jpg
2
Link 03
1
Proyect 03
Proyect 01,text3Online link: http://www.google.com]]>
http://www.google.com
images/portfolio_image01.jpg
images/portfolio_image02.jpg
images/portfolio_image03.jpg