topical media & game development
lib-flex-store-productsView-ProductListItem.mx
lib-flex-store-productsView-ProductListItem.mx
(swf
)
[ flash
]
flex
<?xml version="1.0" encoding="utf-8"?>
<!--
//////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2003-2006 Adobe Macromedia Software LLC and its licensors.
// All Rights Reserved.
// The following is Sample Code and is subject to all restrictions on such code
// as contained in the End User License Agreement accompanying this product.
// If you have received this file from a source other than Adobe,
// then your use, modification, or distribution of it requires
// the prior written permission of Adobe.
//
//////////////////////////////////////////////////////////////////////////
-->
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
styleName="listItem"
height="{lib_flex_store_productsView_ProductListItem.HEIGHT}"
automationName="{product.name}">
<mx:Metadata>
[Event(name="productQtyChange", type="lib_flex_store_samples_flexstore_ProductListEvent")]
[Event(name="removeProduct", type="lib_flex_store_samples_flexstore_ProductListEvent")]
</mx:Metadata>
<mx:Script>
<![CDATA[
// import samples.flexstore.Product;
// import samples.flexstore.ProductListEvent;
public static const HEIGHT:int = 30;
[Bindable]
public var product:lib_flex_store_samples_flexstore_Product;
private function qtyChange():void
{
product.qty = int(qty.text);
var event:lib_flex_store_samples_flexstore_ProductListEvent = new lib_flex_store_samples_flexstore_ProductListEvent(lib_flex_store_samples_flexstore_ProductListEvent.PRODUCT_QTY_CHANGE);
event.product = product;
dispatchEvent(event);
}
private function removeItem():void
{
var event:lib_flex_store_samples_flexstore_ProductListEvent = new lib_flex_store_samples_flexstore_ProductListEvent(lib_flex_store_samples_flexstore_ProductListEvent.REMOVE_PRODUCT);
event.product = product;
dispatchEvent(event);
}
]]>
</mx:Script>
<mx:CurrencyFormatter currencySymbol="
(C) Æliens
18/6/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.