>
Flash and cascading style sheets (CSS)
Welcome, Guest

by pooja on Wednesday, 26 November 2008
Flash and cascading style sheets (CSS)


css or cascading style sheets are essential to create flexible and consistent text layouts, you can easily change color, size of weight from classes and the changes affect your whole site. CSS is well integrated for year in HTML now, in flash this feature is really new. Flash mx 2004 introduces cascading style sheets. This short aticle show you the code to assign a style sheet to text in flash. You just create your .css file like you do for an html site and use following code to attach the css to your textfield in flash.

//Create a new style sheet object

var myCSS = new TextField.StyleSheet();

//location of the CSS file.

var cssURL = "stylesheet.css";

//Load CSS file

myCSS.load(cssURL);

//define onLoad handler

myCSS.onLoad = function(success) {

if (success) {

// attach style to textfield

myText.styleSheet = myCSS;

myText.text = "MyText…”;

}

};

This is all you need to use CSS in flash. Smile


Topic Normal Flash Supported CSS Properties
by Sandeep Bhardwaj on 11/27/2008 16:53

CSS property ActionScript property Usage and supported values text-align textAlign Recognized values are left, center, right, and justify. font-size fontSize Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. text-decoration textDecoration Recognized values are none and underline. margin-left marginLeft Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. margin-right marginRight Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. font-weight fontWeight Recognized values are normal and bold. kerning kerning Recognized values are true and false. font-style fontStyle Recognized values are normal and italic. letter-spacing letterSpacing Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. text-indent textIndent Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. font-family fontFamily A comma-separated list of fonts to use, in descending order of desirability. Any font family name can be used. If you specify a generic font name, it is converted to an appropriate device font. The following font conversions are available: mono is converted to _typewriter, sans-serif is converted to _sans, and serif is converted to _serif. color color Only hexadecimal color values are supported. Named colors (such as blue) are not supported. Colors are written in the following format: #FF0000. display display Supported values are inline, block, and none.



Blogger Image
My Blog Title

Product Engineering, software engineering company, Product Development, Product Migration, Product Re-engineering, Product Maintenance, Product Testing Commercial Application Development, Business Software development, commercial software for startups, Application Support and Maintenance, software testing Product Maintenance, Outsource product maintenance, product support and maintenance Product Migration, Product Re-engineering, product re-engineering services Product Research, Product Engineering, UI Prototyping Services Software Testing Services, Quality Assurance services, professional software testers, Load Testing, Functional Testing, Cross Platform, Browser Testing, Test Automation, Testing Tools, software quality analysis Functional Testing Services, software quality analysis, Software Testing Services, Application Testing Services, Functional Testing Types Automated Testing, Automated Testing Services, automation testing, test script development, Automation Test Tools, outsource automation testing Load Testing, Performance Testing Services, Load Testing Tools Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering Benefits of IT Outsourcing, Offshore Software Development companies, offshore software development firms Outsource planning, IT outsourcing, IT development services, offshore IT companies, offshore software development Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering