| By Colin Moock | Article Rating: |
|
| June 15, 2005 11:00 AM EDT | Reads: |
21,718 |
Normally you would be able to find more information in the Macromedia Flash documentation, but neither the CustomButton class nor the SimpleButton class are included in the current Macromedia Flash MX 2004 documentation. See also Nigel Pegg's blog post (In the preceding steps, we created the SimpleButton instance with code (via createClassObject()) because there is no SimpleButton visual component included in the Flash MX 2004 Components panel. It is theoretically possible to subclass SimpleButton and use the subclass to create a component that could be added to the Components panel, but doing so is outside the scope of this article. For information on creating components, see "Further Study," below.
The SimpleButton class is not the only alternative to the Button component. The CustomButton class can also be skinned with graphical movie clips. CustomButton offers the additional features of resizability and a text label. Note, however, that a CustomButton instance can be resized along one axis only - either horizontally or vertically. Accordingly, the CustomButton skin is structured much like the ProgressBar skin; it has two end caps for the edges of the button and a middle section that is stretched between the caps. You can use the SimpleButton skinning technique described above to skin a CustomButton instance. Of course, you'll have to use the CustomButton skin properties instead of the SimpleButton skin properties. For reference, here is a list of CustomButton's skin properties:
- falseUpSkinL
- falseUpSkinM
- falseUpSkinR
- falseDownSkinL
- falseDownSkinM
- falseDownSkinR
- falseOverSkinL
- falseOverSkinM
- falseOverSkinR
- trueUpSkinL
- trueUpSkinM
- trueUpSkinR
- trueDownSkinL
- trueDownSkinM
- trueDownSkinR
- trueOverSkinL
- trueOverSkinM
- trueOverSkinR
- falseDisabledSkinL
- falseDisabledSkinM
- falseDisabledSkinR
- trueDisabledSkinL
- trueDisabledSkinM
- trueDisabledSkinR
Note, however, that rather than relying on the above list of CustomButton skin properties you should always consult the actual source code for the CustomButton class to verify which skin properties it supports. Different versions of the class may support different properties. The source code also contains a brief description for each skin element. The source file for CustomButton is located here:
- Windows: \Program Files\Macromedia\Flash MX 2004\[LANGUAGE_CODE]\First Run\Classes\mx\controls\CustomButton.as
- Macintosh: HD/Applications/Macromedia Flash MX 2004/First Run/Classes/mx/controls/CustomButton.as
The SimpleButton class is not the only alternative to the Button component. The CustomButton class can also be skinned with graphical movie clips. CustomButton offers the additional features of resizability and a text label. Note, however, that a CustomButton instance can be resized along one axis only--either horizontally or vertically. Accordingly, the CustomButton skin is structured much like the ProgressBar skin; it has two end caps for the edges of the button and a middle section that is stretched between the caps. You can use the SimpleButton skinning technique described above to skin a CustomButton instance. Of course, you'll have to use the CustomButton skin properties instead of the SimpleButton skin properties. For reference, here is a list of CustomButton's skin properties:
- falseUpSkinL
- falseUpSkinM
- falseUpSkinR
- falseDownSkinL
- falseDownSkinM
- falseDownSkinR
- falseOverSkinL
- falseOverSkinM
- falseOverSkinR
- trueUpSkinL
- trueUpSkinM
- trueUpSkinR
- trueDownSkinL
- trueDownSkinM
- trueDownSkinR
- trueOverSkinL
- trueOverSkinM
- trueOverSkinR
- falseDisabledSkinL
- falseDisabledSkinM
- falseDisabledSkinR
- trueDisabledSkinL
- trueDisabledSkinM
- trueDisabledSkinR
Published June 15, 2005 Reads 21,718
Copyright © 2005 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Colin Moock
Colin Moock is an independent web guru with a passion for networked
creativity and expression. He is author of the world-renowned guides to
Flash programming, "ActionScript for Flash MX: The Definitive Guide" (O'Reilly
& Associates, 2003, 2001) and "Essential ActionScript 2.0" (O'Reilly &
Associates, 2004). A web professional since 1995, Moock runs one of the web's most venerable Flash developer sites, www.moock.org. He spends most of his
time pursuing his cardinal interest, multiuser application development, and
working on Unity, moock.org's complete commercial framework for creating and
deploying multiuser applications for Macromedia Flash.
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe Unveils LiveCycle Enterprise Suite 2 for Deployment in the Cloud
- Adobe Flex Developer Earns $100K in New York City
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Ph.D. in Twitter Anyone?
- Eolas Sues the Internet
- Adobe LiveCycle Enterprise Suite 2 for Cloud Computing
- Adobe Betas Target RIAs and Cloud Computing
- Special Report on the Emerging Cloud Computing Trend
- Adobe Cans Another 9% of its Workforce
- My Thoughts on Ulitzer
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Ulitzer Live! New Media Conference & Expo
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Cloud Executives Feature on Cloud Computing Expo Power Panel
- Software Flexibility in the Cloud - Part 4 of 5
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Is Microsoft as Free as Open Source?
- Adobe Reader Sued
- Adobe Unveils LiveCycle Enterprise Suite 2 for Deployment in the Cloud
- Where Are RIA Technologies Headed in 2008?
- Cover Story: How to Increase the Frame Rates of Your Flash Movies
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Your First Adobe Flex Application with a ColdFusion Backend
- Adobe Flex 2: Advanced DataGrid
- i-Technology Blog: Death-Knell For "Rich Media? Hardly!
- Adobe/Macromedia - Microsoft, Look Out!
- How To Create a Photo Slide Show ...
- Adobe Flex Interface Customization - Themes, Styles, Skins
- Personal Branding Checklist
- Has the Technology Bounceback Begun?
- "Real-World Flex" by Adobe's Christophe Coenraets




































