advanced Flex Application Development Building Rich Media X phần 5

đúng đắn của nội dung có thể được tạo ra với số lượng lớn tại bất kỳ thời gian trong ngày? Cũng giống như đánh giá là một cách để khai thác sự tương tác giữa người sử dụng tự nhiên với nội dung để giúp làm cho nó dễ dàng hơn cho | CHAPTER 7 Figure 7-15. Results of the search service product_id 11 product name Star Wars Saga DVD product-desc the only place to get the entire epic digitally remastered and on one DVD product_price aray totalproducts 2 offset 0 pag eSize 5 Upgrading the Flex application Now that you know the service is working you can move on to rewiring your Flex app to use your new service. For this you re going to create a clone of Chapter7_Exercise1 so open up Flex Builder and create a new Flex project using the same process as you did for the last project and entitle it Chapter7_Exercise2. There will be two enhancements to this version of the application. The first will be the addition of a form that will allow users to enter keywords to search the database for. The second will be a page indicator in the form of x-y of z. Once you have your application file open copy the finished code from the previous exercise and paste it into this file. This brings up a good point always reuse code whenever possible. And since this project is very similar to the last it s a prime candidate for this methodology. Just like before you want to add your interface elements to the stage before adding any more code. The simplest of the two enhancements is the page indicator. It will be nothing more than a Text component bound to a variable that will be set based on the current results. Ensure you re in code view and then insert the following code between the MXML markup for the two navigation buttons mx Text x 500 y 244 text pageText color 0xffffff Modularization With one of the design enhancements completed you could switch to design view and drag out a TextInput component and a Button component and be done with the visualization but this seems like an excellent opportunity to implement modularization. In this context the goal is to group similar application elements into their own component file. One benefit is that any interactions necessary with these elements is confined to this .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.