parseInt(graphItem.graphId)) return (graphItem.graphId); } return null; } public function notifyClipAdded(clipView : MediaClipView) : void { this.subject.addClip(clipView.clip); } public function removeVideo(clipView : MediaClipView):void { var item : XimpelGraphItem = _graph.find(clipView.itemId) as XimpelGraphItem; var nodes : Object = _graph.nodes; var neighbors : Array = new Array();; for (var key:Object in _graph.neighbors(clipView.itemId)){ var keyString : String = key as String; neighbors.push(nodes[key]); } var _previousNode : XimpelGraphItem; var _nextNode : XimpelGraphItem; var numlinks : int = _graph.numLinks(item); this.subject.removeClip(clipView.clip); _graph.remove(item); if (neighbors[0]) _previousNode = neighbors[0] as XimpelGraphItem; if (neighbors[1]) _nextNode = neighbors[1] as XimpelGraphItem; // Only one clip if (!neighbors[0] && !neighbors[1]){ _previousItem = null; clipCount = 0; return; } // First clip if (neighbors[0] && !neighbors[1] && item != _previousItem){ return; } // Last clip if (neighbors[0] && item == _previousItem){ _previousItem = neighbors[0]; clipCount--; return; } // Rest of the clips _graph.link(neighbors[0], neighbors[1]); } private function dragDropHandler(event:DragEvent):void { addMedia(event.dragSource.formats[0], event.dragSource.formats[1]); } private function dragEnterHandler(event:DragEvent):void { DragManager.acceptDragDrop(Canvas(event.currentTarget)); } private function clickHandler (event:MouseEvent):void { dispatchEvent(new InterfaceEvents("subjectActivated")); } private function subjectFormMouseDownHandler (event : InterfaceEvents):void { var comboBox : ComboBox = event.currentTarget as ComboBox; } private function subjectFormChangedHandler (event : InterfaceEvents):void { //updateSubject(); } ]]>