Hi, I am trying to create a button that when clicked shows a popup, the user then enters information into this popup and clicks create. My main application then takes this information creates an object and uses it as a data provider to show a node on a graph. The problem I am having is that when I show the popup code is still executed in the parent, which is not what I would like. I would only like to create and show the object if the user clicked create in the popup and not do anything if he clicks cancel.
This is the function called when the user selects new: private function newItem(): void { var item: Item = new Item(); var newProj:newProject = newProject(PopUpManager.createPopUp(this,newProject,true)); PopUpManager.centerPopUp(newProj); //This is where i would like to pause till the user clicks a button in the popup item.data = newProj.project; g.add(item); s.dataProvider = g; } Is there anyway to do this? Should I be using somethin different in my event handlers in my popup then just closing the popup? Any help would be appreciated! -Adam