Mike Chambers 횽아 블로그에 올라온 내용입니다.

저도 그동안 수없이 나왔던 에런데 이제야 실체를 알게 됐네요.

에러는 다음과 같습니다.

Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.
    at flash.filesystem::File/_exists()
    at flash.filesystem::File/get exists()
    at Untitled_fla::MainTimeline/frame1()[Untitled_fla.MainTimeline::frame1:2]
    at runtime::ContentPlayer/loadInitialContent()
    at runtime::ContentPlayer/playRawContent()
    at runtime::ContentPlayer/playContent()
    at runtime::AppRunner/run()
    at global/runtime::ADLEntry()

에러의 원인은 File이나 FileReference 객체는 filePath를 지니고 초기화되어야

그 다음부터 활용할 수 있습니다.

예를 들면 아래의 코드는 #2037 에러를 뱉습니다.

var file: File = new File();
trace( file.exists );

그런데 아래 코드는 정상적으로 동작하게 됩니다.

var file: File = File.desktopDirectory;
trace( file.exists );

Don't forget this~


+ Recent posts