Skip to content

Commit 0d5b62d

Browse files
committed
+ mailru#143: camera.swf path through flashvar useCamera
2 parents a435099 + d6f9659 commit 0d5b62d

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

flash/core/src/ru/mail/controller/AppController.as

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,10 @@ package ru.mail.controller
107107
JSCaller.flashId = options["flashId"];
108108
}
109109

110-
// use camera
111-
_model.useCamera = !!options["useCamera"];
112-
if (_model.useCamera) {
110+
// use camera
111+
// options["useCamera"], if not false, contains url to camera swf
112+
_model.useCamera = options["useCamera"];
113+
if (_model.useCamera && _model.useCamera !== 'false') {
113114
setupCamera();
114115
}
115116

flash/core/src/ru/mail/controller/CameraController.as

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ package ru.mail.controller
9797
initComplete(false, evt.error.getError());
9898
}
9999
});
100-
// todo: parametrize swf path
101-
loader.loadGraphic(new URLRequest('../dist/FileAPI.flash.camera.swf'));
100+
101+
loader.loadGraphic(new URLRequest(_model.useCamera || 'FileAPI.flash.camera.swf'));
102102
}
103103

104104
private function onCameraStatus(event:StatusEvent):void

flash/core/src/ru/mail/data/AttachmentsModel.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ package ru.mail.data
5151
return _filesBuilder;
5252
}
5353

54-
public var useCamera:Boolean = false;
54+
public var useCamera:String = null;
5555

5656
/**
5757
* if true, user can select multiple files

0 commit comments

Comments
 (0)