аЯрЁБс>ўџ  ўџџџј„ќ7їmџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџRoot EntryџџџџџџџџpЊ|YЊrЯƒRASHАлМ…A]У$ContentsџџџџлPage 1џџџџџџџџџџџџdІ Symbol 8џџџџџџџџџџџџVB§џџџџџџџџџџџџџџџ§џџџц џџџџўџџџџўџџџ ўџџџ‡/@!"#$%&'()*+,-.ўџџџB123456789:;<=>?SAqCDEFGHIJKLMNOPQRXTUVWўџџџўџџџџџџџ`§џџџџџџџ8іŒabcdefghijklmnopžrstўџџџ‹wxyz{|}~€Root EntryџџџџџџџџpЊ|YЊrЯƒRASHЌHqqУ$ContentsџџџџлPage 1џџџџџџџџџџџџdІ Symbol 8џџџџџџџџџџџџVBџџџџџџџџ§џџџ§џџџџџџџџџџџџџџџцўYџџџџ џџџџ‡/@!"#$%&'()*+,-.ўџџџB123456789:;<=>?SAqCDEFGHIJKLMNOPQRXTUVWўџџџўџџџўџџџ`џџџџ@8іŒabcdefghijklmnopžrstўџџџ‹wxyz{|}~€     ўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ !"ўџџџ$%&'()*+,-./0123456789:;<ўџџџ†=>ўџџџBCDEFGHIJKLMNOPQR\џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ]^_`abcdefghijklўџџџ§џџџopqrstuvwxyz{|}~€     ўџџџўџџџS !"ўџџџ$%&'()*+,-./0123456789:;<ўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџTUVWXYZ[ўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџSymbol 7 џџџџ uSymbol 1џџџџџџџџџџџџQ Symbol 2џџџџ nSymbol 3џџџџџџџџџџџџo  ўџџџўџџџ ўџџџўџџџ !ўџџџ#$%&'()*+,-./01234A6789:ўџџџ<=>?@ўџџџBCDEFGўџџџIJKLMNOPўџџџRSTUўџџџWXYZ[ўџџџ]^_`abcўџџџefghijklrnopqўџџџstuvwxyz{|}~€Symbol 7 џџџџ uSymbol 1џџџџџџџџџџџџQ Symbol 2џџџџ nSymbol 3џџџџџџџџџџџџoSymbol 21џџџџџџџџЮИ+Symbol 22 џџџџ)Symbol 23џџџџџџџџџџџџŽ*Symbol 24џџџџЗѓ2  ўџџџўџџџ ўџџџўџџџ !ўџџџ#$%&'()*+,-./01234A6789:ўџџџ<=>?@ўџџџBCDEFGўџџџIJKLMNOPўџџџRSTUўџџџWXYZ[ўџџџ]^_`abcўџџџefghijklrnopqўџџџstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџtџЫ*if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.ClickOut = function() { if (!this.Owner.userWindow_mc.hitTest(_xmouse,_ymouse,true)) { this.Owner.pfnCallBack(-1); } } TopicListDialog.prototype.DisplayTopicDialog = function(topicList_array,pfnCallBack) { this.userWindow_mc._visible = true; this.pfnCallBack = pfnCallBack; this.FillList(topicList_array,pfnCallBack); if (bFade) { this.curAlpha = 0; this.SetAlpha(this.curAlpha); this.curAlpha+=10; this.userWindow_mc.onEnterFrame = this.FadeIn; } } TopicListDialog.prototype.FadeIn = function() { var theList = this.Owner; if (theList.curAlpha>100) { this.onEnterFrame = undefined; } else { theList.SetAlpha(theList.curAlpha) theList.curAlpha+=10; } } TopicListDialog.prototype.FadeOut = function() { var theList = this.Owner; if (theList.curAlpha<0) { this.onEnterFrame = undefined; theList.Destroy(); } else { theList.SetAlpha(theList.curAlpha) theList.curAlpha-=10; } } TopicListDialog.prototype.SetAlpha = function(newAlpha) { this.userWindow_mc._alpha = newAlpha; var i = 0; var curYPos = this.userWindow_mc._y + (arrowHeight*this.nArrows); while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (arrowHeight*this.nArrows))) { this.textNode_array[i].userIcon_mc._alpha = newAlpha; this.textNode_array[i].userHighlight_mc._alpha = newAlpha; if (newAlpha == 0) { this.textNode_array[i].userTextField_mc.label_mc._visible=false; } else { this.textNode_array[i].userTextField_mc.label_mc._visible=true; } this.textNode_array[i].userTextField_mc._alpha = newAlpha; this.textNode_array[i].userTextField_mc.label_mc._alpha = newAlpha; this.textNode_array[i].userTextField_mc.label_mc.label_txt._alpha = newAlpha; curYPos += this.nodeHeight; i++; } } TopicListDialog.prototype.FillList = function(topicList_array,pfnCallBack) { var i = 0; for (i = 0; i < topicList_array.length; i++) { this.textNode_array[i] = CreateNewObj(pfnCallBack,i); this.textNode_array[i].SetText(topicList_array[i].displayName_str); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { this.maxNodeWidth = nodeWidth; } } this.nodeHeight = this.textNode_array[0].GetHeight(); this.SizeWindow(); this.PositionWindow(); this.UpdateDisplay(this.topIndex); } TopicListDialog.prototype.SizeWindow = function() { var totalHeight = this.nodeHeight * this.textNode_array.length +marginTop; this.userWindow_mc._width = this.maxNodeWidth+widthBuffer; if (totalHeight > this.maxHeight) { this.displayItemCount = Math.floor((this.maxHeight - (arrowHeight*2))/this.nodeHeight); totalHeight = (this.displayItemCount* this.nodeHeight)+ (arrowHeight*2) this.userWindow_mc._height = totalHeight; this.EnableArrows(); this.nArrows = 1; } else { this.displayItemCount = Math.floor(totalHeight/this.nodeHeight); this.userWindow_mc._height = totalHeight; } } TopicListDialog.prototype.PositionWindow = function() { // Set X Position var oldXPos = this.userWindow_mc._x; this.userWindow_mc._x = this.xPos; if (this.xPos+this.userWindow_mc._width > Stage.width) { this.userWindow_mc._x = Stage.width - this.userWindow_mc._width; } if (this.userWindow_mc._x < 0) { this.userWindow_mc._x = 0; } var deltaX = this.userWindow_mc._x - oldXPos; // Set Y Position var oldYPos = this.userWindow_mc._y; this.userWindow_mc._y = this.yPos; if (this.yPos+this.userWindow_mc._height>Stage.height) { this.userWindow_mc._y = Stage.height - this.userWindow_mc._height; } var deltaY = this.userWindow_mc._y - oldYPos; if (this.nArrows>0) { this.upArrow_mc._x +=deltaX; this.upArrow_mc._y +=deltaY; this.downArrow_mc._x +=deltaX; this.downArrow_mc._y +=deltaY; } } TopicListDialog.prototype.UpdateDisplay = function(nIndex) { var curYPos = this.userWindow_mc._y + (arrowHeight*this.nArrows); if (this.nArrows == 0) { curYPos +=marginTop; } var i = nIndex; if (this.lastIndex < nIndex) { this.textNode_array[this.lastIndex].MakeInvisible(); } else { this.textNode_array[this.lastIndex+(this.displayItemCount-1) ].MakeInvisible(); } while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (arrowHeight*this.nArrows))) { this.textNode_array[i].MoveTo(this.userWindow_mc._x + 5, curYPos); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { newWidth = nodeWidth - this.maxNodeWidth; this.textNode_array[i].userTextField_mc._width -= newWidth; } curYPos += this.nodeHeight; this.textNode_array[i].SetState(true); this.textNode_array[i].TransitionIn(); this.textNode_array[i].MakeVisible(); i++; } this.lastIndex = nIndex; } TopicListDialog.prototype.EnableArrows = function() { this.DrawArrows(); this.CenterArrows(); } TopicListDialog.prototype.DrawArrows = function() { // Create and draw up arrow this.upArrow_mc = createEmptyMovieClip("UpArrow",1000000); this.upArrow_mc.moveTo(3,8); this.upArrow_mc.lineStyle(2,0x555555,100); this.upArrow_mc.lineTo(8,3); this.upArrow_mc.lineTo(13,8); this.upArrow_mc.lineStyle(1,0x555555,0); this.upArrow_mc.moveTo(0,0); this.upArrow_mc.beginFill(0x000000,0); this.upArrow_mc.lineTo(0,10); this.upArrow_mc.lineTo(15,10); this.upArrow_mc.lineTo(15,0); this.upArrow_mc.lineTo(0,0); this.upArrow_mc.endFill(); this.upArrow_mc.onPress = this.UpArrowPressed; this.upArrow_mc.onRelease = this.UpArrowReleased; this.upArrow_mc.Owner = this; this.upArrow_mc._visible = false; // Create and draw down arrow this.downArrow_mc = createEmptyMovieClip("DownArrow",1000001); this.downArrow_mc.moveTo(3,3); this.downArrow_mc.lineStyle(2,0x555555,100); this.downArrow_mc.lineTo(8,8); this.downArrow_mc.lineTo(13,3); this.downArrow_mc.lineStyle(1,0x555555,0); this.downArrow_mc.moveTo(0,0); this.downArrow_mc.beginFill(0x000000,0); this.downArrow_mc.lineTo(0,10); this.downArSymbol 45*џџџџџџџџ§Ћ1Symbol 46,.џџџџы94Symbol 47џџџџ/џџџџиrDSymbol 48џџџџџџџџџџџџМ4џџCPicPageџџ CPicLayerџџ CPicFrameџџCPicText€€ ((И п@Ш_sansџџџџ( label_txt€€џџџ?џџfL€€ LџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicSymbolh‚ џh‚џџџџ €€џџџ?џџДc€€ Layer 1џџџџO€џџ€€€€ayer 1џџџџO€џџ€€meџџCPicTexџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicSprite dџЁnlabel_mc€€џџџ?џџџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџхWџз%#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; _global.textNode = new Object; _global.textNode.nCount = 0; function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this codrow_mc.lineTo(15,10); this.downArrow_mc.lineTo(15,0); this.downArrow_mc.lineTo(0,0); this.downArrow_mc.endFill(); this.downArrow_mc.moveTo(0,100); this.downArrow_mc.onPress = this.DownArrowPressed; this.downArrow_mc.onRelease = this.DownArrowReleased; this.downArrow_mc.Owner = this; } TopicListDialog.prototype.UpArrowPressed = function() { this.Owner.downArrow_mc._visible = true; this.Owner.topIndex--; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex > 0) { this.OwnerџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџvXџˆ#initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Save the callback function once defined this.pfnCallback = undefined; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.ClickOut = function() { if (!this.Owner.userWindow_mc.hitTest(_xmouse,_ymouse,true)) { this.Owner.pfnCallBack(-1); } } TopicListDialog.prototype.DisplayTopicDialog = function(topicList_array,pfnCallBack) { this.userWindow_mc._visible = true; this.pfnCallBack = pfnCallBack; this.FillList(topicList_array,pfnCallBack); } TopicListDialog.prototype.FillList = function(topicList_array,pfnCallBack) { var i = 0; for (i = 0; i < topicList_array.length; i++) { this.textNode_array[i] = CreateNewObj(pfnCallBack,i); this.textNode_array[i].SetText(topicList_array[i].displayName_str); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { this.maxNodeWidth = nodeWidth; } } this.nodeHeight = this.textNode_array[0].GetHeight(); this.SizeWindow(); this.PositionWindow(); this.UpdateDisplay(this.topIndex); } TopicListDialog.prototype.SizeWindow = function() { var totalHeight = this.nodeHeight * this.textNode_array.length +marginTop; this.userWindow_mc._width = this.maxNodeWidth+widthBuffer; if (totalHeight > this.maxHeight) { this.displayItemCount = Math.floor((this.maxHeight - (arrowHeight*2))/this.nodeHeight); _parent.debug_trace(this.displayItemCount); totalHeight = (this.displayItemCount* this.nodeHeight)+ (arrowHeight*2) this.userWindow_mc._height = totalHeight; this.EnableArrows(); this.nArrows = 1; } else { this.displayItemCount = Math.floor(totalHeight/this.nodeHeight); this.userWindow_mc._height = totalHeight; } } TopicListDialog.prototype.PositionWindow = function() { // Set X Position var oldXPos = this.userWindow_mc._x; this.userWindow_mc._x = this.xPos; if (this.xPos+this.userWindow_mc._width > Stage.width) { this.userWindow_mc._x = Stage.width - this.userWindow_mc._width; } if (this.userWindow_mc._x < 0) { this.userWindow_mc._x = 0; } var deltaX = this.userWindow_mc._x - oldXPos; // Set Y Position var oldYPos = this.userWindow_mc._y; this.userWindow_mc._y = this.yPos; if (this.yPos+this.userWindow_mc._height>Stage.height) { this.userWindow_mc._y = Stage.height - this.userWindow_mc._height; } var deltaY = this.userWindow_mc._y - oldYPos; if (this.nArrows>0) { this.upArrow_mc._x +=deltaX; this.upArrow_mc._y +=deltaY; this.downArrow_mc._x +=deltaX; this.downArrow_mc._y +=deltaY; } } TopicListDialog.prototype.UpdateDisplay = function(nIndex) { var curYPos = this.userWindow_mc._y + (arrowHeight*this.nArrows); if (this.nArrows == 0) { curYPos +=marginTop; } var i = nIndex; if (this.lastIndex < nIndex) { this.textNode_array[this.lastIndex].MakeInvisible(); } else { this.textNode_array[this.lastIndex+(this.displayItemCount-1) ].MakeInvisible(); } while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (arrowHeight*this.nArrows))) { this.textNode_array[i].MoveTo(this.userWindow_mc._x + 5, curYPos); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { newWidth = nodeWidth - this.maxNodeWidth; this.textNode_array[i].userTextField_mc._width -= newWidth; } curYPos += this.nodeHeight; this.textNode_array[i].SetState(true); this.textNode_array[i].TransitionIn(); this.textNode_array[i].MakeVisible(); i++; } this.lastIndex = nIndex; } TopicListDialog.prototype.EnableArrows = function() { this.DrawArrows(); this.CenterArrows(); } TopicListDialog.prototype.DrawArrows = function() { // Create and draw up arrow this.upArrow_mc = createEmptyMovieClip("UpArrow",1000000); this.upArrow_mc.moveTo(3,8); this.upArrow_mc.lineStyle(2,0x555555,100); this.upArrow_mc.lineTo(8,3); this.upArrow_mc.lineTo(13,8); this.upArrow_mc.lineStyle(1,0x555555,0); this.upArrow_mc.moveTo(0,0); this.upArrow_mc.beginFill(0x000000,0); this.upArrow_mc.lineTo(0,10); this.upArrow_mc.lineTo(15,10); this.upArrow_mc.lineTo(15,0); this.upArrow_mc.lineTo(0,0); this.upArrow_mc.endFill(); this.upArrow_mc.onPress = this.UpArrowPressed; this.upArrow_mc.Owner = this; this.upArrow_mc._visible = false; // Create and draw down arrow this.downArrow_mc = createEmptyMovieClip("DownArrow",1000001); this.downArrow_mc.moveTo(3,3); this.downArrow_mc.lineStyle(2,0x555555,100); this.downArrow_mc.lineTo(8,8); this.downArrow_mc.lineTo(13,3); this.downArrow_mc.lineStyle(1,0x555555,0); this.downArrow_mc.moveTo(0,0); this.downArrow_mc.beginFill(0x000000,0); this.downArrow_mc.lineTo(0,10); this.downArrow_mc.lineTo(15,10); this.downArrow_mc.lineTo(15,0); this.downArrow_mc.lineTo(0,0); this.downArrow_mc.endFill(); this.downArrow_mc.moveTo(0,100); this.downArrow_mc.onPress = this.DownArrowPressed; this.downArrow_mc.Owner = this; } TopicListDialog.prototype.UpArrowPressed = function() { this.Owner.downArrow_mc._visible = true; this.Owner.topIndex--; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex == 0) { this._visible = false; } } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex == this.Owner.textNode_array.length-this.Owner.displayItemCount) { this._visible=false; } } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); this.downArrow_mc.removeMovieClip(); this.userWindow_mc._visible = false; Mouse.removeListener(this.mouseListener); } #endinitclip€€ Layer 1џџџџO€џџ€€e is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); // CџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџА7џЇ'#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; _global.textNode = new Object; _global.textNode.nCount = 0; function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); var rect = textFormatObj.getTextExtent(newText_str) // this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this..arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theListreate a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Make sure the text field sizes properly this.userTextField_mc.label_mc.label_txt.autoSize = true; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.text = newText_str; this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionIn = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndStop("visible"); this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.unloadMovie(); this.userTextField_mc.unloadMovie(); this.userHighlight_mc.unloadMovie(); } // Register the clauserTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.unloadMovie(); this.userTextField_mc.unloadMovie(); this.userHighlight_mc.unloadMovie(); } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; #endinitclip€€ TextNode DefinitionџџџџO€џџ€€ss Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; #endinitclip€€ TextNode DefinitionџџџџO€џџ€€џџџџ}iLabel defaultValueњПg LЄI СЁ–ъяџ€шўџџЬ шўџџЬџџџџ/HvarName defaultValueK0љ’‹˜FІЉќ@brh€Шф ‚ƒ„…†‡ˆ‰Š‹ŒŽўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџ/џ (#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; _global.textNode = new Object; _global.textNode.nCount = 0; function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this cod‚ƒ…§џџџўџџџџџџџž‰ш‹ŒŽ‘’“”•–—˜™š›œžŸаЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙўџџџКНОПРСТУФХЦЧШЩЪЫЬЭЮЯбўџџџвгдежзўџџџйклмнопрстуфхцчшщъьэюя№ёђѓєѕіїјљњћќ§ўџSymbol 45*џџџџџџџџ§Ћ1Symbol 46,/џџџџы94Symbol 47џџџџџџџџџџџџиrDSymbol 48.0џџџџn4џџџ?џџ‡@€€ Layer 1џџџџO€џџ€€ this.userTextField_mc.label_mc.label_txt._heighџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShape€€Вёџџы§џџ џfџгО:‡0№0Œ0žўГЙбU1УЦ=:€€џџџ?џџЭ[€€ LaSymbol 11џџџџџџџџџџџџ\ЩSymbol 12 џџџџ;nSymbol 13џџџџџџџџџџџџа&Symbol 14џџџџv)џџџ?џџL€€ Нџ€€џџџ?џџ†`€€ Layer 1џџџџO€џџ€€€€џџџ?џџWr€€€e is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); var rect = textFormatObj.getTextExtent(newText_str) // this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClas) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџрdџ;*#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; var g_textFormat = undefined; if (_global.textNode == undefined) { _global.textNode = new Object; _global.textNode.nCount = 0; } function SetTextFormat(newTextFormat) { _parent.debug_trace("*******************************************************"); _parent.debugџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџdџ (#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; _global.textNode = new Object; _global.textNode.nCount = 0; function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); var rect = textFormatObj.getTextExtent(newText_str) // this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; #endinitclip€€ TextNode DefinitionџџџџO€џџ€€_trace(newTextFormat.font); _parent.debug_trace("*******************************************************"); g_textFormat = newTextFormat; } function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie cliџџџ?џџFstop();€€€џџџ?џџЬstop();€€ ActionsџџџџOџOџ€€€€џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShape€€Fћџџjџџџ™џs€шXэ0Ј§0ш0X€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџе4џ (#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; _global.textNode = new Object; _global.textNode.nCount = 0; function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); var rect = textFormatObj.getTextExtent(newText_str) // this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make s.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; #endinitclip€€ TextNode DefinitionџџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџ0]џЫ*if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.ClickOut = function() { if (!this.Owner.userWindow_mc.hitTest(_xmouse,_ymouse,true)) { this.Owner.pfnCallBack(-1); } } TopicListDialog.prototype.DisplayTopicDialog = function(topicList_array,pfnCallBack) { this.userWindow_mc._visible = true; this.pfnCallBack = pfnCallBack; this.FillList(topicList_array,pfnCallBack); if (bFade) { this.curAlpha = 0; this.SetAlpha(this.curAlpha); this.curAlpha+=10; this.userWindow_mc.onEnterFrame = this.FadeIn; } } TopicListDialog.prototype.FadeIn = function() { var theList = this.Owner; if (theList.curAlpha>100) { this.onEnterFrame = undefined; } else { theList.SetAlpha(theList.curAlpha) theList.curAlpha+=10; } } TopicListDialog.prototype.FadeOut = function() { var theList = this.Owner; if (theList.curAlpha<0) { this.onEnterFrame = undefined; theList.Destroy(); } else { theList.SetAlpha(theList.curAlpha) theList.curAlpha-=10; } } TopicListDialog.prototype.SetAlpha = function(newAlpha) { this.userWindow_mc._alpha = newAlpha; var i = 0; var curYPos = this.userWindow_mc._y + (arrowHeight*this.nArrows); while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (arrowHeight*this.nArrows))) { this.textNode_array[i].userIcon_mc._alpha = newAlpha; this.textNode_array[i].userHighlight_mc._alpha = newAlpha; if (newAlpha == 0) { this.textNode_array[i].userTextField_mc.label_mc._visible=false; } else { this.textNode_array[i].userTextField_mc.label_mc._visible=true; } this.textNode_array[i].userTextField_mc._alpha = newAlpha; this.textNode_array[i].userTextField_mc.label_mc._alpha = newAlpha; this.textNode_array[i].userTextField_mc.label_mc.label_txt._alpha = newAlpha; curYPos += this.nodeHeight; i++; } } TopicListDialog.prototype.FillList = function(topicList_array,pfnCallBack) { var i = 0; for (i = 0; i < topicList_array.length; i++) { this.textNode_array[i] = CreateNewObj(pfnCallBack,i); this.textNode_array[i].SetText(topicList_array[i].displayName_str); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { this.maxNodeWidth = nodeWidth; } } this.nodeHeight = this.textNode_array[0].GetHeight(); this.SizeWindow(); this.PositionWindow(); this.UpdateDisplay(this.topIndex); } TopicListDialog.prototype.SizeWindow = function() { var totalHeight = this.nodeHeight * this.textNode_array.length +marginTop; this.userWindow_mc._width = this.maxNodeWidth+widthBuffer; if (totalHeight > this.maxHeight) { this.displayItemCount = Math.floor((this.maxHeight - (arrowHeight*2))/this.nodeHeight); totalHeight = (this.displayItemCount* this.nodeHeight)+ (arrowHeight*2) this.userWindow_mc._height = totalHeight; this.EnableArrows(); this.nArrows = 1; } else { this.displayItemCount = Math.floor(totalHeight/this.nodeHeight); this.userWindow_mc._height = totalHeight; } } TopicListDialog.prototype.PositionWindow = function() { // Set X Position var oldXPos = this.userWindow_mc._x; this.userWindow_mc._x = this.xPos; if (this.xPos+this.userWindow_mc._width > Stage.width) { this.userWindow_mc._x = Stage.width - this.userWindow_mc._width; } if (this.userWindow_mc._x < 0) { this.userWindow_mc._x = 0; } var deltaX = this.userWindow_mc._x - oldXPos; // Set Y Position var oldYPos = this.userWindow_mc._y; this.userWindow_mc._y = this.yPos; if (this.yPos+this.userWindow_mc._height>Stage.height) { this.userWindow_mc._y = Stage.height - this.userWindow_mc._height; } var deltaY = this.userWindow_mc._y - oldYPos; if (this.nArrows>0) { this.upArrow_mc._x +=deltaX; this.upArrow_mc._y +=deltaY; this.downArrow_mc._x +=deltaX; this.downArrow_mc._y +=deltaY; } } TopicListDialog.prototype.UpdateDisplay = function(nIndex) { var curYPos = this.userWindow_mc._y + (arrowHeight*this.nArrows); if (this.nArrows == 0) { curYPos +=marginTop; } var i = nIndex; if (this.lastIndex < nIndex) { this.textNode_array[this.lastIndex].MakeInvisible(); } else { this.textNode_array[this.lastIndex+(this.displayItemCount-1) ].MakeInvisible(); } while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (arrowHeight*this.nArrows))) { this.textNode_array[i].MoveTo(this.userWindow_mc._x + 5, curYPos); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { newWidth = nodeWidth - this.maxNodeWidth; this.textNode_array[i].userTextField_mc._width -= newWidth; } curYPos += this.nodeHeight; this.textNode_array[i].SetState(true); this.textNode_array[i].TransitionIn(); this.textNode_array[i].MakeVisible(); i++; } this.lastIndex = nIndex; } TopicListDialog.prototype.EnableArrows = function() { this.DrawArrows(); this.CenterArrows(); } TopicListDialog.prototype.DrawArrows = function() { // Create and draw up arrow this.upArrow_mc = createEmptyMovieClip("UpArrow",1000000); this.upArrow_mc.moveTo(3,8); this.upArrow_mc.lineStyle(2,0x555555,100); this.upArrow_mc.lineTo(8,3); this.upArrow_mc.lineTo(13,8); this.upArrow_mc.lineStyle(1,0x555555,0); this.upArrow_mc.moveTo(0,0); this.upArrow_mc.beginFill(0x000000,0); this.upArrow_mc.lineTo(0,10); this.upArrow_mc.lineTo(15,10); this.upArrow_mc.lineTo(15,0); this.upArrow_mc.lineTo(0,0); this.upArrow_mc.endFill(); this.upArrow_mc.onPress = this.UpArrowPressed; this.upArrow_mc.onRelease = this.UpArrowReleased; this.upArrow_mc.Owner = this; this.upArrow_mc._visible = false; // Create and draw down arrow this.downArrow_mc = createEmptyMovieClip("DownArrow",1000001); this.downArrow_mc.moveTo(3,3); this.downArrow_mc.lineStyle(2,0x555555,100); this.downArrow_mc.lineTo(8,8); this.downArrow_mc.lineTo(13,3); this.downArrow_mc.lineStyle(1,0x555555,0); this.downArrow_mc.moveTo(0,0); this.downArrow_mc.beginFill(0x000000,0); this.downArrow_mc.lineTo(0,10); this.downArrow_mc.lineTo(15,10); this.downArrow_mc.lineTo(15,0); this.downArrow_mc.lineTo(0,0); this.downArrow_mc.endFill(); this.downArrow_mc.moveTo(0,100); this.downArrow_mc.onPress = this.DownArrowPressed; this.downArrow_mc.onRelease = this.DownArrowReleased; this.downArrow_mc.Owner = this; } TopicListDialog.prototype.UpArrowPressed = function() { this.Owner.downArrow_mc._visible = true; this.Owner.topIndex--; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex > 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџ8џ2if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // Selected node this.nSelected = -1; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.KeyPressed = function(keyCode) { switch(keyCode) { case 13: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.pfnCallBack(0); this.nSelected = 0; } else { this.textNode_array[this.nSelected].Select(); this.pfnCallBack(this.nSelected); this.nSelected = this.nSelected; } _parent.debug_trace("Enter"); break; } case 38: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected>this.topIndex) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); } else if (this.topIndex>0) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); this.downArrow_mc._visible = true; this.topIndex--; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Up"); break; } case 40: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected"+ Stage.height); } var deltaY = this.userWindow_mc._y - oldYPos; if (this.nArrows>0) { this.upArrow_mc._x +=deltaX; this.upArrow_mc._y +=deltaY; this.downArrow_mc._x +=deltaX; this.downArrow_mc._y +=deltaY; } } TopicListDialog.prototype.UpdateDisplay = function(nIndex) { var curYPos = this.userWindow_mc._y + (arrowHeight*this.nArrows); if (this.nArrows == 0) { curYPos +=marginTop; } var i = nIndex; if (this.lastIndex < nIndex) { this.textNode_array[this.lastIndex].MakeInvisible(); } else { this.textNode_array[this.lastIndex+(this.displayItemCount-1) ].MakeInvisible(); } while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (arrowHeight*this.nArrows))) { this.textNode_array[i].MoveTo(this.userWindow_mc._x + 5, curYPos); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { newWidth = nodeWidth - this.maxNodeWidth; this.textNode_array[i].userTextField_mc._width -= newWidth; } curYPos += this.nodeHeight; this.textNode_array[i].SetState(true); this.textNode_array[i].TransitionIn(); this.textNode_array[i].MakeVisible(); i++; } this.lastItem = i - 1; this.lastIndex = nIndex; } TopicListDialog.prototype.EnableArrows = function() { this.DrawArrows(); this.CenterArrows(); } TopicListDialog.prototype.DrawArrows = function() { // Create and draw up arrow this.upArrow_mc = createEmptyMovieClip("UpArrow",1000000); this.upArrow_mc.moveTo(3,8); this.upArrow_mc.lineStyle(2,0x555555,100); this.upArrow_mc.lineTo(8,3); this.upArrow_mc.lineTo(13,8); this.upArrow_mc.lineStyle(1,0x555555,0); this.upArrow_mc.moveTo(0,0); this.upArrow_mc.beginFill(0x000000,0); this.upArrow_mc.lineTo(0,10); this.upArrow_mc.lineTo(15,10); this.upArrow_mc.lineTo(15,0); this.upArrow_mc.lineTo(0,0); this.upArrow_mc.endFill(); this.upArrow_mc.onPress = this.UpArrowPressed; this.upArrow_mc.onRelease = this.UpArrowReleased; this.upArrow_mc.Owner = this; this.upArrow_mc._visible = false; // Create and draw down arrow this.downArrow_mc = createEmptyMovieClip("DownArrow",1ps this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); this.userIcon_mc.tabEnabled = false; this.userTextField_mc.tabEnabled = false; this.userHighlight_mc.tabEnabled = false; // Create a reference to this object in tvisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; #endinitclip€€ TextNode DefinitionџџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџШ@џЫ*if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.ClickOut = function() { if (!this.Owner.userWindow_mc.hitTest(_xmouse,_ymouse,true)) { this.Owner.pfnCallBack(-1); } } TopicListDialog.prototype.DisplayTopicDialog = function(topicList_array,pfnCallBack) { this.userWindow_mc._visible = true; this.pfnCallBack = pfnCallBack; this.FillList(topicList_array,pfnCallBack); if (bFade) { this.curAlpha = 0; this.SetAlpha(this.curAlpha); this.curAlpha+=10; this.userWindow_mc.onEnterFrame = this.FadeIn; } } TopicListDialog.prototype.FadeIn = function() { var theList = this.Owner; if (theList.curAlpha>100) { this.onEnterFrame = undefined; } else { theList.SetAlpha(theList.curAlpha) theList.curAlpha+=10; } } TopicListDialog.prototype.FadeOut = function() { var theList = this.Owner; if (theList.curAlpha<0) { this.onEnterFrame = undefined; theList.Destroy(); } else { theList.SetAlpha(theList.curAlpha) theList.curAlpha-=10; } } TopicListDialog.prototype.SetAlpha = function(newAlpha) { this.userWindow_mc._alpha = newAlpha; var i = 0; var curYPos = this.userWindow_mc._y + (arrowHeight*this.nArrows); while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (arrowHeight*this.nArrows))) { this.textNode_array[i].userIcon_mc._alpha = newAlpha; this.textNode_array[i].userHighlight_mc._alpha = newAlpha; if (newAlpha == 0) { this.textNode_array[i].userTextField_mc.label_mc._visible=false; } else { this.textNode_array[i].userTextField_mc.label_mc._visible=true; } this.textNode_array[i].userTextField_mc._alpha = newAlpha; this.textNode_array[i].userTextField_mc.label_mc._alpha = newAlpha; this.textNode_array[i].userTextField_mc.label_mc.label_txt._alpha = newAlpha; curYPos += this.nodeHeight; i++; } } TopicListDialog.prototype.FillList = function(topicList_array,pfnCallBack) { var i = 0; for (i = 0; i < topicList_array.length; i++) { this.textNode_array[i] = CreateNewObj(pfnCallBack,i); this.textNode_array[i].SetText(topicList_array[i].displayName_str); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { this.maxNodeWidth = nodeWidth; } } this.nodeHeight = this.textNode_array[0].GetHeight(); this.SizeWindow(); this.PositionWindow(); this.UpdateDisplay(this.topIndex); } TopicListDialog.prototype.SizeWindow = function() { var totalHeight = this.nodeHeight * this.textNode_array.length +marginTop; this.userWindow_mc._width = this.maxNodeWidth+widthBuffer; if (totalHeight > this.maxHeight) { this.displayItemCount = Math.floor((this.maxHeight - (arrowHeight*2))/this.nodeHeight); totalHeight = (this.displayItemCount* this.nodeHeight)+ (arrowHeight*2) this.userWindow_mc._height = totalHeight; this.EnableArrows(); this.nArrows = 1; } else { this.displayItemCount = Math.floor(totalHeight/this.nodeHeight); this.userWindow_mc._height = totalHeight; } } TopicListDialog.prototype.PositionWindow = function() { // Set X Position var oldXPos = this.userWindow_mc._x; this.userWindow_mc._x = this.xPos; if (this.xPos+this.userWindow_mc._width > Stage.width) { this.userWindow_mc._x = Stage.width - this.userWindow_mc._width; } if (this.userWindow_mc._x < 0) { this.userWindow_mc._x = 0; } var deltaX = this.userWindow_mc._x - oldXPos; // Set Y Position var oldYPos = this.userWindow_mc._y; this.userWindow_mc._y = this.yPos; if (this.yPos+this.userWindow_mc._height>Stage.height) { this.userWindow_mc._y = Stage.height - this.userWindow_mc._height; } var deltaY = this.userWindow_mc._y - oldYPos; if (this.nArrows>0) { this.upArrow_mc._x +=deltaX; this.upArrow_mc._y +=deltaY; this.downArrow_mc._x +=deltaX; this.downArrow_mc._y +=deltaY; } } TopicListDialog.prototype.UpdateDisplay = function(nIndex) { var curYPos = this.userWindow_mc._y + (arrowHeight*this.nArrows); if (this.nArrows == 0) { curYPos +=marginTop; } var i = nIndex; if (this.lastIndex < nIndex) { this.textNode_array[this.lastIndex].MakeInvisible(); } else { this.textNode_array[this.lastIndex+(this.displayItemCount-1) ].MakeInvisible(); } while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (arrowHeight*this.nArrows))) { this.textNode_array[i].MoveTo(this.userWindow_mc._x + 5, curYPos); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { newWidth = nodeWidth - this.maxNodeWidth; this.textNode_array[i].userTextField_mc._width -= newWidth; } curYPos += this.nodeHeight; this.textNode_array[i].SetState(true); this.textNode_array[i].TransitionIn(); this.textNode_array[i].MakeVisible(); i++; } this.lastIndex = nIndex; } TopicListDialog.prototype.EnableArrows = function() { this.DrawArrows(); this.CenterArrows(); } TopicListDialog.prototype.DrawArrows = function() { // Create and draw up arrow this.upArrow_mc = createEmptyMovieClip("UpArrow",1000000); this.upArrow_mc.moveTo(3,8); this.upArrow_mc.lineStyle(2,0x555555,100); this.upArrow_mc.lineTo(8,3); this.upArrow_mc.lineTo(13,8); this.upArrow_mc.lineStyle(1,0x555555,0); this.upArrow_mc.moveTo(0,0); this.upArrow_mc.beginFill(0x000000,0); this.upArrow_mc.lineTo(0,10); this.upArrow_mc.lineTo(15,10); this.upArrow_mc.lineTo(15,0); this.upArrow_mc.lineTo(0,0); this.upArrow_mc.endFill(); this.upArrow_mc.onPress = this.UpArrowPressed; this.upArrow_mc.onRelease = this.UpArrowReleased; this.upArrow_mc.Owner = this; this.upArrow_mc._visible = false; // Create and draw down arrow this.downArrow_mc = createEmptyMovieClip("DownArrow",1000001); this.downArrow_mc.moveTo(3,3); this.downArrow_mc.lineStyle(2,0x555555,100); this.downArrow_mc.lineTo(8,8); this.downArrow_mc.lineTo(13,3); this.downArrow_mc.lineStyle(1,0x555555,0); this.downArrow_mc.moveTo(0,0); this.downArrow_mc.beginFill(0x000000,0); this.downArrow_mc.lineTo(0,10); this.downArrow_mc.lineTo(15,10); this.downArrow_mc.lineTo(15,0); this.downArrow_mc.lineTo(0,0); this.downArrow_mc.endFill(); this.downArrow_mc.moveTo(0,100); this.downArrow_mc.onPress = this.DownArrowPressed; this.downArrow_mc.onRelease = this.DownArrowReleased; this.downArrow_mc.Owner = this; } TopicListDialog.prototype.UpArrowPressed = function() { this.Owner.downArrow_mc._visible = true; this.Owner.topIndex--; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex > 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€he icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Symbol 29џџџџџџџџџџџџ9З*Symbol 30!џџџџЖи2Symbol 31џџџџџџџџџџџџu4+Symbol 32 џџџџщи2Symbol 4џџџџBSymbol 5џџџџџџџџџџџџ"DSymbol 6 џџџџџџџџ0 (Symbol 10 џџџџ5PSymbol 33џџџџџџџџџџџџЊа0Symbol 34%џџџџ Ћ1Symbol 35џџџџ#џџџџcSymbol 36џџџџџџџџџџџџoџџџџ €€џџџ?џџ]a€€ Layer 1џџџџO€џџ€€џџџ?џџџџCPicPageџџ CPicLayerџџ CPicFrame€€АЩъџѓZЌр0Т0T0>ћџџџ?џџS€€ Layer 2џџџџџOOџџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџ.џВ0#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; var g_textFormat = undefined; var g_hoverFormat = undefined; if (_global.textNode == undefined) { _global.textNode = new Object; _global.textNode.nCount = 0; } function SetTextFormat(newTextFormat) { g_textFormat = newTextFormat; } function SetHoverFormat(newHoverFormat) { g_hoverFormat = newHoverFormat; } function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); this.userIcon_mc.tabEnabled = false; this.userTextField_mc.tabEnabled = false; this.userHighlight_mc.tabEnabled = false; // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; // Capture the onRollover and onRollout events this.userTextField_mc.onRollOver = this.Rollover; this.userIcon_mc.onRollOver = this.Rollover; this.userTextField_mc.onRollOut = this.Rollout; this.userIcon_mc.onRollOut = this.Rollout; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Control the hover font /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.RollOver = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_hoverFormat[items]; } } theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; GenericTextNodeClass.prototype.RollOut = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items]; } } theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndSSymbol 15џџџџџџџџџџџџ И+Symbol 16џџџџЁИ+Symbol 17џџџџџџџџZ)Symbol 18џџџџџџџџџџџџH ‚ƒ…§џџџўџџџ\ž‰ш‹ŒŽ‘’“”•–—˜™š›œžŸаЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџйклмнопрстуфхцчшщъьэюя№ёђѓєѕіїјљњћќ§ўџ‚ƒ„…†‡ˆ‰ŠўџџџЩ]Ž‘’“”•–—˜™š›œЪŸ ўџџџЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖўџџџИЙКЛМНОПРСТУФХЦЧШ.фЫЬЭўџџџЯабвгдежзийклмнопрстуўџџџџџџџ^џџџџ‰ъыьэюя№ёђѓєѕћ §џџџ§џџџњџ§џџџx?wџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџƒџВ0#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; var g_textFormat = undefined; var g_hoverFormat = undefined; if (_global.textNode == undefined) { _global.textNode = new Object; _global.textNode.nCount = 0; } function SetTextFormat(newTextFormat) { g_textFormat = newTextFormat; } function SetHoverFormat(newHoverFormat) { g_hoverFormat = newHoverFormat; } function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNotop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; ‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜ўџџџЕ›ЅџџџџџџџџŸ_ЁЂЃЄ­ІЇЈЉБЋЌЏЎВАбшГДаўџџџЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯўџџџвегджзийклмнопрстуфхцчўџџџъыьэюя№ёђѓєѕіїјљњћќ§ўџџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџu7џВ0#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; var g_textFormat = undefined; var g_hoverFormat = undefined; if (_global.textNode == undefined) { _global.textNode = new Object; _global.textNode.nCount = 0; } function SetTextFormat(newTextFormat) { g_textFormat = newTextFormat; } function SetHoverFormat(newHovSymbol 25џџџџџџџџџџџџMѓ2Symbol 26џџџџЗ*Symbol 27џџџџџџџџџџџџm Symbol 28џџџџѓ2de.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); this.userIcon_mc.tabEnabled = false; this.userTextField_mc.tabEnabled = false; this.userHighlight_mc.tabEnabled = false; // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџSLџm2if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global. } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџ]џ•)#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; var g_textFormat = undefined; _global.textNode = new Object; _global.textNode.nCount = 0; function SetTextFormat(newTextFormat) { _parent.debug_trace("*******************************************************"); _parent.debug_trace(newTextFormat.font); _parent.debuInit(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc.g_trace("*******************************************************"); g_textFormat = newTextFormat; } function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; #endinitclip€€ TextNode DefinitionџџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџ-BџО)#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; var g_textFormat = undefined; if (_global.textNode == undefined) { _global.textNode = new Object; _global.textNode.nCount = 0; } function SetTextFormat(newTextFormat) { _parent.debug_trace("*******************************************************"); _parent.debug_trace(newTextFormat.font); _parent.debug_trace("*******************************************************"); g_textFormat = newTextFormat; } function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = th000001); this.downArrow_mc.moveTo(3,3); this.downArrow_mc.lineStyle(2,0x555555,100); this.downArrow_mc.lineTo(8,8); this.downArrow_mc.lineTo(13,3); this.downArrow_mc.lineStyle(1,0x555555,0); this.downArrow_mc.moveTo(0,0); this.downArrow_mc.beginFill(0x000000,0); this.downArrow_mc.lineTo(0,10); this.downArrow_mc.lineTo(15,10); this.downArrow_mc.lineTo(15,0); this.downArrow_mc.lineTo(0,0); this.downArrow_mc.endFill(); this.downArrow_mc.moveTo(0,100); this.downArrow_mc.onPress = this.DownArrowPressed; this.downArrow_mc.onRelease = this.DownArrowReleased; this.downArrow_mc.Owner = this; } TopicListDialog.prototype.UpArrowPressed = function() { this.Owner.downArrow_mc._visible = true; this.Owner.topIndex--; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex > 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIconyer 1џџџџO€џџ€€f§џ`џџџџzџџџџ€™fџџџ?џџin%r€€€џџџ?џџ6o€€€џџџ?џџoutзN€€ LabelsџџџџџOOџ€€џЩk window_mc€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџrnџО)#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; var g_textFormat = undefined; if (_global.textNode == undefined) { _global.textNode = new Object; _global.textNode.nCount = 0; } function SetTextFormat(newTextFormat) { _parent.debug_trace("*******************************************************"); _parent.debug_trace(newTextFormat.font); _parent.debug_trace("*******************************************************"); g_textFormat = newTextFormat; } function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////is.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; #endinitclip€€ TextNode DefinitionџџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџIpџ2if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // Selected node this.nSelected = -1; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.KeyPressed = function(keyCode) { switch(keyCode) { case 13: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.pfnCallBack(0); this.nSelected = 0; } else { this.textNode_array[this.nSelected].Select(); this.pfnCallBack(this.nSelected); this.nSelected = this.nSelected; } _parent.debug_trace("Enter"); break; } case 38: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected>this.topIndex) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); } else if (this.topIndex>0) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); this.downArrow_mc._visible = true; this.topIndex--; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Up"); break; } case 40: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected"+ Stage.height); } var deltaY = this.userWindow_mc._y - oldYPos; if (this.nArrows>0) { this.upArrow_mc._x +=deltaX; this.upArrow_mc._y +=deltaY; this.downArrow_mc._x +=deltaX; this.downArrow_mc._y +=deltaY; } } TopicListDialog.prototype.UpdateDisplay = function(nIndex) { var curYPos = this.userWindow_mc._y + (arrowHeight*this.nArrows); if (this.nArrows == 0) { curYPos +=marginTop; } var i = nIndex; if (this.lastIndex < nIndex) { this.textNode_array[this.lastIndex].MakeInvisible(); } else { this.textNode_array[this.lastIndex+(this.displayItemCount-1) ].MakeInvisible(); } while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (arrowHeight*this.nArrows))) { this.textNode_array[i].MoveTo(this.userWindow_mc._x + 5, curYPos); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { newWidth = nodeWidth - this.maxNodeWidth; this.textNode_array[i].userTextField_mc._width -= newWidth; } curYPos += this.nodeHeight; this.textNode_array[i].SetState(true); this.textNode_array[i].TransitionIn(); this.textNode_array[i].MakeVisible(); i++; } this.lastItem = i - 1; this.lastIndex = nIndex; } TopicListDialog.prototype.EnableArrows = function() { this.DrawArrows(); this.CenterArrows(); } TopicListDialog.prototype.DrawArrows = function() { // Create and draw up arrow this.upArrow_mc = createEmptyMovieClip("UpArrow",1000000); this.upArrow_mc.moveTo(3,8); this.upArrow_mc.lineStyle(2,0x555555,100); this.upArrow_mc.lineTo(8,3); this.upArrow_mc.lineTo(13,8); this.upArrow_mc.lineStyle(1,0x555555,0); this.upArrow_mc.moveTo(0,0); this.upArrow_mc.beginFill(0x000000,0); this.upArrow_mc.lineTo(0,10); this.upArrow_mc.lineTo(15,10); this.upArrow_mc.lineTo(15,0); this.upArrow_mc.lineTo(0,0); this.upArrow_mc.endFill(); this.upArrow_mc.onPress = this.UpArrowPressed; this.upArrow_mc.onRelease = this.UpArrowReleased; this.upArrow_mc.Owner = this; this.upArrow_mc._visible = false; // Create and draw down arrow this.downArrow_mc = createEmptyMovieClip("DownArrow",1000001); this.downArrow_mc.moveTo(3,3); this.downArrow_mc.lineStyle(2,0x555555,100); this.downArrow_mc.lineTo(8,8); this.downArrow_mc.lineTo(13,3); this.downArrow_mc.lineStyle(1,0x555555,0); this.downArrow_mc.moveTo(0,0); this.downArrow_mc.beginFill(0x000000,0); this.downArrow_mc.lineTo(0,10); this.downArrow_mc.lineTo(15,10); this.downArrow_mc.lineTo(15,0); this.downArrow_mc.lineTo(0,0); this.downArrow_mc.endFill(); this.downArrow_mc.moveTo(0,100); this.downArrow_mc.onPress = this.DownArrowPressed; this.downArrow_mc.onRelease = this.DownArrowReleased; this.downArrow_mc.Owner = this; } TopicListDialog.prototype.UpArrowPressed = function() { this.Owner.downArrow_mc._visible = true; this.Owner.topIndex--; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex > 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€_visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = _mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible ////////////////////////////////////////////// // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////erFormat) { g_hoverFormat = newHoverFormat; } function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNo////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; #endinitclip€€ TextNode DefinitionџџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџџВ0#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; var g_textFormat = undefined; var g_hoverFormat = undefined; if (_global.textNode == undefined) { _global.textNode = new Object; _global.textNode.nCount = 0; } function SetTextFormat(newTextFormat) { g_textFormat = newTextFormat; } function SetHoverFormat(newHovџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџwQџ2if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // Selected node this.nSelected = -1; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.KeyPressed = function(keyCode) { switch(keyCode) { case 13: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.pfnCallBack(0); this.nSelected = 0; } else { this.textNode_array[this.nSelected].Select(); this.pfnCallBack(this.nSelected); this.nSelected = this.nSelected; } _parent.debug_trace("Enter"); break; } case 38: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected>this.topIndex) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); } else if (this.topIndex>0) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); this.downArrow_mc._visible = true; this.topIndex--; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Up"); break; } case 40: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected"+ Stage.height); } var deltaY = this.userWindow_mc._y - oldYPos; if (this.nArrows>0) { this.upArrow_mc._x +=deltaX; this.upArrow_mc._y +=deltaY; this.downArrow_mc._x +=deltaX; this.downArrow_mc._y +=deltaY; } } TopicListDialog.prototype.UpdateDisplay = function(nIndex) { var curYPos = this.userWindow_mc._y + (arrowHeight*this.nArrows); if (this.nArrows == 0) { curYPos +=marginTop; } var i = nIndex; if (this.lastIndex < nIndex) { this.textNode_array[this.lastIndex].MakeInvisible(); } else { this.textNode_array[this.lastIndex+(this.displayItemCount-1) ].MakeInvisible(); } while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (arrowHeight*this.nArrows))) { this.textNode_array[i].MoveTo(this.userWindow_mc._x + 5, curYPos); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { newWidth = nodeWidth - this.maxNodeWidth; this.textNode_array[i].userTextField_mc._width -= newWidth; } curYPos += this.nodeHeight; this.textNode_array[i].SetState(true); this.textNode_array[i].TransitionIn(); this.textNode_array[i].MakeVisible(); i++; } this.lastItem = i - 1; this.lastIndex = nIndex; } TopicListDialog.prototype.EnableArrows = function() { this.DrawArrows(); this.CenterArrows(); } TopicListDialog.prototype.DrawArrows = function() { // Create and draw up arrow this.upArrow_mc = createEmptyMovieClip("UpArrow",1000000); this.upArrow_mc.moveTo(3,8); this.upArrow_mc.lineStyle(2,0x555555,100); this.upArrow_mc.lineTo(8,3); this.upArrow_mc.lineTo(13,8); this.upArrow_mc.lineStyle(1,0x555555,0); this.upArrow_mc.moveTo(0,0); this.upArrow_mc.beginFill(0x000000,0); this.upArrow_mc.lineTo(0,10); this.upArrow_mc.lineTo(15,10); this.upArrow_mc.lineTo(15,0); this.upArrow_mc.lineTo(0,0); this.upArrow_mc.endFill(); this.upArrow_mc.onPress = this.UpArrowPressed; this.upArrow_mc.onRelease = this.UpArrowReleased; this.upArrow_mc.Owner = this; this.upArrow_mc._visible = false; // Create and draw down arrow this.downArrow_mc = createEmptyMovieClip("DownArrow",1000001); this.downArrow_mc.moveTo(3,3); this.downArrow_mc.lineStyle(2,0x555555,100); this.downArrow_mc.lineTo(8,8); this.downArrow_mc.lineTo(13,3); this.downArrow_mc.lineStyle(1,0x555555,0); this.downArrow_mc.moveTo(0,0); this.downArrow_mc.beginFill(0x000000,0); this.downArrow_mc.lineTo(0,10); this.downArrow_mc.lineTo(15,10); this.downArrow_mc.lineTo(15,0); this.downArrow_mc.lineTo(0,0); this.downArrow_mc.endFill(); this.downArrow_mc.moveTo(0,100); this.downArrow_mc.onPress = this.DownArrowPressed; this.downArrow_mc.onRelease = this.DownArrowReleased; this.downArrow_mc.Owner = this; } TopicListDialog.prototype.UpArrowPressed = function() { this.Owner.downArrow_mc._visible = true; this.Owner.topIndex--; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex > 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_erFormat) { g_hoverFormat = newHoverFormat; } function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); this.userIcon_mc.tabEnabled = false; this.userTextField_mc.tabEnabled = false; this.userHighlight_mc.tabEnabled = false; // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; ‚ƒ„…†‡ˆ‰ŠўџџџЩ]Ž‘’“”•–—˜™š›œЪŸ ўџџџЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖўџџџИЙКЛМНОПРСТУФХЦЧШ.фЫЬЭўџџџЯабвгдежзийклмнопрстуўџџџч^Лъыьэюя№ёђѓєѕћ џџџџџџџџњџџџџџxхw‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜ўџџџЕ›Ѕ§џџџ§џџџŸ_ЁЂЃЄ­ІЇЈЉБЋЌЏЎВАбшГДаўџџџЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯўџџџвегджзийклмнопрстуфхцчўџџџъыьэюя№ёђѓєѕіїјљњћќ§ўџџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџc€€ Layer 2џџџџџOOџ€€€€ fffџџp §џџярџџџ№џџџmџџџџдтъћџџКЭѕџџLДџџџ™™PfџџџџџџџџКЭѕџfffџ S€їў§§P€€€Q€€§§ГДP€€€LMq€€_0§0§0сџџџ?џџУ €€ Layer 1џџџџO€џџ€€nџџџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicSymbol Нџ€€џџџ?џџџ€€ W"џ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџС.џВ0#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; var g_textFormat = undefined; var g_hoverFormat = undefined; if (_global.textNode == undefined) { _global.textNode = new Object; _global.textNode.nCount = 0; } function SetTextFormat(newTextFormat) { g_textFormat = newTextFormat; } function SetHoverFormat(newHoverFormat) { g_hoverFormat = newHoverFormat; } function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); this.userIcon_mc.tabEnabled = false; this.userTextField_mc.tabEnabled = false; this.userHighlight_mc.tabEnabled = false; // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = fa // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; // Capture the onRollover and onRollout events this.userTextField_mc.onRollOver = this.Rollover; this.userIcon_mc.onRollOver = this.Rollover; this.userTextField_mc.onRollOut = this.Rollout; this.userIcon_mc.onRollOut = this.Rollout; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; ///////////////////џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџI{џз/#initclip icon_mc._visible = false; textfield_mc._visible = false; highlight_mc._visible = false; var g_textFormat = undefined; var g_hoverFormat = undefined; if (_global.textNode == undefined) { _global.textNode = new Object; _global.textNode.nCount = 0; } function SetTextFormat(newTextFormat) { g_textFormat = newTextFormat; } function SetHoverFormat(newHoverFormat) { g_hoverFormat = newHoverFormat; } function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); this.userIcon_mc.tabEnabled = false; this.userTextField_mc.tabEnabled = false; this.userHighlight_mc.tabEnabled = false; // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; lse; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; // Capture the onRollover and onRollout events this.userTextField_mc.onRollOver = this.Rollover; this.userIcon_mc.onRollOver = this.Rollover; this.userTextField_mc.onRollOut = this.Rollout; this.userIcon_mc.onRollOut = this.Rollout; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = fa//////////////////////////////////////////////////////////////// // Control the hover font /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.RollOver = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Control the hover font /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.RollOver = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_hoverFormat[items]; } } theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; GenericTextNodeClass.prototype.RollOut = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; #endinitclip€€ TextNode DefinitionџџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџ&Fџы1if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // Selected node this.nSelected = -1; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.KeyPressed = function(keyCode) { switch(keyCode) { case 13: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.pfnCallBack(0); this.nSelected = 0; } else { this.textNode_array[this.nSelected].Select(); this.pfnCallBack(this.nSelected); this.nSelected = this.nSelected; } _parent.debug_trace("Enter"); break; } case 38: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected>this.topIndex) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); } else if (this.topIndex>0) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); this.downArrow_mc._visible = true; this.topIndex--; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Up"); break; } case 40: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€mat[items]; } } theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } lse; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; // Capture the onRollover and onRollout events this.userTextField_mc.onRollOver = this.Rollover; this.userIcon_mc.onRollOver = this.Rollover; this.userTextField_mc.onRollOut = this.Rollout; this.userIcon_mc.onRollOut = this else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; .Rollout; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Control the hover font /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.RollOver = function() { var textFormatObj = this.Owner.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_hoverFormat[items]; } } this.Owner.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; GenericTextNodeClass.prototype.RollOut = function() { var textFormatObj = this.Owner.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items]; } } this.Owner.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; if (this == _root) { var textObj = CreateNewObj(undefined,undefined); var bSelected = false; textObj.pfnClicked = function () { if (!bSelected) { textObj.Select(); bSelected = true; } else { textObj.Unselect(); bSelected = false; } } textObj.MoveTo(0,0); textObj.SetText("TextNode"); textObj.MakeVisible(); textObj.TransitionIn(); } #endinitclip€€ TextNode DefinitionџџџџO€џџ€€ { textFormatObj[items] = g_hoverFormat[items]; } } theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; GenericTextNodeClass.prototype.RollOut = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textForџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџжMџы1if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // Selected node this.nSelected = -1; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.KeyPressed = function(keyCode) { switch(keyCode) { case 13: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.pfnCallBack(0); this.nSelected = 0; } else { this.textNode_array[this.nSelected].Select(); this.pfnCallBack(this.nSelected); this.nSelected = this.nSelected; } _parent.debug_trace("Enter"); break; } case 38: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected>this.topIndex) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); } else if (this.topIndex>0) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); this.downArrow_mc._visible = true; this.topIndex--; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Up"); break; } case 40: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€mat[items]; } } theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc ==///////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; if (this == _root) { var textObj = CreateNewObj(undefined,undefined); var bSelected = false; textObj.pfnClicked = function () { if (!bSelected) { textObj.Select(); bSelected = true; } else { textObj.Unselect(); bSelected = false; } } textObj.MoveTo(0,0); textObj.SetText("TextNode"); textObj.MakeVisible(); textObj.TransitionIn(); } #endinitclip€€ TextNode DefinitionџџџџO€џџ€€€33џШя€333џ0€3f3џPPH€3™3џPx`€3Ь3џPx€3џ3џPџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџšIџы1if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // Selected node this.nSelected = -1; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.KeyPressed = function(keyCode) { switch(keyCode) { case 13: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.pfnCallBack(0); this.nSelected = 0; } else { this.textNode_array[this.nSelected].Select(); this.pfnCallBack(this.nSelected); this.nSelected = this.nSelected; } _parent.debug_trace("Enter"); break; } case 38: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected>this.topIndex) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); } else if (this.topIndex>0) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); this.downArrow_mc._visible = true; this.topIndex--; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Up"); break; } case 40: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; if (this == _root) { var textObj = CreateNewObj(undefined,undefined); var bSelected = false; textObj.pfnClicked = function () { if (!bSelected) { textObj.Select(); bSelected = true; } else { textObj.Unselect(); bSelected = false; } } textObj.MoveTo(0,0); textObj.SetText("TextNode"); textObj.MakeVisible(); textObj.TransitionIn(); } #endinitclip€€ TextNode DefinitionџџџџO€џџ€€; if (theList.curAlpha>100) { this.onEnterFrame = undefined; } else { theList.SetAlpha(theList.curAlpha) theList.curAlpha+=10; } } TopicListDialog.prototype.FadeOut = function() { var theList = this.Owner; if (theList.curAlpha<0) { this.onEnterFrame = undefined; theList.Destroy(); } else { theList.SetAlpha(theList.curAlpha) theList.curAlpha-=10; } } TopicListDialog.prototype.SetAlpha = function(newAlpha) { this.userWindow_mc._alpha = newAlpha; var i = 0; var curYPos = this.userWindow_mc._y + (arrowHeight*this.nArrows); while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (arrowHeight*this.nArrows))) { this.textNode_array[i].userIcon_mc._alpha = newAlpha; this.textNode_array[i].userHighlight_mc._alpha = newAlpha; this.textNode_array[i].userTextField_mc._alpha = newAlpha; curYPos += this.nodeHeight; i++; } } TopicListDialog.prototype.FillList = function(topicList_array,pfnCallBack) { var i textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textno= 0; for (i = 0; i < topicList_array.length; i++) { this.textNode_array[i] = CreateNewObj(this.OnClick,i); this.textNode_array[i].Owner = this; this.textNode_array[i].SetText(topicList_array[i].displayName_str); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { this.maxNodeWidth = nodeWidth; } } this.nodeHeight = this.textNode_array[0].GetHeight(); this.SizeWindow(); this.PositionWindow(); this.UpdateDisplay(this.topIndex); } TopicListDialog.prototype.OnClick = function(nIndex) { this.Owner.textNode_array[nIndex].Select(); this.Owner.pfnCallBack(nIndex); } TopicListDialog.prototype.SizeWindow = function() { var totalHeight = this.nodeHeight * this.textNode_array.length +marginTop; this.userWindow_mc._width = this.maxNodeWidth+widthBuffer; if (totalHeight > this.maxHeight) { this.displayItemCount = Math.floor((this.maxHeight - (arrowHeight*2))/this.nodeHeight); totalHeight = (this.displayItemCount* this.nodeHeight)+ (arrowHeight*2) this.userWindow_mc._height = totalHeight+1; this.EnableArrows(); this.nArrows = 1; } else { this.displayItemCount = Math.floor(totalHeight/this.nodeHeight); this.userWindow_mc._height = totalHeight+1; } } TopicListDialog.prototype.PositionWindow = function() { // Set X Position var oldXPos = this.userWindow_mc._x; this.userWindow_mc._x = this.xPos; if (this.xPos+this.userWindow_mc._width > Stage.width) { this.userWindow_mc._x = Stage.width - this.userWindow_mc._width; } if (this.userWindow_mc._x < 0) { this.userWindow_mc._x = 0; } var deltaX = this.userWindow_mc._x - oldXPos; // Set Y Position var oldYPos = this.userWindow_mc._y; this.userWindow_mc._y = this.yPos; if (this.userWindow_mc._y + this.userWindow_mc._height > Stage.height - _parent.indexYPosition) { this.userWindow_mc._y = Stage.height - this.userWindow_mc._height - _parent.indexYPosition; } var deltaY = this.userWindow_mc._y - oldYPos; if (this.nArrows>0) { this.upArrow_mc._x +=deltaX; this.upArrow_mc._y +=deltaY; this.downArrow_mc._x +=deltaX; this.downArrow_mc._y +=deltaY; } } TopicListDialog.prototype.UpdateDisplay = function(nIndex) { var curYPos = this.userWindow_mc._y + (arrowHeight*this.nArrows); if (this.nArrows == 0) { curYPos +=marginTop; } var i = nIndex; if (this.lastIndex < nIndex) { this.textNode_array[this.lastIndex].MakeInvisible(); } else { this.textNode_array[this.lastIndex+(this.displayItemCount-1) ].MakeInvisible(); } while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (arrowHeight*this.nArrows))) { this.textNode_array[i].MoveTo(this.userWindow_mc._x + 5, curYPos); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { newWidth = nodeWidth - this.maxNodeWidth; this.textNode_array[i].userTextField_mc._width -= newWidth; } curYPos += this.nodeHeight; this.textNode_array[i].SetState(true); this.textNode_array[i].TransitionIn(); this.textNode_array[i].MakeVisible(); i++; } this.lastItem = i - 1; this.lastIndex = nIndex; } TopicListDialog.prototype.EnableArrows = function() { this.DrawArrows(); this.CenterArrows(); } TopicListDialog.prototype.DrawArrows = function() { // Create and draw up arrow this.upArrow_mc = createEmptyMovieClip("UpArrow",1000000); this.upArrow_mc.moveTo(3,8); this.upArrow_mc.lineStyle(2,0x555555,100); this.upArrow_mc.lineTo(8,3); this.upArrow_mc.lineTo(13,8); this.upArrow_mc.lineStyle(1,0x555555,0); this.upArrow_mc.moveTo(0,0); this.upArrow_mc.beginFill(0x000000,0); this.upArrow_mc.lineTo(0,10); this.upArrow_mc.lineTo(15,10); this.upArrow_mc.lineTo(15,0); this.upArrow_mc.lineTo(0,0); this.upArrow_mc.endFill(); this.upArrow_mc.onPress = this.UpArrowPressed; this.upArrow_mc.onRelease = this.UpArrowReleased; this.upArrow_mc.Owner = this; this.upArrow_mc._visible = false; // Create and draw down arrow this.downArrow_mc = createEmptyMovieClip("DownArrow",1000001); this.downArrow_mc.moveTo(3,3); this.downArrow_mc.lineStyle(2,0x555555,100); this.downArrow_mc.lineTo(8,8); this.downArrow_mc.lineTo(13,3); this.downArrow_mc.lineStyle(1,0x555555,0); this.downArrow_mc.moveTo(0,0); this.downArrow_mc.beginFill(0x000000,0); this.downArrow_mc.lineTo(0,10); this.downArrow_mc.lineTo(15,10); this.downArrow_mc.lineTo(15,0); this.downArrow_mc.lineTo(0,0); this.downArrow_mc.endFill(); this.downArrow_mc.moveTo(0,100); this.downArrow_mc.onPress = this.DownArrowPressed; this.downArrow_mc.onRelease = this.DownArrowReleased; this.downArrow_mc.Owner = this; } TopicListDialog.prototype.UpArrowPressed = function() { this.Owner.downArrow_mc._visible = true; this.Owner.topIndex--; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex > 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = faўџџџ  L  ўџџџ# !"ўџџџ$&m'()*+,-./012345ўџџџ8§џџџ9:;<=>?@ABCDEFGHIJKўџџџMNOPQRўџџџTUVWXYZ[\]^_`abcdefghijklўџџџnopqrstuvwxyz{|}~€lse; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; // Capture the onRollover and onRollout events this.userTextField_mc.onRollOver = this.Rollover; this.userIcon_mc.onRollOver = this.Rollover; this.userTextField_mc.onRollOut = this.Rollout; this.userIcon_mc.onRollOut = this.Rollout; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Control the hover font /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.RollOver = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_hoverFormat[items]; } } theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; GenericTextNodeClass.prototype.RollOut = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items]; } } theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; if (this == _root) { var textObj = CreateNewObj(undefined,undefined); var bSelected = false; textObj.pfnClicked = function () { if (!bSelected) { textObj.Select(); bSelected = true; } else { textObj.Unselect(); bSelected = false; } } textObj.MoveTo(0,0); textObj.SetText("TextNode"); textObj.MakeVisible(); textObj.TransitionIn(); } #endinitclip€€ TextNode DefinitionџџџџO€џџ€€џџџџ€џf§џ`џџџџzџџџџ€™fџЊџЬџџџџџџ undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; if (this == _root) { var textObj = CreateNewObj(undefined,undefined); var bSelected = false; textObj.pfnClicked = function () { if (!bSelected) { textObj.Select(); bSelected = true; } else { textObj.Unselect(); bSelected = false; } } textObj.MoveTo(0,0); textObj.SetText("TextNode"); textObj.MakeVisible(); textObj.TransitionIn(); } #endinitclip€€ TextNode DefinitionџџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџџы1if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // Selected node this.nSelected = -1; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.KeyPressed = function(keyCode) { switch(keyCode) { case 13: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.pfnCallBack(0); this.nSelected = 0; } else { this.textNode_array[this.nSelected].Select(); this.pfnCallBack(this.nSelected); this.nSelected = this.nSelected; } _parent.debug_trace("Enter"); break; } case 38: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected>this.topIndex) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); } else if (this.topIndex>0) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); this.downArrow_mc._visible = true; this.topIndex--; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Up"); break; } case 40: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€des this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // Selected node this.nSelected = -1; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.KeyPressed = function(keyCode) { switch(keyCode) { case 13: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.pfnCallBack(0); this.nSelected = 0; } else { this.textNode_array[this.nSelected].Select(); this.pfnCallBack(this.nSelected); this.nSelected = this.nSelected; } _parent.debug_trace("Enter"); break; } case 38: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected>this.topIndex) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); } else if (this.topIndex>0) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); this.downArrow_mc._visible = true; this.topIndex--; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Up"); break; } case 40: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidt%6g     ўџџџ !"#$%&'()*+,-J/012345ўџџџ7vˆ:;<=>?@ABCDEFGHIyKLўџџџNOPQRSTUVWXYZ[\]^_`abcdefўџџџhijklmnopqrstu™ 6Šz{|}ўџџџš€h; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€Symbol 41џџџџџџџџџџџџZ3Symbol 42'-џџџџ Z3Symbol 43џџџџ+џџџџљЋ1Symbol 44џџџџџџџџџџџџ#Z3ll€€ Layer 1џџџџO€џџ€€ameџџ CPicSprџџCPicPageџџ CPicLayerџџ CPicFrameџџCPicText€€ #-“R№ Arial BlackI\zџ"(?€€џџџ?џџ‚C€€ Layer 1џџџџO€џџ€€meџџ CPicSymџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShapeџџ CPicSpriteкЎ ХЯ кЎџџџџ#P}€€ХЯ жЊџџ CPicSymbolqБџџџ ХЯ qБџџџџџџџ$€€џџџ?џџ/€€ Layer 3џџџџOџOџ€€dџсџџCPicPageџџ CPicLayerџџ CPicFrame€€zЭЬѓЎVц000Њ0аъџџџ?џџ™Q€€ Layer 1џџџџO€џџ€€dџ this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; // Capture the onRollover and onRollout events this.userTextField_mc.onRollOver = this.Rollover; this.userIcon_mc.onRollOver = this.Rollover; this.userTextField_mc.onRollOut = this.Rollout; this.userIcon_mc.onRollOut = this.Rollout; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Control the hover font /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.RollOver = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_hoverFormat[items]; } } theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; GenericTextNodeClass.prototype.RollOut = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items]; } } theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.userIcon_mc._height) >(this.userTextField_mc._y+this.userTextField_mc._height)) { nHeight = (this.userIcon_mc._y+this.userIcon_mc._height) - YPos; } else { nHeight = (this.userTextField_mc._y+this.userTextField_mc._height) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.userTextField_mc._height; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; if (this == _root) { var textObj = CreateNewObj(undefineџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџŽMџm2if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // Selected node this.nSelected = -1; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.KeyPressed = function(keyCode) { switch(keyCode) { case 13: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.pfnCallBack(0); this.nSelected = 0; } else { this.textNode_array[this.nSelected].Select(); this.pfnCallBack(this.nSelected); this.nSelected = this.nSelected; } _parent.debug_trace("Enter"); break; } case 38: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected>this.topIndex) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); } else if (this.topIndex>0) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); this.downArrow_mc._visible = true; this.topIndex--; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Up"); break; } case 40: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€Symbol 41џџџџџџџџџџџџZ3Symbol 42'-џџџџ Z3Symbol 43џџџџ+џџџџљЋ1Symbol 44џџџџџџџџџџџџ#Z3Symbol 37"џџџџџџџџи2Symbol 38$)џџџџщЋ1Symbol 39џџџџџџџџџџџџSи2Symbol 40&(џџџџ~Ћ1џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџ§=џˆ3#initclip var g_textFormat = undefined; var g_hoverFormat = undefined; if (_global.textNode == undefined) { _global.textNode = new Object; _global.textNode.nCount = 0; } function SetTextFormat(newTextFormat) { g_textFormat = newTextFormat; } function SetHoverFormat(newHoverFormat) { g_hoverFormat = newHoverFormat; } function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { this._parent.highlight_mc._visible = false; this._parent.textfield_mc._visible = false; this._parent.icon_mc._visible = false; // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); this.userIcon_mc.tabEnabled = false; this.userTextField_mc.tabEnabled = false; this.userHighlight_mc.tabEnabled = false; // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // Save initial height this.iconHeight = this.userIcon_mc._height; this.textFieldHeight = this.userTextField_mc._height; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; // Capture the onRollover and onRollout events this.userTextField_mc.onRollOver = this.Rollover; this.userIcon_mc.onRollOver = this.Rollover; this.userTextField_mc.onRollOut = this.Rollout; this.userIcon_mc.onRollOut = this.Rollout; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } // This is a hack for Lindows, Lindows will not display a // textfield unless the text field is bold if (textFormatObj.getTextExtent(newText_str).width == 0) textFormatObj.bold = true; this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Control the hover font /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.RollOver = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_hoverFormat[items]; } } // This is a hack for Lindows, Lindows will not display a // textfield unless the text field is bold if (textFormatObj.getTextExtent(newText_str).width == 0) textFormatObj.bold = true; theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; GenericTextNodeClass.prototype.RollOut = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items]; } } // This is a hack for Lindows, Lindows will not display a // textfield unless the text field is bold if (textFormatObj.getTextExtent(newText_str).width == 0) textFormatObj.bold = true; theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// Generd,undefined); var bSelected = false; textObj.pfnClicked = function () { if (!bSelected) { textObj.Select(); bSelected = true; } else { textObj.Unselect(); bSelected = false; } } textObj.MoveTo(0,0); textObj.SetText("TextNode"); textObj.MakeVisible(); textObj.TransitionIn(); } #endinitclip€€ TextNode DefinitionџџџџO€џџ€€icTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.iconHeight) >(this.userTextField_mc._y+this.textFieldHeight)) { nHeight = (this.userIcon_mc._y+this.iconHeight) - YPos; } else { nHeight = (this.userTextField_mc._y+this.textFieldHeight) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.textFieldHeight; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; if (this == _root && nItemCount == undefined) { var textObj = CreateNewObj(undefined,undefined); var bSelected = false; textObj.pfnClicked = function () { if (!bSelected) { textObj.Select(); bSelected = true; } else { textObj.Unselect(); bSelected = false; } } textObj.MoveTo(0,0); textObj.SetText("TextNode"); textObj.MakeVisible(); textObj.TransitionIn(); } #endinitclip €€ TextNode DefinitionџџџџO€џџ€€ted].Select(); this.upArrow_mc._visible = true; this.topIndex++; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Down"); break; } case 37: { this.pfnCallBack(-1); break; } } } TopicListDialog.prototype.ClickOut = function() { if (!this.Owner.userWindow_mc.hitTest(_root._xmouse,_root._ymouse,true)) { _parent.debug_trace("ClickOut =џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџ­^џt #initclip #include "cmds_skin.as" var gAbsHeight = Stage.height; var gAbsWidth = Stage.width; var gTopicList_array = undefined; var gTopicDialog = undefined; var gnTopicHeight = undefined; var keyTopicListener = undefined; var gRtFont = undefined; var gRtFontHighlight = undefined; function DialogClosed() { var strTemp = "javascript:closeRtCtrl()"; getURL(strTemp); } function ListClicked(nIndex) { gTopicDialog.Close(DialogClosed); delete gTopicDialog ; gTopicDialog = undefined; var strTemp = "javascript:RtClicked('"+gTopicList_array[nIndex].url_str+"')"; getURL(strTemp); } function Init() { gRtFont = GetTextFormatFromString(_parent.gsFont); gRtFontHighlight = GetTextFormatFromString(_parent.gsFontHighlight); SetTextFormat(gRtFont); SetHoverFormat(gRtFontHighlight); gnTopicHeight = _parent.nTopicHeight; Stage.scaleMode = "noScale"; GetMenuItems(); bFade = fhgeneric_comp.Fade; gTopicDialog = new TopicListDialog(0,0,0,true); gTopicDialog.DisplayTopicDialog(gTopicList_array,ListClicked); // Create a key listener keyTopicListener = new Object(); keyTopicListener.onKeyDown = OnTopicKeyDown; Key.addListener(keyTopicListener); // Set the size of the DIV or LAYER that contains the movie if (_parent.gnNoResize!=1) { SetSize(); } else { var strTemp = "javascript:RtLoaded()"; getURL(strTemp); } } function OnTopicKeyDown() { var keyPressed = Key.getCode(); gTopicDialog.KeyPressed(keyPressed); } function GetMenuItems() { var nCount = 0; gTopicList_array = new Array(); for (var i = 2; i < _parent.nItemCount; i+=2) { gTopicList_array[nCount] = new Object(); gTopicList_array[nCount].displayName_str = eval("_parent.arrVal"+i); gTopicList_array[nCount].url_str = eval("_parent.arrVal"+(i+1)); nCount++; } } function SetSize() { var menuWidth = 100; var strTemp = "javascript:sizeRtCtrl(\""+gTopicDialog.userWindow_mc._width+"\",\""+gTopicDialog.userWindow_mc._height+"\")"; Stage.height = menuHeight; Stage.width = menuWidth; getURL(strTemp); } function GetTextFormatFromString(font_str) { var text_fmt = new Object(); // create a new object instead of a TextFormat object because flash won't pass a textFormat object over LC if (font_str != undefined) { var font_array = font_str.split(" "); for (value in font_array) { var iColon = font_array[value].indexOf(":", 0); var field_str = font_array[value].substr(0, iColon); var value_str = font_array[value].substr(iColon + 1, font_array[value].length); switch (field_str) { case "font-family": text_fmt.font = value_str; break; case "font-size": text_fmt.size = parseInt(value_str); break; case "font-weight": text_fmt.bold = (value_str.toLowerCase() == "bold") ? true : false; break; case "font-style": text_fmt.italic = (value_str.toLowerCase() == "italic") ? true : false; break; case "font-color": text_fmt.color = SkinStringToRGB(value_str); break; case "text-decoration": text_fmt.underline = (value_str.toLowerCase() == "underline") ? true : false; break; } } } return text_fmt; } function CheckStageSize() { if (Stage.height > 0 && !gbOpened) { this.onEnterFrame = undefined; if (_parent.gsSkinSwf !=undefined && _parent.gsSkinSwf.length > 0) { gAbsHeight = Stage.height; gAbsWidth = Stage.width; Init(); } } } function debug_alert(msg) { getURL("javascript:alert('"+msg+"')"); } this.onEnterFrame = CheckStageSize; #endinitclip€€ Related TopicsџџџџџOOџ€€€€џџџ?џџKgџY5if (this.Fade) { _parent.bFade = true; } #initclip function TopicListDialog(xPos,yPos,yOffset, bHtml) { this.bRelatedTopics = bHtml; this._parent.window_mc._visible = false; this._parent.highlight_mc._visible = false; this._parent.textfield_mc._visible = false; this._parent.icon_mc._visible = false; this._parent.inputbg_mc._visible = false; this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc._visible = false; this.userWindow_mc.Owner = this; this.arrowHeight = 15; this.widthBuffer = 10; this.marginTop = 5; if (bHtml == undefined) { bHtml = false; } _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; if (this.bRelatedTopics) { this.maxHeight = gnTopicHeight; } // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // Selected node this.nSelected = -1; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.KeyPressed = function(keyCode) { switch(keyCode) { case 13: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.pfnCallBack(0); this.nSelected = 0; } else { this.textNode_array[this.nSelected].Select(); this.pfnCallBack(this.nSelected); this.nSelected = this.nSelected; } _parent.debug_trace("Enter"); break; } case 38: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected>this.topIndex) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); } else if (this.topIndex>0) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); this.downArrow_mc._visible = true; this.topIndex--; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Up"); break; } case 40: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; // Capture the onRollover and onRollout events this.userTextField_mc.onRollOver = this.Rollover; this.userIcon_mc.onRollOver = this.Rollover; this.userTextField_mc.onRollOut = this.Rollout; this.userIcon_mc.onRollOut = this.Rollout; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } // This is a hack for Lindows, Lindows will not display a // textfield unless the text field is bold if (textFormatObj.getTextExtent(newText_str).width == 0) textFormatObj.bold = true; this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Control the hover font /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.RollOver = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_hoverFormat[items]; } } // This is a hack for Lindows, Lindows will not display a // textfield unless the text field is bold if (textFormatObj.getTextExtent(newText_str).width == 0) textFormatObj.bold = true; theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; GenericTextNodeClass.prototype.RollOut = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items]; } } // This is a hack for Lindows, Lindows will not display a // textfield unless the text field is bold if (textFormatObj.getTextExtent(newText_str).width == 0) textFormatObj.bold = true; theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.iconHeight) >(this.userTextField_mc._y+this.textFieldHeight)) { nHeight = (this.userIcon_mc._y+this.iconHeight) - YPos; } else { nHeight = (this.userTextField_mc._y+this.textFieldHeight) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.textFieldHeight; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original valxtNode_array[nIndex].Select(); this.Owner.pfnCallBack(nIndex); } TopicListDialog.prototype.SizeWindow = function() { var totalHeight = this.nodeHeight * this.textNode_array.length +this.marginTop; this.userWindow_mc._width = this.maxNodeWidth+this.widthBuffer; if (totalHeight > this.maxHeight) { this.displayItemCount = Math.floor((this.maxHeight - (this.arrowHeight*2))/this.nodeHeight); totalHeight = (this.displayItemCount* this.nodeHeight)+ (this.arrowHeight*2) this.userWindow_mc._height = totalHeight+1; if (!this.bRelatedTopics) { this.EnableArrows(); } this.nArrows = 1; } else { this.displayItemCount = Math.floor(totalHeight/this.nodeHeight); this.userWindow_mc._height = totalHeight+1; } } TopicListDialog.prototype.PositionWindow = function() { if (!this.bRelatedTopics) { // Set X Position var oldXPos = this.userWindow_mc._x; this.userWindow_mc._x = this.xPos; if (this.xPos+this.userWindow_mc._width > Stage.width) { this.userWindow_mc._x = Stage.width - this.userWindow_mc._width; } if (this.userWindow_mc._x < 0) { this.userWindow_mc._x = 0; } var deltaX = this.userWindow_mc._x - oldXPos; // Set Y Position var oldYPos = this.userWindow_mc._y; this.userWindow_mc._y = this.yPos; if (this.userWindow_mc._y + this.userWindow_mc._height > Stage.height - _parent.indexYPosition) { this.userWindow_mc._y = Stage.height - this.userWindow_mc._height - _parent.indexYPosition; } var deltaY = this.userWindow_mc._y - oldYPos; if (this.nArrows>0) { this.upArrow_mc._x +=deltaX; this.upArrow_mc._y +=deltaY; this.downArrow_mc._x +=deltaX; this.downArrow_mc._y +=deltaY; } } else { // Center the related topic control in the middle of the stage this.userWindow_mc._y = (gAbsHeight-this.userWindow_mc._height)/2; this.userWindow_mc._x = (gAbsWidth-this.userWindow_mc._width)/2; if (this.nArrows==1) { this.EnableArrows(); } } } TopicListDialog.prototype.UpdateDisplay = function(nIndex) { var curYPos = this.userWindow_mc._y + (this.arrowHeight*this.nArrows); if (this.nArrows == 0) { curYPos +=this.marginTop; } var i = nIndex; if (this.lastIndex < nIndex) { this.textNode_array[this.lastIndex].MakeInvisible(); } else { this.textNode_array[this.lastIndex+(this.displayItemCount-1) ].MakeInvisible(); } while (i < this.textNode_array.length && (curYPos + this.nodeHeight) <= (this.userWindow_mc._y + this.userWindow_mc._height - (this.arrowHeight*this.nArrows))) { this.textNode_array[i].MoveTo(this.userWindow_mc._x + 5, curYPos); var nodeWidth = this.textNode_array[i].GetWidth(); if (nodeWidth > this.maxNodeWidth) { newWidth = nodeWidth - this.maxNodeWidth; this.textNode_array[i].userTextField_mc._width -= newWidth; } curYPos += this.nodeHeight; this.textNode_array[i].SetState(true); this.textNode_array[i].TransitionIn(); this.textNode_array[i].MakeVisible(); i++; } this.lastItem = i - 1; this.lastIndex = nIndex; } TopicListDialog.prototype.EnableArrows = function() { this.DrawArrows(); this.CenterArrows(); } TopicListDialog.prototype.DrawArrows = function() { // Create and draw up arrow this.upArrow_mc = createEmptyMovieClip("UpArrow",1000000); this.upArrow_mc.moveTo(3,8); this.upArrow_mc.lineStyle(2,0x555555,100); this.upArrow_mc.lineTo(8,3); this.upArrow_mc.lineTo(13,8); this.upArrow_mc.lineStyle(1,0x555555,0); this.upArrow_mc.moveTo(0,0); this.upArrow_mc.beginFill(0x000000,0); this.upArrow_mc.lineTo(0,10); this.upArrow_mc.lineTo(15,10); this.upArrow_mc.lineTo(15,0); this.upArrow_mc.lineTo(0,0); this.upArrow_mc.endFill(); this.upArrow_mc.onPress = this.UpArrowPressed; this.upArrow_mc.onRelease = this.UpArrowReleased; this.upArrow_mc.Owner = this; this.upArrow_mc._visible = false; // Create and draw down arrow this.downArrow_mc = createEmptyMovieClip("DownArrow",1000001); this.downArrow_mc.moveTo(3,3); this.downArrow_mc.lineStyle(2,0x555555,100); this.downArrow_mc.lineTo(8,8); this.downArrow_mc.lineTo(13,3); this.downArrow_mc.lineStyle(1,0x555555,0); this.downArrow_mc.moveTo(0,0); this.downArrow_mc.beginFill(0x000000,0); this.downArrow_mc.lineTo(0,10); this.downArrow_mc.lineTo(15,10); this.downArrow_mc.lineTo(15,0); this.downArrow_mc.lineTo(0,0); this.downArrow_mc.endFill(); this.downArrow_mc.moveTo(0,100); this.downArrow_mc.onPress = this.DownArrowPressed; this.downArrow_mc.onRelease = this.DownArrowReleased; this.downArrow_mc.Owner = this; } TopicListDialog.prototype.UpArrowPressed = function() { this.Owner.downArrow_mc._visible = true; this.Owner.topIndex--; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex > 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } Object.registerClass("TopicList_Obj", TopicListDialog); #endinitclip €€ Layer 1џџџџO€џџ€€џџџџ€Symbol 2 TextField0–­>A..\wf_indexui.fla TextField­8Б>0–­>AЬMЭ>џџџџ€Symbol 3LabelI–­>C..\wf_indexui.flaLabel­8Б>I–­>CЬMЭ>€€€€џџџ?џџ†€€ Layer 3џџџџOџOџ€€€€ LџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicSpriteˆ> ˆ>dџ\w window_mc€€џџџ?џџto€€ window_mcџџџџџOџџ€€€   dџ inputbg_mc€€џџџ?џџw џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџџѓhј˜ъ0§0h0јџџџ?џџn€€ Layer 1џџџџO€џџ€€€€ inputbg_mcџџџџOџџџ€€€)Ќ )ЌdџЇo highlight_mc€€џџџ?џџH €€ highlight_mcџџџџџOOџ€€€1Ц 1Цdџф textfield_mc€€џџџ?џџн"€€ textfield_mcџџџџ€€€џ€€€њё –бžЉњёdџnicon_mc€€џџџ?џџ{-€€ icon_mcџџџџO€џџ€€€РўџџP РўџџPџџџџ0МAfhtextnode_compLabel defaultValueњПg LЄI СЁ–ъяџ€НўџџU НўџџUџџџџ/ђrfhgeneric_compFadetrueK0љ’‹˜FІЉќ@brh€€џџџ?џџgџx /* function ListClicked(nIndex) { trace("Item = "+nIndex); } var topicDialog = new TopicListDialog(); var topicList_array = new Array(); topicList_array[0] = new Object(); topicList_array[0].displayName_str = "Gerry"; topicList_array[1] = new Object(); topicList_array[1].displayName_str = "Terry"; topicDialog.DisplayTopicDialog(topicList_array,ListClicked); */ €€ Layer 1џџџџO€џџ€€ )џџ CDocumentPagePage 1Scene 1C8Б>џџџџGъ2?џџџџ€ Symbol 27 HighlightGRьЕТ>‘ Symbol 27џџџџЖТ>џџџџ€ Symbol 12Graphic w#З>я Symbol 12џџџџ{#З>џџџџ€ Symbol 11BG PЗ>h Symbol 11џџџџ$?џџџџ€Symbol 8InputBackground8ЖВ>Symbol 8џџџџ>?џџџџ€Symbol 1windowœ“­>;..\wf_indexui.flawindowœ“­>œ“­>;J?џџџџ€Symbol 2 TextField0–­>A..\wf_indexui.fla TextField­8Б>0–­>AЬMЭ>џџџџ€Symbol 3LabelI–­>C..\wf_indexui.flaLabel­8Б>I–­>CЬMЭ>џџџџ€Symbol 4IconW”­>=..\wf_indexui.flaIconW”­>W”­>=™#З>џџџџ€Symbol 5 HighlightЧ–­>E..\wf_indexui.fla Highlightк–­>Ч–­>E9tЮ>џџџџ€ Symbol 18 IconIndex§KЗ>y.\skin_button_tb_index.fla IconIndexJЈИ>§KЗ>yT?џџџџ€ Symbol 35page2#}Ђ> AP:\Design Team\Personal Folders\AJ\FlashHelp\Rev4Wildfire\toc.flaAJ/page2~O“>}Ђ> ~O“>џџџџ€ Symbol 36 QuestionMark$Ъ{r>vAP:\Design Team\Personal Folders\AJ\FlashHelp\Rev4Wildfire\toc.flaAJ/QuestionMarkЙN—>Ъ{r>vT?џџџџ€ Symbol 47Generic FH Index Component/NИ>' TopicList_ObjFlashHelp_Components.swf+C:\FlashComponents\FlashHelp_Components.flaGeneric FH Index ComponentОт.?NИ>'От.?FadetrueK0љ’‹˜FІЉќ@brhџџџџ€ Symbol 48Generic FH Textnode Component0дNИ>7FGenericFHTextNodeFlashHelp_Components.swf+C:\FlashComponents\FlashHelp_Components.flaGeneric FH Textnode ComponentG:,?џџџџG:,?Label defaultValueњПg LЄI СЁ–ъяџџџџџ1pphhhhhџџџџРРРџ Дues var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; if (this == _root) { var textObj = CreateNewObj(undefined,undefined); var bSelected = false; textObj.pfnClicked = function () { if (!bSelected) { textObj.Select(); bSelected = true; } else { textObj.Unselect(); bSelected = false; } } textObj.MoveTo(0,0); textObj.SetText("TextNode"); textObj.MakeVisible(); textObj.TransitionIn(); } #endinitclip€€ TextNode DefinitionџџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџqџm2if (this.Fade) { _parent.bFade = true; } #initclip arrowHeight = 15; widthBuffer = 10; marginTop = 5; window_mc._visible = false; highlight_mc._visible = false; textfield_mc._visible = false; icon_mc._visible = false; inputbg_mc._visible = false; function TopicListDialog(xPos,yPos,yOffset) { this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc.Owner = this; _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // Selected node this.nSelected = -1; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.KeyPressed = function(keyCode) { switch(keyCode) { case 13: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.pfnCallBack(0); this.nSelected = 0; } else { this.textNode_array[this.nSelected].Select(); this.pfnCallBack(this.nSelected); this.nSelected = this.nSelected; } _parent.debug_trace("Enter"); break; } case 38: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected>this.topIndex) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); } else if (this.topIndex>0) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); this.downArrow_mc._visible = true; this.topIndex--; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Up"); break; } case 40: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } #endinitclip€€ Layer 1џџџџO€џџ€€Symbol 37"џџџџџџџџи2Symbol 38!)џџџџщЋ1Symbol 39џџџџџџџџџџџџSи2Symbol 40&(џџџџ~Ћ1Symbol 33џџџџџџџџџџџџЊа0Symbol 34$џџџџ Ћ1Symbol 35џџџџ#џџџџcSymbol 36џџџџџџџџџџџџoSymbol 29џџџџџџџџџџџџ9З*Symbol 30%џџџџЖи2Symbol 31џџџџџџџџџџџџu4+Symbol 32 џџџџщи2Symbol 49џџџџџџџџџџџџAњDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџEaџќ #initclip #include "cmds_skin.as" var gAbsHeight = Stage.height; var gAbsWidth = Stage.width; var gTopicList_array = undefined; var gTopicDialog = undefined; var gnTopicHeight = undefined; var keyTopicListener = undefined; var gRtFont = undefined; var gRtFontHighlight = undefined; function DialogClosed() { var strTemp = "javascript:closeRtCtrl()"; getURL(strTemp); } function ListClicked(nIndex) { gTopicDialog.Close(DialogClosed); delete gTopicDialog ; gTopicDialog = undefined; if (nIndex != -1) { var strTemp = "javascript:RtClicked('"+gTopicList_array[nIndex].url_str+"')"; getURL(strTemp); } else { DialogClosed(); } } function Init() { gRtFont = GetTextFormatFromString(_parent.gsFont); gRtFontHighlight = GetTextFormatFromString(_parent.gsFontHighlight); SetTextFormat(gRtFont); SetHoverFormat(gRtFontHighlight); gnTopicHeight = _parent.nTopicHeight; Stage.scaleMode = "noScale"; GetMenuItems(); bFade = fhgeneric_comp.Fade; gTopicDialog = new TopicListDialog(0,0,0,true); gTopicDialog.DisplayTopicDialog(gTopicList_array,ListClicked); // Create a key listener keyTopicListener = new Object(); keyTopicListener.onKeyDown = OnTopicKeyDown; Key.addListener(keyTopicListener); // Set the topic control in the correct location this._x = 0; this._y = 0; // Set the size of the DIV or LAYER that contains the movie if (_parent.gnNoResize!=1) { SetSize(); } else { var strTemp = "javascript:RtLoaded()"; getURL(strTemp); } } function OnTopicKeyDown() { var keyPressed = Key.getCode(); gTopicDialog.KeyPressed(keyPressed); } function GetMenuItems() { var nCount = 0; gTopicList_array = new Array(); for (var i = 2; i < _parent.nItemCount; i+=2) { gTopicList_array[nCount] = new Object(); gTopicList_array[nCount].displayName_str = eval("_parent.arrVal"+i); gTopicList_array[nCount].url_str = eval("_parent.arrVal"+(i+1)); nCount++; } } function SetSize() { var menuWidth = 100; var strTemp = "javascript:sizeRtCtrl(\""+gTopicDialog.userWindow_mc._width+"\",\""+gTopicDialog.userWindow_mc._height+"\")"; Stage.height = menuHeight; Stage.width = menuWidth; getURL(strTemp); } function GetTextFormatFromString(font_str) { var text_fmt = new Object(); // create a new object instead of a TextFormat object because flash won't pass a textFormat object over LC if (font_str != undefined) { var font_array = font_str.split(" "); for (value in font_array) { var iColon = font_array[value].indexOf(":", 0); var field_str = font_array[value].substr(0, iColon); var value_str = font_array[value].substr(iColon + 1, font_array[value].length); switch (field_str) { case "font-family": text_fmt.font = value_str; break; case "font-size": text_fmt.size = parseInt(value_str); break; case "font-weight": text_fmt.bold = (value_str.toLowerCase() == "bold") ? true : false; break; case "font-style": text_fmt.italic = (value_str.toLowerCase() == "italic") ? true : false; break; case "font-color": text_fmt.color = SkinStringToRGB(value_str); break; case "text-decoration": text_fmt.underline = (value_str.toLowerCase() == "underline") ? true : false; break; } } } return text_fmt; } function CheckStageSize() { if (Stage.height > 0 && !gbOpened) { this.onEnterFrame = undefined; if (_parent.gsSkinSwf !=undefined && _parent.gsSkinSwf.length > 0) { gAbsHeight = Stage.height; gAbsWidth = Stage.width; Init(); } } } function debug_alert(msg) { getURL("javascript:alert('"+msg+"')"); } this.onEnterFrame = CheckStageSize; #endinitclip€€ Related TopicsџџџџџOOџ€€€€џџџ?џџoџY5if (this.Fade) { _parent.bFade = true; } #initclip function TopicListDialog(xPos,yPos,yOffset, bHtml) { this.bRelatedTopics = bHtml; this._parent.window_mc._visible = false; this._parent.highlight_mc._visible = false; this._parent.textfield_mc._visible = false; this._parent.icon_mc._visible = false; this._parent.inputbg_mc._visible = false; this.userWindow_mc = window_mc.duplicateMovieClip("theWindow"+_global.textNode.nCount,_global.textNode.nCount); this.userWindow_mc._visible = false; this.userWindow_mc.Owner = this; this.arrowHeight = 15; this.widthBuffer = 10; this.marginTop = 5; if (bHtml == undefined) { bHtml = false; } _global.textNode.nCount++; this.xPos = xPos; this.yPos = yPos; // Arrows this.upArrow_mc = undefined; this.downArrow_mc = undefined; // Are the arrows Enabled this.nArrows = 0; // The Arrow Interval for scrolling this.arrowInterval = undefined; // Set the maximum width and height this.maxWidth = Stage.width; this.maxHeight = Stage.height - yOffset; this.yOffset = yOffset; if (this.bRelatedTopics) { this.maxHeight = gnTopicHeight; } // stores an array of internal textnodes this.textNode_array = new Array; // stores the textnode height this.nodeHeight = 0; // store the maximum textnode width this.maxNodeWidth = 0; // store the number of displayable items this.displayItemCount = 0; // the currently displayed top index this.topIndex = 0; this.lastIndex = 0; // Current Alpha value this.curAlpha = 0; // Save the callback function once defined this.pfnCallback = undefined; // Selected node this.nSelected = -1; // create mouse listener this.mouseListener = new Object; this.mouseListener.onMouseDown = this.ClickOut; this.mouseListener.Owner = this; Mouse.addListener(this.mouseListener); } TopicListDialog.prototype.KeyPressed = function(keyCode) { switch(keyCode) { case 13: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.pfnCallBack(0); this.nSelected = 0; } else { this.textNode_array[this.nSelected].Select(); this.pfnCallBack(this.nSelected); this.nSelected = this.nSelected; } _parent.debug_trace("Enter"); break; } case 38: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected>this.topIndex) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); } else if (this.topIndex>0) { this.textNode_array[this.nSelected].Unselect(); this.nSelected--; this.textNode_array[this.nSelected].Select(); this.downArrow_mc._visible = true; this.topIndex--; this.UpdateDisplay(this.topIndex); } _parent.debug_trace("Up"); break; } case 40: { if (this.nSelected == -1) { this.textNode_array[0].Select(); this.nSelected = 0; } else if (this.nSelected 0) { this.Owner.arrowInterval = setInterval(this.Owner.UpArrowDown,300,this.Owner); } else { this.Owner.upArrow_mc._visible = false; } } TopicListDialog.prototype.UpArrowDown = function(theList) { theList.topIndex--; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.UpArrowDown,75,theList); if (theList.topIndex == 0) { theList.upArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.UpArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.DownArrowPressed = function() { this.Owner.upArrow_mc._visible = true; this.Owner.topIndex++; this.Owner.UpdateDisplay(this.Owner.topIndex); if (this.Owner.topIndex < this.Owner.textNode_array.length-this.Owner.displayItemCount) { this.Owner.arrowInterval = setInterval(this.Owner.DownArrowDown,300,this.Owner); } else { this._visible=false; } } TopicListDialog.prototype.DownArrowDown = function(theList) { theList.topIndex++; theList.UpdateDisplay(theList.topIndex); clearInterval(theList.arrowInterval); theList.arrowInterval = setInterval(theList.DownArrowDown,75,theList); if (theList.topIndex == theList.textNode_array.length-theList.displayItemCount) { theList.downArrow_mc._visible = false; clearInterval(theList.arrowInterval); } } TopicListDialog.prototype.DownArrowReleased = function() { clearInterval(this.Owner.arrowInterval); } TopicListDialog.prototype.CenterArrows = function() { // Position Up Arrow this.upArrow_mc._y = this.userWindow_mc._y; this.upArrow_mc._x = this.userWindow_mc._x + (this.userWindow_mc._width - this.upArrow_mc._width)/2; // Position Down Arrow this.downArrow_mc._y = (this.userWindow_mc._y + this.userWindow_mc._height) - this.downArrow_mc._height-2; this.downArrow_mc._x = this.upArrow_mc._x; } TopicListDialog.prototype.Close = function() { if (bFade) { this.curAlpha = 90; this.userWindow_mc.onEnterFrame = this.FadeOut; } else { this.Destroy(); } } TopicListDialog.prototype.Destroy = function() { var i = 0; for (i = 0; i < this.textNode_array.length; i++) { this.textNode_array[i].DestroyNode(); delete this.textNode_array[i]; } delete this.textNode_array; this.upArrow_mc.removeMovieClip(); delete this.upArrow_mc; this.downArrow_mc.removeMovieClip(); delete this.downArrow_mc; this.userWindow_mc.removeMovieClip(); this.userWindow_mc.Owner = undefined; delete this.userWindow_mc; Mouse.removeListener(this.mouseListener); delete this.xPos; delete this.yPos; delete this.nArrows; delete this.arrowInterval; delete this.maxWidth; delete this.maxHeight; delete this.yOffset; delete this.nodeHeight; delete this.maxNodeWidth; delete this.displayItemCount; delete this.topIndex; delete this.lastIndex; delete this.curAlpha; _parent.bTopicDialogOpen = false; } Object.registerClass("TopicList_Obj", TopicListDialog); #endinitclip €€ Layer 1џџџџO€џџ€€‚ƒ„…†‡ˆўџџџŠ‹ŒŽўџџџ‘’“”•–—˜™š›œžўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџЉџˆ3#initclip var g_textFormat = undefined; var g_hoverFormat = undefined; if (_global.textNode == undefined) { _global.textNode = new Object; _global.textNode.nCount = 0; } function SetTextFormat(newTextFormat) { g_textFormat = newTextFormat; } function SetHoverFormat(newHoverFormat) { g_hoverFormat = newHoverFormat; } function CreateNewObj(pfnClicked,dataClicked) { var Obj = new GenericTextNodeClass(true,pfnClicked,dataClicked); return Obj; } function GenericTextNodeClass(bCreate,pfnClicked,dataClicked) { this._parent.highlight_mc._visible = false; this._parent.textfield_mc._visible = false; this._parent.icon_mc._visible = false; // this code is to make sure that a new object is not created when we register the class if (!bCreate || bCreate == undefined) { return; } // Duplicate the movie clips this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+_global.textNode.nCount,_global.textNode.nCount); this.userTextField_mc = textfield_mc.duplicateMovieClip("text"+_global.textNode.nCount,_global.textNode.nCount+1); this.userHighlight_mc = highlight_mc.duplicateMovieClip("highlight"+_global.textNode.nCount,_global.textNode.nCount+2); this.userIcon_mc.tabEnabled = false; this.userTextField_mc.tabEnabled = false; this.userHighlight_mc.tabEnabled = false; // Create a reference to this object in the icon and the textfield this.userIcon_mc.Owner = this; this.userTextField_mc.Owner = this; // set the data to be returned when the object is clicked to undefined this.pfnClicked = pfnClicked; this.dataClicked = dataClicked; // Can the item be clicked this.bItemIn = false; // Set selected to false this.bSelected = false; // Set visible to false this.bIsTextVisible = false; this.bIsIconVisible = false; // Save initial height this.iconHeight = this.userIcon_mc._height; this.textFieldHeight = this.userTextField_mc._height; // increment the object count _global.textNode.nCount+=3; // Initialize object this.Init(); } GenericTextNodeClass.prototype = new MovieClip(); /////////////////////////////////////////////////////////////////////////////////// // Initialize the object /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Init = function() { if (this.userHighlight_mc.getDepth() > this.userTextField_mc.getDepth()) { this.userHighlight_mc.swapDepths(this.userTextField_mc); } // Make the movie clips initially invisible this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; // Position the highlight over the textfield this.userHighlight_mc._x = this.userTextField_mc._x; this.userHighlight_mc._y = this.userTextField_mc._y; // Capture the onClick event this.userTextField_mc.onPress = this.Clicked; this.userIcon_mc.onPress = this.Clicked; // Capture the onRollover and onRollout events this.userTextField_mc.onRollOver = this.Rollover; this.userIcon_mc.onRollOver = this.Rollover; this.userTextField_mc.onRollOut = this.Rollout; this.userIcon_mc.onRollOut = this.Rollout; }; /////////////////////////////////////////////////////////////////////////////////// // Set the text of the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetText = function(newText_str) { this.userTextField_mc.label_mc.label_txt.autoSize = true; this.userTextField_mc.label_mc.label_txt.text = newText_str; textFormatObj = this.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items] } } // This is a hack for Lindows, Lindows will not display a // textfield unless the text field is bold if (textFormatObj.getTextExtent(newText_str).width == 0) textFormatObj.bold = true; this.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); this.userHighlight_mc.gotoAndStop("out"); this.userHighlight_mc._width = this.userTextField_mc.label_mc.label_txt._width; this.userHighlight_mc._height = this.userTextField_mc.label_mc.label_txt._height; this.userHighlight_mc._visible = false; this.userTextField_mc.label_mc.label_txt.autoSize = false; }; /////////////////////////////////////////////////////////////////////////////////// // Control the hover font /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.RollOver = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_hoverFormat[items]; } } // This is a hack for Lindows, Lindows will not display a // textfield unless the text field is bold if (textFormatObj.getTextExtent(newText_str).width == 0) textFormatObj.bold = true; theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; GenericTextNodeClass.prototype.RollOut = function(overContext) { if (overContext != undefined) { theNode = overContext.Owner; } else { theNode = this.Owner; } var textFormatObj = theNode.userTextField_mc.label_mc.label_txt.getTextFormat(); for (items in g_textFormat) { if (eval("g_textFormat."+items) != undefined) { textFormatObj[items] = g_textFormat[items]; } } // This is a hack for Lindows, Lindows will not display a // textfield unless the text field is bold if (textFormatObj.getTextExtent(newText_str).width == 0) textFormatObj.bold = true; theNode.userTextField_mc.label_mc.label_txt.setTextFormat(textFormatObj); }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node onto the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.SetState = function(bState) { this.bItemIn = bState; }; GenericTextNodeClass.prototype.TransitionIn = function() { if (this.bItemIn) { this.InNoTransition(); } else { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; this.userTextField_mc.gotoAndPlay("In"); this.userIcon_mc.gotoAndPlay("In"); } }; /////////////////////////////////////////////////////////////////////////////////// // Transition the text node off of the screen /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.TransitionOut = function() { this.bItemIn = false; if (this.bSelected) { this.userHighlight_mc.gotoAndPlay("out"); this.bSelected = false; } this.userTextField_mc.gotoAndPlay("out"); this.userIcon_mc.gotoAndPlay("out"); this.userTextField_mc.onEnterFrame = this.HideOnOut; this.userICon_mc.onEnterFrame = this.HideOnOut; }; GenericTextNodeClass.prototype.InNoTransition = function() { this.bItemIn = true; this.bIsTextVisible = true; this.bIsIconVisible = true; if (this.bSelected) { this.userTextField_mc.gotoAndPlay("selected"); } else { this.userTextField_mc.gotoAndStop("visible"); } this.userIcon_mc.gotoAndStop("visible"); }; /////////////////////////////////////////////////////////////////////////////////// // Checks the current frame and hides the text if it is the end of the transition out /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.HideOnOut = function() { if (this._currentframe == this._totalframes) { if (this == this.Owner.userTextField_mc) { this.Owner.bIsTextVisible = false; } else { this.Owner.bIsIconVisible = false; } this.onEnterFrame = null; this._visible = false; } }; /////////////////////////////////////////////////////////////////////////////////// // Highlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Select = function() { this.bSelected = true; this.userTextField_mc.gotoAndPlay("selected"); this.userIcon_mc.gotoAndPlay("selected"); this.userHighlight_mc._visible = true; this.userHighlight_mc.gotoAndPlay("in"); }; /////////////////////////////////////////////////////////////////////////////////// // unhighlight the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Unselect = function() { this.bSelected = false; this.userTextField_mc.gotoAndPlay("unselected"); this.userIcon_mc.gotoAndPlay("unselected"); this.userHighlight_mc.gotoAndPlay("out"); }; /////////////////////////////////////////////////////////////////////////////////// // handles the case when the text node is clicked. /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.Clicked = function() { if (this.Owner.bItemIn) { this.Owner.pfnClicked(this.Owner.dataClicked); } }; /////////////////////////////////////////////////////////////////////////////////// // Get the node width /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetWidth = function() { var XPos; var nWidth; if (this.userIcon_mc._x < this.userTextField_mc._x) { XPos = this.userIcon_mc._x; } else { XPos = this.userTextField_mc._x; } if ((this.userIcon_mc._x+this.userIcon_mc._width) >(this.userTextField_mc._x+this.userTextField_mc._width)) { nWidth = (this.userIcon_mc._x+this.userIcon_mc._width) - XPos; } else { nWidth = (this.userTextField_mc._x+this.userTextField_mc._width) - XPos; } if (this.userIcon_mc == undefined) { nWidth = this.userTextField_mc._width; } return nWidth; }; /////////////////////////////////////////////////////////////////////////////////// // Get the node height /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.GetHeight = function() { var YPos; var nHeight; if (this.userIcon_mc._y < this.userTextField_mc._y) { YPos = this.userIcon_mc._y; } else { YPos = this.userTextField_mc._y; } if ((this.userIcon_mc._y+this.iconHeight) >(this.userTextField_mc._y+this.textFieldHeight)) { nHeight = (this.userIcon_mc._y+this.iconHeight) - YPos; } else { nHeight = (this.userTextField_mc._y+this.textFieldHeight) - YPos; } if (this.userIcon_mc == undefined) { nHeight = this.textFieldHeight; } return nHeight; }; /////////////////////////////////////////////////////////////////////////////////// // Make invisible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeInvisible = function() { this.userIcon_mc._visible = false; this.userTextField_mc._visible = false; this.userHighlight_mc._visible = false; } /////////////////////////////////////////////////////////////////////////////////// // Make visible /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MakeVisible = function() { this.userIcon_mc._visible = true; this.userTextField_mc._visible = true; if (this.bSelected) { this.userHighlight_mc._visible = true; } } /////////////////////////////////////////////////////////////////////////////////// // Position the text node /////////////////////////////////////////////////////////////////////////////////// GenericTextNodeClass.prototype.MoveTo = function(x,y) { // Save Original values var iconX = this.userIcon_mc._x; var iconY = this.userIcon_mc._y; var textX = this.userTextField_mc._x; var textY = this.userTextField_mc._y; // Calculate offsets var offX = textX - iconX; var offY = textY - iconY; if (this.userIcon_mc == undefined) { offX = 0; offY = 0; } // Move Objects this.userIcon_mc._x = x; this.userTextField_mc._x = x + offX; this.userHighlight_mc._x = x + offX; this.userIcon_mc._y = y; this.userTextField_mc._y = y + offY; this.userHighlight_mc._y = y + offY; }; GenericTextNodeClass.prototype.DestroyNode = function() { // delete all the variables delete this.userIcon_mc.Owner; delete this.userTextField_mc.Owner; delete this.bSelected; delete this.bIsTextVisible; delete this.bIsIconVisible; // unload the movies this.userIcon_mc.removeMovieClip(); delete this.userIcon_mc; this.userTextField_mc.removeMovieClip(); delete this.userTextField_mc; this.userHighlight_mc.removeMovieClip(); delete this.userHighlight_mc; } // Register the class Object.registerClass("FGenericFHTextNode", GenericTextNodeClass); var bLoaded = true; if (this == _root && nItemCount == undefined) { var textObj = CreateNewObj(undefined,undefined); var bSelected = false; textObj.pfnClicked = function () { if (!bSelected) { textObj.Select(); bSelected = true; } else { textObj.Unselect(); bSelected = false; } } textObj.MoveTo(0,0); textObj.SetText("TextNode"); textObj.MakeVisible(); textObj.TransitionIn(); } #endinitclip €€ TextNode DefinitionџџџџO€џџ€€€€€€џџџ?џџ†€€ Layer 3џџџџOџOџ€€€€ LџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicSpriteˆ> ˆ>dџ{- window_mc€€џџџ?џџa>€€ window_mcџџџџџOџџ€€€   dџŒX inputbg_mc€€џџџ?џџ==џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџџѓhј˜ъ0§0h0јџџџ?џџn€€ Layer 1џџџџO€џџ€€€€ inputbg_mcџџџџOџџџ€€€)Ќ )ЌdџМA highlight_mc€€џџџ?џџg€€ highlight_mcџџџџџOOџ€€€1Ц 1Цdџv textfield_mc€€џџџ?џџ€€ textfield_mcџџџџ€€€џ€€€њё –бžЉњёdџ’"icon_mc€€џџџ?џџхW€€ icon_mcџџџџO€џџ€€€РўџџP РўџџPџџџџ0§=fhtextnode_compLabel defaultValueњПg LЄI СЁ–ъяџ€НўџџU НўџџUџџџџ1Ikfhgeneric_compFadetrueK0љ’‹˜FІЉќ@brh€€џџџ?џџЎџx /* function ListClicked(nIndex) { trace("Item = "+nIndex); } var topicDialog = new TopicListDialog(); var topicList_array = new Array(); topicList_array[0] = new Object(); topicList_array[0].displayName_str = "Gerry"; topicList_array[1] = new Object(); topicList_array[1].displayName_str = "Terry"; topicDialog.DisplayTopicDialog(topicList_array,ListClicked); */ €€ Layer 1џџџџO€џџ€€ )џџ CDocumentPagePage 1Scene 1C8Б>џџџџШT?џџџџ€ Symbol 27 HighlightGRьЕТ>‘ Symbol 27џџџџЖТ>џџџџ€ Symbol 12Graphic w#З>я Symbol 12џџџџ{#З>џџџџ€ Symbol 11BG PЗ>h Symbol 11џџџџ$?џџџџ€Symbol 8InputBackground8ЖВ>Symbol 8џџџџ>?џџџџ€Symbol 1windowœ“­>;..\wf_indexui.flawindowœ“­>œ“­>;J?џџџџ€Symbol 2 TextField0–­>A..\wf_indexui.fla TextField­8Б>0–­>AЬMЭ>џџџџ€Symbol 3LabelI–­>C..\wf_indexui.flaLabel­8Б>I–­>CЬMЭ>џџџџ€Symbol 4IconW”­>=..\wf_indexui.flaIconW”­>W”­>=™#З>џџџџ€Symbol 5 HighlightЧ–­>E..\wf_indexui.fla Highlightк–­>Ч–­>E9tЮ>џџџџ€ Symbol 18 IconIndex§KЗ>y.\skin_button_tb_index.fla IconIndexJЈИ>§KЗ>yT?џџџџ€ Symbol 35page2#}Ђ> AP:\Design Team\Personal Folders\AJ\FlashHelp\Rev4Wildfire\toc.flaAJ/page2~O“>}Ђ> ~O“>џџџџ€ Symbol 36 QuestionMark$Ъ{r>vAP:\Design Team\Personal Folders\AJ\FlashHelp\Rev4Wildfire\toc.flaAJ/QuestionMarkЙN—>Ъ{r>vT?џџџџ€ Symbol 48Generic FH Textnode Component0дNИ>7FGenericFHTextNodeflashhelp_components.swf+C:\FlashComponents\FlashHelp_Components.flaGeneric FH Textnode ComponentG:,?џџџџШT?Label defaultValueњПg LЄI СЁ–ъяџџџџџ€ Symbol 49Generic FH Index Component1NИ>' TopicList_Objflashhelp_components.swf+C:\FlashComponents\FlashHelp_Components.flaGeneric FH Index Component“rN?џџџџ“rN?FadetrueK0љ’‹˜FІЉќ@brhџџџџ2pphhhhhџџџџРРРџ Дџџџџќџџ CColorDefџ€џ€џ€3џPя€fџPя0€™џPяH€ЬџPя`€џџPяx€3џя€33џ(я€3fџ<я0€3™џCяH€3ЬџFя`€3џџHяx€fџя0€f3џя0€ffџ(я0€f™џ5яH€fЬџ<я`€fџџ@яx€џ€333џ0€џ€3џ я€33џxя€f3џdя0€™3џ]яH€Ь3џZя`€џ3џXяx€33џШя€333џ0€3f3џPPH€3™3џPx`€3Ь3џPx€3џ3џPя€f3џмя0€f33џPH€ff3џ(PH€f™3џ<x`€fЬ3џCx€fџ3џFя€џ€fffџ`€џ€fџ я0€3fџŒя0€ffџxя0€™fџkяH€Ьfџdя`€џfџ`яx€3fџДя0€33fџ PH€3ffџxPH€3™fџdx`€3Ьfџ]x€3џfџZя€ffџШя0€f3fџШPH€fffџ`€f™fџP0x€fЬfџPx€fџfџPяЈ€џ€™™™џ€џ€™џ яH€3™џ“яH€f™џ…яH€™™џxяH€Ь™џnя`€џ™џhяx€3™џ­яH€33™џ x`€3f™џŒx`€3™™џxx`€3Ь™џkx€3џ™џdя€f™џЛяH€f3™џДx`€ff™џ 0x€f™™џx0x€fЬ™џdx€fџ™џ]яЈ€џ€ЬЬЬџР€џ€Ьџ я`€3Ьџ–я`€fЬџŒя`€™Ьџ‚я`€ЬЬџxя`€џЬџpяx€3ЬџЊя`€33Ьџ x€3fЬџ“x€3™Ьџ…x€3ЬЬџxx€3џЬџnя€fЬџДя`€f3Ьџ­x€ffЬџ x€f™ЬџŒx€fЬЬџxx€fџЬџkяЈ€џ€џџџџ№€џ€џџ яx€3џџ˜яx€fџџяx€™џџˆяx€Ьџџ€яx€џџџxяx€3џџЈяx€33џџ я€3fџџ–я€3™џџŒя€3Ьџџ‚я€3џџџxя€fџџАяx€f3џџЊя€ffџџ яЈ€f™џџ“яЈ€fЬџџ…яЈ€fџџџxяЈ€џ€џџяx€џ€™џяH€™3џ яH€™fџяH€™™џ(яH€™Ьџ2я`€™џџ8яx€Ьџя`€Ь3џ я`€Ьfџя`€Ь™џя`€ЬЬџ(я`€Ьџџ0яx€џџяx€џ3џяx€џfџяx€џ™џяx€џЬџ яx€џџџ(яx€џ€џџPяx€џ€™3џуяH€™33џx`€™f3џx`€™™3џ(x`€™Ь3џ5x€™џ3џ<я€Ь3џця`€Ь33џx€Ьf3џ x€Ь™3џx€ЬЬ3џ(x€Ьџ3џ2я€џ3џшяx€џ33џя€џf3џ я€џ™3џя€џЬ3џя€џџ3џ(я€џ€џџ яx€џ€™fџеяH€™3fџмx`€™ffџ0x€™™fџ(0x€™Ьfџ<x€™џfџCяЈ€Ьfџмя`€Ь3fџуx€Ьffџx€Ь™fџx€ЬЬfџ(x€Ьџfџ5яЈ€џfџряx€џ3fџця€џffџяЈ€џ™fџ яЈ€џЬfџяЈ€џџfџ(яЈ€џ€џџџ(яx€џ€™™џШяH€™3™џШx`€™f™џШ0x€™™™џ€™Ь™џPPЈ€™џ™џPяР€Ь™џвя`€Ь3™џеx€Ьf™џмx€Ь™™џPЈ€ЬЬ™џ(PЈ€Ьџ™џ<яР€џ™џияx€џ3™џмя€џf™џуяЈ€џ™™џяР€џЬ™џяР€џџ™џ(яР€џ€џџџxяx€џ€™ЬџОя`€™3ЬџЛx€™fЬџДx€™™Ьџ PЈ€™ЬЬџxPЈ€™џЬџdяР€ЬЬџШя`€Ь3ЬџШx€ЬfЬџШx€Ь™ЬџШPЈ€ЬЬЬџР€ЬџЬџPяи€џЬџаяx€џ3Ьџвя€џfЬџеяЈ€џ™ЬџмяР€џЬЬџяи€џџЬџ(яи€џ€џџџШяx€џ€™џџИяx€™3џџДя€™fџџ­яЈ€™™џџ яР€™ЬџџŒяР€™џџџxяР€ЬџџРяx€Ь3џџОя€ЬfџџЛяЈ€Ь™џџДяР€ЬЬџџ яи€Ьџџџxяи€џџџШяx€џ3џџШя€џfџџШяЈ€џ™џџШяР€џЬџџШяи€џџџџ№€џ€џџџџџџџ€џџџџџџџ€џџџџџ€џџџџџ€џџџџџ€џf§џ`џџџџzџџџџ€™fџЊџЬџџџџџџ€џџџ*џџџ]џџџџџЊџџдџџџџџџ^k€џџh