apache-flexiconsmxmlviewstack

Adding Icon in NavigatorContent


I am trying to add an Icon to NavigatorContent, but for some reason it is not working.

My code is below:

<s:TabBar id="tabs" dataProvider="{vs}"/>
<mx:ViewStack id="vs" width="100%" height="100%">
        <s:NavigatorContent label="Consultant"  width="100%" height="100%" icon="@Embed(source='presentation/skin/searchButton.png')">
            <presentation:GridView width="100%" height="100%" />
            <presentation:Form id="myForm" width=" 100%" height="40%" visible="{myForm.model.visibility}" includeInLayout="{myForm.model.visibility}"/>
        </s:NavigatorContent>
</mx:ViewStack>

My aim is to gain something like this: http://it-skills.su/sosamples/webspark46/navigatoricon/index.html


Solution

  • The only reason that I see - maybe path to the icon file is incorrect. As I remember in your case with this path your file must exist at "your_source_path/presentation/skin/searchButton.png".