Foundation Flash CS4 for Designers- P21

Foundation Flash CS4 for Designers- P21: I can remember the day as clear as if it were just yesterday. I was walking by my boss’s office late one winter afternoon at the college where I teach, and he called me into his office. Sitting on his desk was a thin, white box with some sort of weird swirl on it. He slid the box across to me and asked, “You know anything about Flash?” | CHAPTER 14 14. To simulate image downloads so you can see the progress bar in action select View Simulate Download from the SWF s File menu. If you like compare your work with the file in the Complete folder. Extending the tour As it turns out wandering through the 798 Art District of Beijing makes a decent metaphor for this exercise because after all of this careful examination of the art in the galleries we re about to uncover a treasure in a gallery just a few more paces up the street. Save your file to keep everything safe. Now select File Save As and save a copy as into the same folder. Click back into frame 1 of the scripts layer to make a few changes. Here s the first chunk of code which replaces the hard-wired images with revisions shown in bold. import var xmlDoc XML new XML var xmlLoader URLLoader new URLLoader var xmlReq URLRequest new URLRequest xmlReq xmlCompleteHandler function xmlCompleteHandler evt Event void xmlDoc XML new DataProvider xmlDoc changePicture o The imageData array is gone completely. In its place stands our trusty XML loading formula. The only differences here are the variable names. The URLLoader instance for example has been changed to xmlLoader because loader is already in use as the instance name for the UILoader component. In the same way the URLRequest instance is named xmlReq because req is used later in the code and the XML s completeHandler function is named xmlCompleteHandler . This time we re loading the file and that s where the former imageData content now resides. Translated into XML it looks like this slideshow slide label 798 Art District Photo 1 data caption Lazy day on the street. slide label 798 Art District Photo 2 data caption Wall art. slide label 798 Art District Photo 3 data caption Angry and cute. slide .

Không thể tạo bản xem trước, hãy bấm tải xuống
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.