से हटाने मैं एक सरणी 'बिल्ली', 'कुत्ता', 'फिर से बजी'AS3 सरणी सूचकांक
है और सूचकांक द्वारा आइटम निकालना चाहते हैं।
फिलहाल मैं
function removeit(myindex) {
animals[myindex] = animals.pop()
}
से हटाने मैं एक सरणी 'बिल्ली', 'कुत्ता', 'फिर से बजी'AS3 सरणी सूचकांक
है और सूचकांक द्वारा आइटम निकालना चाहते हैं।
फिलहाल मैं
function removeit(myindex) {
animals[myindex] = animals.pop()
}
आप ब्याह
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Array.html#splice%28%29
Array.splice (प्रारंभिक बिंदु, गिनती निकालने के लिए) चाहते हैं;
var newArray:Array = myArray.splice(2, 1); //this removes whatever is at index 2 and returns it in a new array.
बदलें
function removeit(myindex) {
animals.splice(myindex, 1);
}
करने के लिए अपने समारोह फ़्लैश प्लेयर 19+ या आकाशवाणी का उपयोग करते समय 19+, तो आप उपयोग कर सकते हैं
myArray.removeAt(myIndex); // removes the element at the specified index, modifying the array without making a copy
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Array.html#removeAt()
क्या आपका मतलब है 'जानवरों [myindex ] = शून्य '? आप अंतिम परिणाम क्या चाहते हैं? –
अगर मैं 'बिल्ली' में गुजरता हूं, तो मैं इसे चाहता हूं, 'कुत्ता', बड्डी '। मैं उस आइटम को हटा देता हूं जो मैं फ़ंक्शन – LeBlaireau
पर गुजर रहा हूं, यदि आप सही के रूप में उत्तरों को चिह्नित करते हैं तो लोग भविष्य में आपकी सहायता करने के इच्छुक होंगे :) – francis