2 Replies Latest reply on Aug 10, 2012 9:52 AM by ebhoren

    ViewNavigator Skin

    BlackJack1983

      Hi all,

       

      i would like to skin my ViewNavigator(s), part of a TabbedViewNavigatorApplication.

       

      my parts code are:

      - Application:

       

      <s:ViewNavigator skinClass="skins.TabNavSkin" id="homePage" label="Home" width="100%" height="100%" firstView="views.StockMarketView" icon="@Embed('assets/homepage_tab_icon.png')"/>

       

      - My skin file is:

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"

              xmlns:s="library://ns.adobe.com/flex/spark" >

          <!-- host component -->

          <fx:Metadata>

              [HostComponent("spark.components.ViewNavigatorApplication")]

          </fx:Metadata>

         

          <fx:Script>

              <![CDATA[

                 

                 

              ]]>

          </fx:Script>

         

          <s:states>

              <s:State name="normal" />

              <s:State name="portraitAndOverlay" />

              <s:State name="landscapeAndOverlay" />

              <s:State name="portrait" />

              <s:State name="disabled" />

              <s:State name="landscape" />

          </s:states>

         

          <s:Rect>

              <s:fill>

                  <s:LinearGradient rotation="90">

                      <s:GradientEntry color="#ff0000" />

                      <s:GradientEntry color="0x4f83aa" />

                  </s:LinearGradient>

              </s:fill>

          </s:Rect>

         

         

         

      </s:Skin>

       

       

      But when i run have this error:

       

       

      TypeError: Error #1009: Cannot access a property or method of a null object reference.

          at spark.transitions::ViewTransitionBase/captureEndValues()[E:\dev\4.y\frameworks\projects\m obilecomponents\src\spark\transitions\ViewTransitionBase.as:747]

          at spark.components::ViewNavigator/completeTransitionPreparations()[E:\dev\4.y\frameworks\pr ojects\mobilecomponents\src\spark\components\ViewNavigator.as:2243]

          at spark.components::ViewNavigator/prepareViewTransition()[E:\dev\4.y\frameworks\projects\mo bilecomponents\src\spark\components\ViewNavigator.as:2172]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core \UIComponent.as:13152]

          at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:844]

          at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1180]

       

       

      Something about this...?

       

      Thanks a lot.

       

      BJ