Advertisement
Advertisement
| 07.24.2008 at 11:05AM PDT, ID: 23593117 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: |
gCenter = 7;
lineArray = new Array();
function loadJCK_Keyword(fileToLoad, searchKeyword, mColumnSearch, mColumnGet, replaceXXX, fontColor, fontAlign, append) {
var my_lv:LoadVars = new LoadVars();
my_lv.onData = function(src:String) {
// "src" in the next line was created by the previous
createLineArray(src);
//lineArray is determined from the "createLineArray" function at the end
// separate data into lines
for (x = 0; x <= lineArray.length; x++) {
// assign each line number to "thisLine"
thisLine = lineArray[x];
// check for linebreaks, tabs and enter
while (thisLine.charCodeAt(0) == 13 || thisLine.charCodeAt(0) == 10 || thisLine.charCodeAt(0) == 9) {
thisLine = thisLine.substr(1);
}
//
thisLineSearch = thisLine;
// look for correct column in text via a tab character
// this also may have solved a problem when there where multiple linebreaks next to each other?
for (p = 1; p < mColumnSearch; p++) {
thisLineSearch = thisLineSearch.substring(thisLineSearch.indexOf(chr(9)) + 1, thisLineSearch.length);
}
//if there is no tab
if (thisLineSearch.indexOf(chr(9)) == -1) {
thisKeyword = thisLineSearch;
// there is a tab
} else {
thisKeyword = thisLineSearch.substring(0, thisLineSearch.indexOf(chr(9)));
}
// found keyword
if (thisKeyword == searchKeyword) {
k = 1;
do {
// determine where the linebreak is
locateBreak = thisLine.indexOf(chr(9));
// populate with data
thisColumnData = thisLine.substring(0, locateBreak);
// go to the next line
thisLine = thisLine.substr(locateBreak + 1);
k++;
// continue until out of data
} while (k <= mColumnGet);
break;
}
}
// this next section is used to replace the [B} with a bullet
// the "|" is a delimiter for a line break
replaceArray = new Array();
if (replaceXXX != "") {
if (thisColumnData.indexOf("[XXX]") > -1) {
replaceArray.push(replaceXXX.substring(0, replaceXXX.indexOf("|")));
replaceArray.push(replaceXXX.substr(replaceXXX.indexOf("|") + 1));
for (x = 0; x < 2; x++) {
whereIsIt = thisColumnData.indexOf("[XXX]");
thisColumnData = thisColumnData.substring(0, thisColumnData.indexOf("[XXX]")) + replaceArray[x] + thisColumnData.substr(thisColumnData.indexOf("[XXX]") + 5);
}
} else {
thisColumnData = replaceXXX + thisColumnData;
}
}
// this portion is used to determine if the data should stand on its own or whether it is added to whatever is already there
loadedText = "";
if (append == true) {
loadedText = dynamicTextJCK.text;
dynamicTextJCK.text = loadedText + "\n" + thisColumnData;
} else {
dynamicTextJCK.text = thisColumnData;
}
// format the text
var format:TextFormat = new TextFormat();
format.align = fontAlign;
format.color = fontColor;
dynamicTextJCK.setTextFormat(format);
};
// loads the external file
my_lv.load(fileToLoad, my_lv, "GET");
}
// This is for the Euro only
function loadString(mData, fontColor, fontAlign, append) {
// default is left
if (fontAlign == null) {
fontAlign = "left";
}
// this portion is used to determine if the data should stand on its own or whether it is added to whatever is already there
// note: the different name for the text field vs. the Asian function above
if (append == true) {
dynamicText.text = dynamicText.text + "\n" + mData;
} else {
dynamicText.text = mData;
}
// format the text
dynamicText.autoSize = fontAlign;
var format:TextFormat = new TextFormat();
format.align = fontAlign;
format.color = fontColor;
dynamicText.setTextFormat(format);
}
// mData is just the parameter
// this function determines the number of lines
function createLineArray(mData) {
lineCounter = 0;
while (mData.indexOf("[EOL]") >= 0) {
lineArray.push(mData.substring(0, mData.indexOf("[EOL]") - 1));
mData = mData.substr(mData.indexOf("[EOL]") + 5);
lineCounter++;
}
// now that it has counted the number of lines, it returns that value to the "loadJCK_Keyword" function above
lineArray.shift();
}
|