Flash Builder 4 and Flex 4 Bible- P9
Số trang: 50
Loại file: pdf
Dung lượng: 736.07 KB
Lượt xem: 21
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:
Flash Builder 4 and Flex 4 Bible- P9: When Macromedia first released Flash MX in 2002, the product was branded as the newway to build Rich Internet Applications (known by the acronym RIA). The term wasinvented at Macromedia to describe a new class of applications that would offer thebenefits of being connected to the Internet, including access to various types of Web-based services,but would solve many of the nagging issues that had been inherent in browser-based applicationssince the mid-1990s....
Nội dung trích xuất từ tài liệu:
Flash Builder 4 and Flex 4 Bible- P9 CHAPTERControllingAnimation andWorking with Dragand DropF lash Player was originally created as a platform for presenting anima- tion over the Web. Future Splash Animator, the original ancestor of IN THIS CHAPTER the Flash authoring environment and Flash Player, was a Java-based Declaring effects in MXMLsoftware product that was integrated into the browser in much the samemanner as Flash Player is today. Instantiating and playing effects with ActionScriptMillions of Flash developers worldwide create compelling content designedfor presentation in a Web application. Animation and related visual wizardry Using tweening and masking effectsis the most common goal, and the most common result, of documents devel-oped in the Flash authoring environment and distributed through Flash Using composite effectsPlayer. Implementing drag-and-dropAnimation in Flash depends largely on use of the timeline: a visual interface interfacesthat enables the developer to create animations frame by frame or through aprocess known as tweening. Flex application developers don’t have the time-line available to them. In fact, one of Macromedia’s most important motiva-tions in creating Flex was to free developers with a coding background fromhaving to work with the timeline at all. But a Flex application is still distrib-uted and viewed through Flash Player. So when it’s time to move objectsaround the screen, a Flex developer needs code-based approaches to make ithappen.In this chapter, I describe the use of effects to create animation in a Flexapplication. I also describe how to implement drag-and-drop interfaces tocreate an intuitive way to move data around an application.On the WebTo use the sample code for this chapter, import the chapter12.fxp Flexproject archive from the Web site files into your Flash Builder workspace. n 371Part II: Designing Flex Applications Using Effects An effect is an ActionScript class that defines changes in a visual component’s position, visibility, scaling, and other properties over a period of time. The Flex framework includes many pre-built effect classes that can be applied to visual components and played with explicit ActionScript state- ments or upon certain built-in effect triggers.New FeatureThe Flex 4 SDK includes a new set of effect classes that have the advantage of working on both Flex componentsand on primitive vector graphics defined with the new FXG syntax supported in MXML. These effect classes aremembers of the spark.effects package and can be used to animate both new Spark components and theolder MX components. The older effect classes, which are members of the mx.effects package, are stillincluded with the Flex 4 SDK. n Most pre-built effect classes in the Flex framework define changes to visual properties of control. The following new Spark effects cause changes to one or more of a visual component’s properties over a period of time: l Animate. Changes any arbitrary set of properties. l AnimateColor. Changes a color property from a starting to an ending color. l AnimateFilter. Changes properties of one of the filter classes defined in the spark. filters package, including DropShadowFilter, GlowFilter, BlurFilter, and ShaderFilter. l AnimateShaderTransition. Performs an animation between two bitmaps using a pixel-shader program based on Flash Player’s Pixel Bender technology. You can provide your own shader program or use one of those provided by this effect’s subclasses, CrossFade and Wipe. l AnimateTransform. Combines multiple transform animations, such as translation, scale and rotation, into a parallel effect. l CrossFade. Performs a crossfade between two components or graphics. This class is extended from AnimateShaderTransition and is designed to be used in transitions rather than played directly. l Fade. Changes the alpha property of a component to affect transparency. l Move. Changes the component’s x and y properties to modify the object’s relative position within its ...
Nội dung trích xuất từ tài liệu:
Flash Builder 4 and Flex 4 Bible- P9 CHAPTERControllingAnimation andWorking with Dragand DropF lash Player was originally created as a platform for presenting anima- tion over the Web. Future Splash Animator, the original ancestor of IN THIS CHAPTER the Flash authoring environment and Flash Player, was a Java-based Declaring effects in MXMLsoftware product that was integrated into the browser in much the samemanner as Flash Player is today. Instantiating and playing effects with ActionScriptMillions of Flash developers worldwide create compelling content designedfor presentation in a Web application. Animation and related visual wizardry Using tweening and masking effectsis the most common goal, and the most common result, of documents devel-oped in the Flash authoring environment and distributed through Flash Using composite effectsPlayer. Implementing drag-and-dropAnimation in Flash depends largely on use of the timeline: a visual interface interfacesthat enables the developer to create animations frame by frame or through aprocess known as tweening. Flex application developers don’t have the time-line available to them. In fact, one of Macromedia’s most important motiva-tions in creating Flex was to free developers with a coding background fromhaving to work with the timeline at all. But a Flex application is still distrib-uted and viewed through Flash Player. So when it’s time to move objectsaround the screen, a Flex developer needs code-based approaches to make ithappen.In this chapter, I describe the use of effects to create animation in a Flexapplication. I also describe how to implement drag-and-drop interfaces tocreate an intuitive way to move data around an application.On the WebTo use the sample code for this chapter, import the chapter12.fxp Flexproject archive from the Web site files into your Flash Builder workspace. n 371Part II: Designing Flex Applications Using Effects An effect is an ActionScript class that defines changes in a visual component’s position, visibility, scaling, and other properties over a period of time. The Flex framework includes many pre-built effect classes that can be applied to visual components and played with explicit ActionScript state- ments or upon certain built-in effect triggers.New FeatureThe Flex 4 SDK includes a new set of effect classes that have the advantage of working on both Flex componentsand on primitive vector graphics defined with the new FXG syntax supported in MXML. These effect classes aremembers of the spark.effects package and can be used to animate both new Spark components and theolder MX components. The older effect classes, which are members of the mx.effects package, are stillincluded with the Flex 4 SDK. n Most pre-built effect classes in the Flex framework define changes to visual properties of control. The following new Spark effects cause changes to one or more of a visual component’s properties over a period of time: l Animate. Changes any arbitrary set of properties. l AnimateColor. Changes a color property from a starting to an ending color. l AnimateFilter. Changes properties of one of the filter classes defined in the spark. filters package, including DropShadowFilter, GlowFilter, BlurFilter, and ShaderFilter. l AnimateShaderTransition. Performs an animation between two bitmaps using a pixel-shader program based on Flash Player’s Pixel Bender technology. You can provide your own shader program or use one of those provided by this effect’s subclasses, CrossFade and Wipe. l AnimateTransform. Combines multiple transform animations, such as translation, scale and rotation, into a parallel effect. l CrossFade. Performs a crossfade between two components or graphics. This class is extended from AnimateShaderTransition and is designed to be used in transitions rather than played directly. l Fade. Changes the alpha property of a component to affect transparency. l Move. Changes the component’s x and y properties to modify the object’s relative position within its ...
Tìm kiếm theo từ khóa liên quan:
thiết kế web giáo trình flash cơ bản kỹ năng cắt html photoshop căn bản giáo trình CS3Tà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 268 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 -
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