0
votes

How do you display HTML formatted text in a Spark custom item renderer (Actionscript)?


Sample Code:

The html content in item.post_content displays as plain text in the IconItemRenderer messageFunction snippet below (which is just the default generated code for Icon Item renderer):

<s:itemRenderer>
    <fx:Component>
        <s:IconItemRenderer iconField="iconField" 
iconWidth="64" iconHeight="64" labelField="post_title" messageFunction="getPost">
        <fx:Script>
                    <![CDATA[
                private function getPost(item:Object):String{
                    return item.post_content;
        }

                ]]>
                </fx:Script>
                </s:IconItemRenderer>
            </fx:Component>
        </s:itemRenderer>
1
sample of code will be more helpfulExhausted
added, although i'm not sure if the code sample helps. i am just looking for a way to display html formatted data in list items.ina

1 Answers

0
votes

Use a custom skin that does what you want.

P.S.: The message function is intended to be a callback provided at a higher level in the project, not a private method of the renderer.