TAILIEUCHUNG - Foundation Flash CS5 For Designers- P16

Foundation Flash CS5 For Designers- P16: 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 | BUILDING STUFF hugging the left edge of SeekBar. As it is however the numbers are easy. To coordinate its movements with SeekBar all SeekKnob has to do is know SeekBar s horizontal position and take into consideration SeekBar s width . To position the knob along the bar s left edge all you need to do set its property to the bar s property. To slide it halfway across set the knob s x property to the x property of the bar plus half of the bar s width. To shove it all the way over set its x property to bar s plus the full width of the bar. Keep this principle in mind as we work through the seek slider ActionScript. To begin copy another one of the commented code block headers and paste it below the last bit of ActionScript nextHandler from the Buttons section . Change the header s caption to Seek slider and then type in the following ActionScript so that your code looks like this Seek slider prep true events seekStartDrag Like the Prev Play Pause and Next movie clip buttons the seekKnob instance needs to have its buttonMode property set to true. When the user clicks it you want the user to be able to start dragging that knob so the event is associated with a custom function you re about to write called seekStartDrag . That function is triggered when the user clicks the mouse MOUSE_DOWN on the seekKnob instance. Type the following new ActionScript function seekStartDrag evt MouseEvent void if song null pauseSong rect new Rectangle 0 true rect seekStopDrag If the song instance isn t null for example it s null before a song is chosen from the combo box then pause the song in case it s playing. Next define a Rectangle instance stored in the rect variable which will be used to constrain dragging to the desired location. Rectangle instances .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.