2 Replies Latest reply on May 30, 2011 1:05 AM by nikos101

    skin not working properly at runtime

    nikos101 Level 2

      For some reason my text is at the bottom rather than in the middle like I want in design view as I've set  horizontalCenter="0" verticalCenter="0"

       

      <?xml version="1.0" encoding="utf-8"?>
      <Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
              xmlns="library://ns.adobe.com/flex/spark"
              xmlns:mx="library://ns.adobe.com/flex/mx">
          <!-- host component -->
          <fx:Metadata>
              [HostComponent("nikos.customComponents.ToggledBackground")]
          </fx:Metadata>
         
          <!-- states -->
          <states>
              <State name="on" />
              <State name="off" />
          </states>
         
          <!-- SkinParts
          name=labelDisplay, type=spark.components.supportClasses.TextBase, required=false
          -->

       

          <mx:Image source="nikos/customComponents/images/ArrowButtons_06.png"  source.off="nikos/customComponents/images/ArrowButtons_03.png">
              <mx:filters>
                  <DropShadowFilter blurX="10" blurY="10" distance="2" alpha=".52"  >
                     
                  </DropShadowFilter>
              </mx:filters>
          </mx:Image>
         
          <RichText id="labelDisplay"  horizontalCenter="0" verticalCenter="0" text="345" color="#FFFFFF">
             
          </RichText>
      </Skin>

        • 1. Re: skin not working properly at runtime
          Shongrunden Adobe Employee

          Hard to tell without the greater context of the application.  Can you provide a simple, complete, compilable example that demonstrates this?

          • 2. Re: skin not working properly at runtime
            nikos101 Level 2

            for some reason its working now thx

             

             

             

            <?xml version="1.0" encoding="utf-8"?>
            <Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
                  xmlns="library://ns.adobe.com/flex/spark"
                  xmlns:mx="library://ns.adobe.com/flex/mx">
                <!-- host component -->
                <fx:Metadata>
                    [HostComponent("nikos.customComponents.ToggledBackground")]
                </fx:Metadata>
               
                <!-- states -->
                <states>
                    <State name="on" />
                    <State name="off" />
                </states>
                <transitions>
                    <Transition autoReverse="true">
                        <Parallel>
                           
                            <!--<Move3D  target="{image}" duration="1100" zBy="100" >
                               
                            </Move3D>-->
                            <Rotate3D  target="{this}" duration="1100" angleYTo="360">
                               
                            </Rotate3D>
                        </Parallel>
                    </Transition>
                </transitions>
               
                <!-- SkinParts
                name=labelDisplay, type=spark.components.supportClasses.TextBase, required=false
                -->
               
                <mx:Image source="@Embed('images/ArrowButtons_06.png')" id="image" source.off="@Embed('images/ArrowButtons_03.png')">
                    <mx:filters>
                        <DropShadowFilter blurX="10" blurY="10" distance="2" alpha=".52"  >
                           
                        </DropShadowFilter>
                    </mx:filters>
                </mx:Image>
                <!--<Rect top="0" left="0" right="0" bottom="0" alpha="0.3" >
                <fill>
                    <SolidColor color="#000000">
                       
                    </SolidColor>
                   
                </fill>
                </Rect>-->
               
                <RichText id="labelDisplay"  color="#FFFFFF" verticalCenter="0" horizontalCenter="20" width="70"  fontSize="11">
                   
                </RichText>
               
            </Skin>