8 Replies Latest reply on Sep 14, 2010 7:34 AM by kglad

    Combo box - skew ?

    sun_india

      I want to skew the combo box in flash as2. Is it possible to do so?

        • 1. Re: Combo box - skew ?
          kglad Adobe Community Professional & MVP

          you can skew it just be sure to embed fonts for the textfield and list.  what's the problem?

           

          edit:  oh, i see.  the list component doesn't skew.

           

          to remedy, use actionscript to skew your component and skew its dropdown property.

          1 person found this helpful
          • 2. Re: Combo box - skew ?
            sun_india Level 1

            the following script i added in my flash

             

            city_cb.setStyle("themeColor",  "0xf6d282");
            city_cb.setStyle("backgroundColor",  0xffffff);
            city_cb.setStyle("fontFamily",  "Arial");
            city_cb.setStyle("fontSize", 11);
            city_cb.setStyle("fontWeight",  "bold");
            city_cb.setStyle("color",  0x000000);
            city_cb.setStyle("embedFonts", true);
            var cb_cityListener = new  Object();
            var selectedCity = "0";
            cb_cityListener.change = function  (event_obj)
            {
                selectedCity =  event_obj.target.selectedItem.data;
            };
            city_cb.addEventListener("change",  cb_cityListener);

             

             

            city_cb.setStyle("embedFonts", true);   ---- this alone is enough ?

            This is the output i got.

            sample.JPG

            how to specify for text field & list ?

            • 3. Re: Combo box - skew ?
              kglad Adobe Community Professional & MVP

              that looks like a rotation.  if you want to skew it, use the matrix property of your combobox'es label and dropdown's transform property.

               

              and, you need a font in your library with linkage id = "Arial".

              1 person found this helpful
              • 4. Re: Combo box - skew ?
                sun_india Level 1

                can u tell me how to do it? through script...,


                • 5. Re: Combo box - skew ?
                  sun_india Level 1

                  city_cb.dropdown.embedFonts =  true;
                  city_cb.dropdown._rotation = -10;

                  city_cb.textField.embedFonts =  true;
                  city_cb.textField._rotation = -10;

                  drop.jpg

                  I got the first output with the above code.

                   

                   

                  And if i skew the combo box in stage i get the second output.(the heightof combo box  is increased)

                  How to use matrix property?

                   

                   

                  EDIT:

                   

                  Hey ! I got it, by adding the following

                   

                  city_cb.dropdown.embedFonts =  true;

                  city_cb.dropdown._rotation = -10;
                  city_cb._rotation = -10;

                   

                  Is it correct? What is matrix property?

                  • 6. Re: Combo box - skew ?
                    kglad Adobe Community Professional & MVP

                    you're not skewing anything.  you're rotating it.

                     

                    if you want to skew it use something like:

                     

                     

                    import flash.geom.Matrix;
                    var m:Matrix=new Matrix();
                    m.b = .5;
                    m.tx=city_cb.x;
                    m.ty=city_cb.y;

                     

                    city_cb.transform.matrix=m;
                    city_cb.dropdown.transform.matrix=m;

                    • 7. Re: Combo box - skew ?
                      sun_india Level 1

                      Thanks a lot.

                      • 8. Re: Combo box - skew ?
                        kglad Adobe Community Professional & MVP

                        you're welcome.