I have the following custom event:
package com.un.photoManager.events
{
import flash.events.Event;
import mx.collections.ArrayCollection;
public class CreateAlbumFolderEvent extends Event
{
// when creating an album, we need to know which albumfolder to put it in, 0 is the default group;
public var albumFolderID:int = 0;
public var name:String;
public function CreateAlbumFolderEvent(type:String, name:String, albumFolderID:int = 0, cancelable:Boolean = false)
{
super(type, true, cancelable);
this.name = name;
this.albumFolderID = albumFolderID;
}
}
}
The event gets called from a popup using the following code:
protected function handleCreate():void
{
var event:CreateAlbumFolderEvent;
var selectedItemType:String;
if (folderAlbum == CREATE_ALBUM)
{
event = new CreateAlbumFolderEvent(EventConstants.CREATE_ALBUM, newAlbumFolder.text, selectedAlbumFolderID);
selectedItemType = "Album";
}
else
{
event = new CreateAlbumFolderEvent(EventConstants.CREATE_ALBUM_FOLDER, newAlbumFolder.text);
selectedItemType = "Folder";
}
dispatchEvent(event);
FolderBrowse.lastSelectedItemType = selectedItemType;
PopUpManager.removePopUp(this);
}
What I am trying to do is to capture the response that is handed back. Here is a screenshot of Charles showing the response. The Result value is what I am looking to be able to use once the dispatchEvent(event);
has executed.
I have been working on this for several hours looking at blog & forum posts and have not been able to get a solution to work. Ideally, code samples would be nice, but right now any help would be appreciated.