actionscript-3alchemyflascc

Failed to create Console with embed VFS due to "Call to a possibly undefined method"


First I've created an embedded Virtual File System, as described here.

It generates this AS code:

package C_Run {}
package com.adobe.flascc.vfs {

    import com.adobe.flascc.vfs.*;
    import com.adobe.flascc.BinaryData

    public class myvfs extends InMemoryBackingStore {

        public function myvfs() {
            addDirectory("/data")
            addFile("/data/localization.en.afgpack", new     C_Run.ALC_FS_6D79766673202F646174612F6C6F63616C697A6174696F6E2E656E2E6166677061636B)
            addFile("/data/dataAudio.afgpack", new     C_Run.ALC_FS_6D79766673202F646174612F64617461417564696F2E6166677061636B)
            addFile("/data/data.afgpack", new     C_Run.ALC_FS_6D79766673202F646174612F646174612E6166677061636B)
        }    
    }
}

It is compiled into myvfs.abc. Then I'm trying to create custom console with this VFS. I've imported myvfs in Console.as:

import com.adobe.flascc.vfs.myvfs;

And created vfs object:

var my_vfs_embedded:InMemoryBackingStore = new myvfs(); 

So, the problem is that compiling Console.abc sometimes fails with error "Call to a possibly undefined method myvfs" and sometimes builds successfully with the same code. How can this be?

Console.abc is built by this command:

cd ./../../Engine/library/baselib/sources/flash &&  \
     java -jar $(FLASCC_FOR_EXT)/usr/lib/asc2.jar -merge -md -AS3 -strict -optimize \
    -import $(FLASCC_FOR_EXT)/usr/lib/builtin.abc \
    -import $(FLASCC_FOR_EXT)/usr/lib/playerglobal.abc \
    -import $(GLS3D_ABS)/install/usr/lib/libGL.abc \
    -import $(FLASCC_FOR_EXT)/usr/lib/ISpecialFile.abc \
    -import $(FLASCC_FOR_EXT)/usr/lib/IBackingStore.abc \
    -import $(FLASCC_FOR_EXT)/usr/lib/IVFS.abc \
    -import $(FLASCC_FOR_EXT)/usr/lib/InMemoryBackingStore.abc \
    -import $(FLASCC_FOR_EXT)/usr/lib/AlcVFSZip.abc \
    -import $(FLASCC_FOR_EXT)/usr/lib/CModule.abc \
    -import $(FLASCC_FOR_EXT)/usr/lib/C_Run.abc \
    -import $(FLASCC_FOR_EXT)/usr/lib/BinaryData.abc \
    -import $(FLASCC_FOR_EXT)/usr/lib/PlayerKernel.abc \
    -import $(BUILD_FULL_PATH)/myvfs.abc \
    Console.as -outdir $(BUILD_FULL_PATH) -out Console

Solution

  • Seems like my VFS was too big for compiler. When I take less data everything was ok. So, I suppose it was a bug in compiler.