Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: None  |  size: 0.68 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. demo.launchCameraWindow=function(winConfig,successCallback,cancelCallback,failureCallback){
  2.         //We use our helper functions to create the window
  3.         var win = demo.myHelpers.makeWindow(winConfig);
  4.        
  5.         Ti.Media.showCamera({
  6.        
  7.                 success:function(event){
  8.                         var image = event.media;
  9.                         successCallback(image)
  10.                 },
  11.                 cancel:function(){
  12.                         cancelCallback();
  13.                 },
  14.                 error:function(error){
  15.                         failureCallback(error.code;)
  16.                 },
  17.                 saveToPhotoGallery:false,
  18.                 allowEditing:true,
  19.                 mediaTypes:[Ti.Media.MEDIA_TYPE_PHOTO]
  20.         });
  21. //-------------------------------------------------------------
  22. //              Don't forget to return the window
  23. //-------------------------------------------------------------
  24.         return win;
  25. };