implements="mx.controls.listClasses.IDropInListItemRenderer"
import mx.controls.listClasses.BaseListData;
private var _listdata:BaseListData=null;
public function set listData(value:BaseListData):void
{
_listdata=value;
}
public function get listData():BaseListData
{
return _listdata as BaseListData;
}
_listdata.rowIndex
----------------------------------------------------
bikemanager
public function getHandleBarTyeInInt():Number
{
var retHandleBarType:Number = 0;
if(sel_HandleBar == "strait")
{
retHandleBarType = 1;
}
else if(sel_HandleBar == "bullhorn")
{
retHandleBarType = 2;
}
else if(sel_HandleBar == "drop")
{
retHandleBarType = 3;
}
else if(sel_HandleBar == "slightrise")
{
retHandleBarType = 4;
}
return retHandleBarType;
}
-----------------------------------
index
public function resetUserModule(objUserBikeVO:UserBikeVO = null):void
{
model.loadedUserBikeVO = objUserBikeVO;
// CHANGE COLOR OF BIKE PART'S ACCORDING TO SELECTED COLOR OF BOX ON CLICK EVENT
//curLoadedUserBikeList
var objBikeSetColorList:ArrayCollection = model.setXmlToClipContentData(model.loadedUserBikeVO.UserBikeSelColor);//ModelLocator.getInstance().curDummyStringList
//var objBikeSetColorList:ArrayCollection = model.setXmlToClipContentData(model.adminColorSelectionVO.UserBikeSelColor);
for each(var objClipVO:mvClipVO in objSubItemList)
{
for each(var objSetClipVO:mvClipVO in objBikeSetColorList)
{
if(StringUtil.trim(objSetClipVO.mv_name) == StringUtil.trim(objClipVO.mv_name)
&& objSetClipVO.mv_colors != null && objSetClipVO.mv_colors.length > 0)
{
var colorTrans_mv:ColorTransform = objClipVO.mv_object.transform.colorTransform;
colorTrans_mv.color = mvColorVO(objSetClipVO.mv_colors[0]).colorvalue;;
objClipVO.mv_object.transform.colorTransform = colorTrans_mv;
}
}
}
// set frame size
bikeManager.getInstance().sel_Frame = model.loadedUserBikeVO.UserBikeFrameSize;
bikeManager.getInstance().setFrameHandleUltraDecal();
// set handle bar
//1 (Straight) , 2 (Bullhorn) , 3 (Drop) , 4 (Slight Rise)
if(model.loadedUserBikeVO.UserBikeHandleBarType == 1)
{
rdoStraight.selected = true;
rdoStraight.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
else if(model.loadedUserBikeVO.UserBikeHandleBarType == 2)
{
rdoBullhorn.selected = true;
rdoBullhorn.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
else if(model.loadedUserBikeVO.UserBikeHandleBarType == 3)
{
rdoDrop.selected = true;
rdoDrop.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
else if(model.loadedUserBikeVO.UserBikeHandleBarType == 4)
{
rdoSlightrise.selected = true;
rdoSlightrise.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
// set spoke wheel
chkMagWheel.selected = model.loadedUserBikeVO.UserBikeSpokeWheel;
bikeManager.getInstance().handleMagWheelFrontSide();
}
Thursday, March 22, 2012
Wednesday, March 21, 2012
for each(var objClipVO:mvClipVO in objSubItemList)
{
for each(var objSetClipVO:mvClipVO in objBikeSetColorList)
{
if(StringUtil.trim(objSetClipVO.mv_name) == StringUtil.trim(objClipVO.mv_name)
&& objSetClipVO.mv_colors != null && objSetClipVO.mv_colors.length > 0)
{
var colorTrans_mv:ColorTransform = objClipVO.mv_object.transform.colorTransform;
colorTrans_mv.color = mvColorVO(objSetClipVO.mv_colors[0]).colorvalue;;
objClipVO.mv_object.transform.colorTransform = colorTrans_mv;
}
}
}
----------------------------------------------------------------------
public function copy_mvClipVOForSaveBike(clipVO:mvClipVO):mvClipVO
{
var new_mvClipVO:mvClipVO = new mvClipVO();
//new_mvClipVO.mv_colors_string = clipVO.mv_colors_string;
new_mvClipVO.mv_name = clipVO.mv_name;
new_mvClipVO.mv_colors = null;
if(clipVO.mv_colors_save == null)
{
clipVO.mv_colors_save = new Array();
}
else if(clipVO.mv_colors_save.length > 0)
{
new_mvClipVO.mv_colors_save = new Array();
for each(var objbikecolor:mvColorVO in clipVO.mv_colors_save)
{
var new_colorVO:mvColorVO = new mvColorVO();
new_colorVO.colorname = objbikecolor.colorname;
new_colorVO.colorvalue = objbikecolor.colorvalue;
new_mvClipVO.mv_colors_save.push(new_colorVO);
}
}
//new_mvClipVO.mv_colors = null;
return new_mvClipVO;
}
{
for each(var objSetClipVO:mvClipVO in objBikeSetColorList)
{
if(StringUtil.trim(objSetClipVO.mv_name) == StringUtil.trim(objClipVO.mv_name)
&& objSetClipVO.mv_colors != null && objSetClipVO.mv_colors.length > 0)
{
var colorTrans_mv:ColorTransform = objClipVO.mv_object.transform.colorTransform;
colorTrans_mv.color = mvColorVO(objSetClipVO.mv_colors[0]).colorvalue;;
objClipVO.mv_object.transform.colorTransform = colorTrans_mv;
}
}
}
----------------------------------------------------------------------
public function copy_mvClipVOForSaveBike(clipVO:mvClipVO):mvClipVO
{
var new_mvClipVO:mvClipVO = new mvClipVO();
//new_mvClipVO.mv_colors_string = clipVO.mv_colors_string;
new_mvClipVO.mv_name = clipVO.mv_name;
new_mvClipVO.mv_colors = null;
if(clipVO.mv_colors_save == null)
{
clipVO.mv_colors_save = new Array();
}
else if(clipVO.mv_colors_save.length > 0)
{
new_mvClipVO.mv_colors_save = new Array();
for each(var objbikecolor:mvColorVO in clipVO.mv_colors_save)
{
var new_colorVO:mvColorVO = new mvColorVO();
new_colorVO.colorname = objbikecolor.colorname;
new_colorVO.colorvalue = objbikecolor.colorvalue;
new_mvClipVO.mv_colors_save.push(new_colorVO);
}
}
//new_mvClipVO.mv_colors = null;
return new_mvClipVO;
}
Subscribe to:
Posts (Atom)