7 Replies Latest reply on Sep 24, 2010 9:25 AM by Shongrunden

    2 questions

    suludi81 Level 1

      Hi,my first problem is related  to custom skins.I wanted to give my application a linear gradient backround and i created new MXML component based on Spark skin which is hosting spark.components.Application.


      There i applied the gradients,modyfied skinClass property of my application and the backround changed.However,all of my controls,images,etc. where suddenly not vivible.For example when i try to drag a button in design view onto my application i get not possible icon.

      If i add items in the skin file and then run my application everything works fine,

      Does skin file takes precedence over my main application file-where should i put my code now?


      2.Is there a way that BitmapImage images are not embeded in AnimateTransitionShader animations.It only works if images are embeded,but then my release build will be too big and i really need these animations in my app.


      Thanks in advance,



        • 1. Re: 2 questions
          Shongrunden Adobe Employee

          1. I suspect you put your gradient code after the contentGroup of the ApplicationSkin which is covering all of the elements in the contentGroup.  Try moving it to be before the contentGroup.


          2. You shouldn't need to embed images for them to be used in AnimateTransitionShader, what you need is the bitmapData of a fully loaded image.  Do you have a simple example that demonstrates it not working for you?

          • 2. Re: 2 questions
            suludi81 Level 1

            Thank you for helping me on my first problem,but i still can' t find a way to not embed images.

            I have a very simple transition that is using AnimateTransitionShader,it is targeting a group container which has 2 BitmapImages embeded and is just flipping them in 2 states-default and flipped.

            My problem is that ShaderByteCode and both BitmapImages need to be embeded for this to work,if i leave out the embed directive nothing happens.


            Thanks in advance,



            • 3. Re: 2 questions
              Shongrunden Adobe Employee

              Can you post a small sample application that demonstrates this?

              • 4. Re: 2 questions
                suludi81 Level 1

                I can post the code,cause it's very short.I need a way to not embed those two images.




                     <s:State name="default"/>

                     <s:State name="flipped"/>



                     <s:Transition id="myTransition">

                          <AnimateTransitionShader target="{group1} duration="1200" ShaderByteCode="@Embed('path to pixel bender file(pbj)'),mimeType='application-




                <s;Group id=holderGroup>

                     <s:BitmapImage source=@Embed(path to the image) visible.default="true" visible.flipped="false" width="300" height="300"/>

                          <Here goes one more image,the same as previous one,different path of course/>


                <s:button label="Play" click=currentState=(currentState=='flipped') ? 'default' : 'flipped';/>

                • 5. Re: 2 questions
                  Shongrunden Adobe Employee

                  Does it work if you use mx:Image instead of s:BitmapImage?

                  • 6. Re: 2 questions
                    suludi81 Level 1

                    It does work,thank you very much.The thing that was confusing me is that every tutorial and every article i came upon was using embeded BitmapImages,

                    so i thought that AnimateTransitionShader only worked with them.








                    • 7. Re: 2 questions
                      Shongrunden Adobe Employee

                      BitmapImage doesn't currently support non-embedded images.  That support will be added in the next release of Flex.