topical media & game development
springgraph-thesaurus-MeaningView.mx
springgraph-thesaurus-MeaningView.mx
(swf
)
[ flash
]
flex
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" backgroundAlpha="0.5"
alpha="{springgraph_thesaurus.instance.getItemAlpha(springgraph_thesaurus.instance.roamer.visibleHistoryItems, data.id)}"
backgroundColor="#ffffff" cornerRadius="44" borderStyle="outset" borderColor="#554f5d" themeColor="#1816f0">
<!--
/////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2006 Adobe Macromedia Software LLC and its licensors.
// All Rights Reserved. The following is Source Code and is subject to all
// restrictions on such code as contained in the End User License Agreement
// accompanying this product.
//
/////////////////////////////////////////////////////////////////////////////
-->
<!-- This component is the itemRenderer (a.k.a. view class) for Items of type Meaning. This is
a little box with the Meaning's main item, part of speech, and definition.
We use various common view settings provided by various Thesaurus functions.
We also implement a double-click action.
-->
<
mx:Text id="t" width="125" htmlText="{getHtmlText(data as
ax_springgraph_thesaurus_Meaning)}" selectable="false"
color="{
springgraph_thesaurus.instance.getColor(
springgraph_thesaurus.instance.roamer.currentItem, data)}"
filters="{
springgraph_thesaurus.instance.calcFilters(
springgraph_thesaurus.instance.roamer.currentItem, data as Item)}"/>
<
mx:Script>
<![CDATA[
import com.adobe.flex.extras.controls.springgraph.Item;
private function getHtmlText(meaning:
ax_springgraph_thesaurus_Meaning): String {
return "
<b>" + meaning.word + "
</b> (" + meaning.partOfSpeech + "): " + meaning.definition;
}
public function doubleClick(event: MouseEvent): void {
springgraph_thesaurus.instance.setCurrentItem(data as
ax_springgraph_thesaurus_Meaning);
}
]]>
</mx:
Script>
</mx:Canvas>
(C) Æliens
20/2/2008
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.