i want to add a movie clip at a certain time and then add more movieclips of the same class, but later on i want to be able to remove any of those movieclips here is my code sofar:
for (var i:int = 0; i < elementclicked.length; i++)
{
if (event.target.name == elementclicked[i])
{
if (elementused[i] == false)
{
elementused[i] = true
var rod:rodMain = new rodMain
rodnum[i].push(rod)
addChild(rod)

}else{
elementused[i] = false
removeChild(rodnum[i])
}

}
and i get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at test/continentClicked()
i am sure this is a stupid question but i am still new to this stuff. Thanks upfront!