주 클래스의 함수를 실행하려고하지만 캐스팅을해도 작동하지 않습니다.AS 3.0의 참조 상위 클래스 함수
private function updateplaylist(){
//xml to string
var xmls:String= xml.toXMLString();
trace('playlist updated debug point');
MovieClip(this.parent).test();}
내가 무슨 일을하고있는 중이 야 :이 메인 클래스 코드
package{
import flash.display.MovieClip;
import rpflash.communication.RPXMLReader;
public class Main extends MovieClip{
var reader:RPXMLReader = new RPXMLReader();
public function Main(){
trace('Main actionscript loaded');
}
public function test(){
trace('test worked');}
}
}
이 함수가 호출하려고입니다
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at rpflash.communication::RPXMLReader/updateplaylist()
at rpflash.communication::RPXMLReader/dataHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::XMLSocket/scanAndSendEvent()
이 오류를 얻을? 그렇지 않으면 그 parent
속성이 될 것입니다 - 당신의 RPXMLReader
가 parent
이없는 것처럼
감사합니다. – vasion