Below is the sample code for the inline renderer that I need to make an external item renderer. Specifically, I need help with this line:
outerDocument.buyList.removeItemAt(outerDocument.cart.selectedIndex);
Whole item renderer
*************
<mx:itemRenderer>
<mx:Component>
<mx:Canvas width="100%" height="42"
verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:Script>
<![CDATA[
[Embed(source="images/trash.PNG")]
public var trash:Class;
public function removeItem():void {
var newCartTotal:Number =
outerDocument.cartTotal;
var removePrice:Number =
[EMAIL PROTECTED];
var newTotal:Number =
newCartTotal - removePrice;
outerDocument.buyList.removeItemAt
(outerDocument.cart.selectedIndex);
outerDocument.total.text =
outerDocument.cartFormatter.format(newTotal);
outerDocument.cartTotal =
newTotal;
}
]]>
</mx:Script>
<mx:Image source="[EMAIL PROTECTED]" height="38"
width="51" left="0" top="2"/>
<mx:Label text="[EMAIL PROTECTED]" left="70" top="0.75"
width="67" textAlign="center"/>
<mx:Label text="[EMAIL PROTECTED]" left="42" top="20"
width="100" textAlign="center"/>
<mx:Button x="145" top="3" bottom="3" icon="{trash}"
click="removeItem();"/>
</mx:Canvas>
</mx:Component>
</mx:itemRenderer>

