My source code is :
What i forget in my declaration?
Why i have this errors ?
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=759&threadid=1424553#5...private function init():void
{
// we are interested in both SYNCHRONIZATION_CHANGE
(connection success) and Error events
myConnectSession.addEventListener(SessionEvent.SYNCHRONIZATION_CHANGE,
onSessionEventNotification);
myConnectSession.addEventListener(SessionEvent.ERROR,
onSessionEventNotification);
// small status indicator
notificationMessage.text = "Login to the AFC Service...";
}
/**
* Handles sessionEvents such as synchronization, errors, and
so on.
* @see SessionEvent
*/
private function
onSessionEventNotification(p_evt:SessionEvent):void
{
//The type of event emitted when the session gains or loses
synchronization with its source.
if (p_evt.type == SessionEvent.SYNCHRONIZATION_CHANGE) {
//if we are successfully connected
if (myConnectSession.isSynchronized) {
notificationMessage.text = "Connected";
// Get the file manager from our connectSession.
if (!_fileManager) {
_fileManager = myConnectSession.fileManager;
}
// Get the user manager from connectSession for later use.
if (!_userManager) {
_userManager = myConnectSession.userManager;
}
// create new file publisher to upload/delete files
if(!_filePublisher){
_filePublisher = new FilePublisher();
_filePublisher.initialize();
//Only a room owner can create the new file group (a group
is like folder).
if(!_fileManager.isGroupDefined(_groupid) &&
_fileManager.getUserRole(_userManager.myUserID,_groupid) ==
UserRoles.OWNER) {
//Create a new node with a new groupid.
var nodeConfig:NodeConfiguration = new NodeConfiguration;
nodeConfig.sessionDependentItems = false; //Specifies
whether files in the pod should be deleted as the session ends.
_filePublisher.createAndUseGroup(_groupid, nodeConfig);
}else {
//otherwise, use assigned groupid
_filePublisher.groupName = _groupid;
}
}
// Create a file subscriber to download file.
if(!_fileSubscriber){
_fileSubscriber = new FileSubscriber();
_fileSubscriber.initialize();
}
// Bind to the file manager's file descriptors array
collection to display the datagrid user interface.
_fileDescriptors =
_fileManager.getFileDescriptors(_groupid);
}
}
else if (p_evt.type == SessionEvent.ERROR) {
// we get an error from connect session
notificationMessage.text = "Error: " + p_evt.error;
}
}
/**
* Handle the upload button click.
*/
private function onUploadClick():void
{
var filterArray:Array = [new FileFilter("*.*", "*.*")];
_filePublisher.browse(UIDUtil.createUID(), filterArray);
}
/**
* Handle the download button click.
*/
private function onDownloadClick():void
{
if(_fileGrid.selectedItem) {
try{
_fileSubscriber.download(_fileGrid.selectedItem as
FileDescriptor);
}catch(e:Error) {
trace("Error download: " + e.message);
}
}
}
/**
* Handle the delete button click.
*/
private function onDeleteClick():void
{
if(_fileGrid.selectedItem) {
_filePublisher.remove(_fileGrid.selectedItem as
FileDescriptor);
}
}
many thanks for your help,
Lionceau,