Foundation Flash CS5 For Designers- P15
Số trang: 50
Loại file: pdf
Dung lượng: 1,013.65 KB
Lượt xem: 24
Lượt tải: 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 ...
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ìm kiếm theo từ khóa liên quan:
tài liệu Flash CS3 thiết kế web hướng dẫn sử dụng photoshop thiết kế layout kĩ năng lập trình FlashTài liệu có liên quan:
-
Báo cáo thực tập: Đề tài thiết kế Web
77 trang 604 2 0 -
Đề thi thực hành môn Thiết kế Web - Trường Cao đẳng nghề Vĩnh Phúc
3 trang 301 2 0 -
MỘT SỐ ĐIỂM CẦN CHÚ Ý KHI THIẾT KẾ WEB
5 trang 118 0 0 -
GIÁO TRÌNH LẬP TRÌNH WEB_PHẦN 2_BÀI 3
3 trang 110 0 0 -
Thiết kế dàn trang nâng cao trong khám phá Adobe Indesign
340 trang 101 1 0 -
81 trang 93 0 0
-
Giáo trình Nhập môn thiết kế website
58 trang 89 0 0 -
Tài liệu giảng dạy Thiết kế giao diện Web - Trường CĐ Kinh tế - Kỹ thuật Vinatex TP. HCM
88 trang 79 0 0 -
112 trang 72 0 0
-
Hướng dân sử dụng Navicat để Create , Backup , Restore Database
7 trang 71 0 0