flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [07/25] git commit: [flex-asjs] [refs/heads/tlf] - photo library works on my LG
Date Sat, 03 Jun 2017 20:33:19 GMT
photo library works on my LG


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/c5216086
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/c5216086
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/c5216086

Branch: refs/heads/tlf
Commit: c5216086f2e0d2d7def40483aca29813c20a7ba5
Parents: 5c93d4d
Author: Alex Harui <aharui@apache.org>
Authored: Wed May 31 15:42:06 2017 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Wed May 31 15:42:06 2017 -0700

----------------------------------------------------------------------
 .../src/main/flex/MyInitialView.mxml                  | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c5216086/examples/flexjs/CordovaCameraExample/src/main/flex/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/CordovaCameraExample/src/main/flex/MyInitialView.mxml b/examples/flexjs/CordovaCameraExample/src/main/flex/MyInitialView.mxml
index dcdd742..2e79292 100644
--- a/examples/flexjs/CordovaCameraExample/src/main/flex/MyInitialView.mxml
+++ b/examples/flexjs/CordovaCameraExample/src/main/flex/MyInitialView.mxml
@@ -31,7 +31,7 @@ limitations under the License.
 			{
 				status.text = "ready";
 			}
-			
+
 			public function snapPicture() : void
 			{
 				if (cam == null) {
@@ -46,17 +46,29 @@ limitations under the License.
 				image.src = String(imageData);
 			}
 			
+			private function libSuccess(imageData:Object):void
+			{
+				output.text = "Chose photo file: " + String(imageData);
+				image.src = String(imageData);
+			}
+			
 			private function failure(message:Object):void
 			{
 				output.text = "Failed: "+String(message);
 			}
 			
+			private function onFromPhotoLibrary() : void
+			{
+				cam.getPhotoFromLibrary(libSuccess,failure);
+			}
+			
 		]]>
     </fx:Script>
     
 	
 	<js:Label id="status" x="20" y="140" width="400" text="loading..."/>
 	
+	<js:TextButton text="From Photo Library" x="20" y="20" click="onFromPhotoLibrary()" />
 	<js:TextButton text="Snap Picture" x="20" y="55" click="snapPicture()" />
 	
 	<js:Label id="output" x="20" y="110" width="400"/>


Mime
View raw message