|
Home > Archive > Macromedia Flash Server > July 2005 > Alert, Call Back problem!
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Alert, Call Back problem!
|
|
|
| Hi,
I have problem on my userList class. The player hang when try to open Alert
Here the complete code:
import mx.controls.Alert;
class fcs_userList extends MovieClip {
static var _fcs_conn:NetConnection;
private var _so:SharedObject;
private var _username:String;
private var _userStatus:String;
var _webCam:Camera;
function fcs_userList(){
_thisClass = this;
}
function connect(nc){
trace("try connect using "+nc.uri);
_webCam = _webCamera.start(nc);
_fcs_conn = new NetConnection();
_fcs_conn = nc;
_fcs_conn.getID = this.getID;
_fcs_conn.askCamPermission = this.askCamPermission;
_so = SharedObject.getRemote("users", _fcs_conn.uri, false);
_so.owner = this;
_so.onSync = function(list) {
this.owner.userList.removeAll();
for (var i in this.data) {
this.owner.userList.addItem({
label:this.data[i].username,
data:{ID:this.data[i].ID,status:this.data[i].status} });
}
}
_so.connect(_fcs_conn);
_fcs_conn.call("connect", null, _userStatus);
}
function close(){
_so.close();
_thisClass.userList.removeAll();
}
// camera things
function camPermission(evt){
trace("test permission");
}
function askCamPermission(sender){
trace("ask cam permission");
Alert.show("Please give me access to your camera", sender, Alert.OK,
this, camPermission); // <------ not success
}
}
--------------------------------------------------------------------
I Nengah Januartha
an Indonesian Interactive Media Developer
visit my blog at http://janumedia.blogspot.com
--------------------------------------------------------------------
Send instant messages to your online friends http://asia.messenger.yahoo.com
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
|
|
|
|
|