Last active
July 31, 2016 02:23
-
-
Save marchbold/61c6b39e2889c839a77d7085f1c68f61 to your computer and use it in GitHub Desktop.
Mount an OBB expansion file using the ExpansionFiles ANE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var obbFile:ExpansionFile = new ExpansionFile( ExpansionFile.MAIN, 1001003, 93147195 ); | |
if (ExpansionFiles.service.expansionFilesDelivered()) | |
{ | |
ExpansionFiles.service.obbUtils.addEventListener( OBBUtilsEvent.STATE_CHANGED, obbUtils_stateChangedHandler ); | |
var success:Boolean = ExpansionFiles.service.obbUtils.mount( obbFile ); | |
} | |
... | |
private function obbUtils_stateChangedHandler( event:OBBUtilsEvent ):void | |
{ | |
trace( event.type + " : "+ ExpansionFiles.service.getFilenameForExpansionFile(event.file) ); | |
if (event.state == OBBState.MOUNTED) | |
{ | |
trace( "OBB file mounted" ); | |
} | |
} | |
// com.distriqt.ExpansionFiles |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment