Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save marchbold/82391ed4bff260c4642cabeafed85283 to your computer and use it in GitHub Desktop.

Select an option

Save marchbold/82391ed4bff260c4642cabeafed85283 to your computer and use it in GitHub Desktop.
Cloud container document updates using the Cloud Storage ANE
CloudStorage.service.documentStore.addEventListener( DocumentStoreEvent.UPDATE_START, updateStartHandler );
CloudStorage.service.documentStore.addEventListener( DocumentStoreEvent.UPDATE_END, updateEndHandler );
CloudStorage.service.documentStore.addEventListener( DocumentStoreEvent.FILES_DID_CHANGE, filesDidChangeHandler );
...
private function updateStartHandler( event:DocumentStoreEvent ):void
{
trace( "update started" );
}
private function updateEndHandler( event:DocumentStoreEvent ):void
{
trace( "update completed" );
}
private function filesDidChangeHandler( event:DocumentStoreEvent ):void
{
trace( "files did change" );
// This will list the documents that have been changed
for each (var document:Document in event.documents)
{
trace( "changed: "+document.filename );
}
}
// com.distriqt.CloudStorage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment