Danh mục

Foundation Flash CS5 For Designers- P15

Số trang: 50      Loại file: pdf      Dung lượng: 1,013.65 KB      Lượt xem: 22      Lượt tải: 0    
10.10.2023

Phí tải xuống: 7,000 VND Tải xuống file đầy đủ (50 trang) 0
Xem trước 5 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Foundation Flash CS5 For Designers- P15: Flash is one of the most engaging, innovative, and versatile technologies available-allowing the creation of anything from animated banners and simple cartoons to Rich Internet Applications, interactive videos, and dynamic user interfaces for web sites, kiosks, devices, or DVDs. The possibilities are endless, and now it just got better
Nội dung trích xuất từ tài liệu:
Foundation Flash CS5 For Designers- P15 CSSFigure 13-4. CSS styles pulled from an external CSS fileDouble-click your newly created StylingExternal.swf file to give it one last look. This is a bit likemaking sure the magician has nothing up either sleeve.Now, open the styles.css document and make a few changes. If you are not sure where to start, updatethe p and strong styles as follows:p { margin-left: 100; leading: 12;}strong { font-family: Impact; font-size: 40; color: #339966;}After you make your changes, save the CSS document. Then close StylingExternal.swf, anddouble-click it again to launch the SWF. Without republishing the SWF, you’ve updated its formatting (seeFigure 13-5). That’s no small feat!Hey, did you catch that something is missing? What happened to that hyperlink? The increased leading inthe p selector has pushed it off the stage! In fact, the phrase Broil to taste has also been shovedaside. No problem. All you need to do is to readjust the leading property or decrease the strongselector’s font-size property until everything fits. This sort of tweaking is what CSS was made for. We just love telling “war stories” to support what we are talking about. In this case, David Stiller, who was one of the coauthors in the CS4 version of this book, had recently completed a Flash-based training presentation for a U.S. government agency that featured more than 250 slides. At one point, David needed to change the color of one of the heading styles to a slightly different orange. He was able to make the change in a single CSS file. David tells us he is still smiling. 679 www.zshareall.com CHAPTER 13This book was purchased by flashfast1@gmail.com Figure 13-5. Look, ma—style changes without re-creating the SWF! Block element styling The authors spent a bit of time studying the tea leaves, and this is what we discovered: officially documented or not, the tags that support element selectors are all block elements, with the exception of the anchor tag (). In other words, the rule of thumb is that, if the tag carries with it a built-in line break, then an element selector will do the trick. The special case is hyperlinks, which we’ll cover in detail later in the chapter (hyperlinks are a special case in several ways). For your reference, let’s take a quick look at a “proof is in the pudding” sample file: 1. Open the ElementSelectors.fla file in this chapter’s Exercise folder. You’ll find a text field with the instance name styledContent. The ActionScript in the scripts layer shouldn’t be any trouble for you by now. A string of HTML is created, element selectors are defined and then assigned to a StyleSheet instance, and finally, the HTML is supplied to the text field. 2. Test the movie to see the result in Figure 13-6. The output may not look all that interesting, but it is, because it demonstrates a few additional “gotchas” while verifying the block element principle. 680 www.zshareall.com CSSFigure 13-6. Only block elements—and one exception, anchor tags—support element selectors. 3. Click into frame 1 of the scripts layer, and take a look at the ActionScript in the Actions panel.Each line of HTML ends in a break tag (), just to keep things visually neat. Every tag is given anelement selector that alternates its color between #0000FF (blue) and #00FF00 (green). In normal HTML,most of these lines would display as either blue or green ( contains no actual text, so it wouldn’t).In Flash, this holds ...

Tài liệu được xem nhiều:

Gợi ý tài liệu liên quan: