Foundation Flash CS5 For Designers- P15
Thông tin tài liệu:
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 FlashGợi ý tài liệu liên quan:
-
Báo cáo thực tập: Đề tài thiết kế Web
77 trang 568 2 0 -
Đề thi thực hành môn Thiết kế Web - Trường Cao đẳng nghề Vĩnh Phúc
3 trang 267 2 0 -
MỘT SỐ ĐIỂM CẦN CHÚ Ý KHI THIẾT KẾ WEB
5 trang 113 0 0 -
GIÁO TRÌNH LẬP TRÌNH WEB_PHẦN 2_BÀI 3
3 trang 103 0 0 -
Giáo trình Nhập môn thiết kế website
58 trang 83 0 0 -
Thiết kế dàn trang nâng cao trong khám phá Adobe Indesign
340 trang 76 1 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 72 0 0 -
81 trang 68 0 0
-
112 trang 64 0 0
-
Hướng dân sử dụng Navicat để Create , Backup , Restore Database
7 trang 63 0 0 -
Giáo trình môn Kỹ thuật vi điều khiển: Thiết kế web và vi điều khiển - Chương 2
39 trang 59 0 0 -
Hiệu ứng Photoshop và hướng dẫn sử dụng bộ lọc: Phần 2
198 trang 52 0 0 -
0 trang 46 0 0
-
GIÁO TRÌNH THIẾT KẾ WEB: TỰ HỌC MACROMEDIA FLASH 5.0
18 trang 40 0 0 -
giáo trình html và thiết kế web: phần 2 - Đh công nghệ
119 trang 39 0 0 -
Bài giảng Thiết kế và lập trình Web - Bài 5: PHP cơ bản
137 trang 38 0 0 -
111 trang 38 1 0
-
Bài giảng Lập trình Web ASP.Net với C#: Chương 6 - Th.S Phạm Đào Minh Vũ
31 trang 34 0 0 -
Bài giảng môn Thiết kế web - Phần 2: Ngôn ngữ kịch bản JavaScript
29 trang 33 0 0 -
Giáo trình Thiết kế Web - Thạc Bình Cường, Vũ Thị Hậu
249 trang 33 0 0