TAILIEUCHUNG - Using Shared Objects

Đối tượng sử dụng chia sẻ tập tin SWF An có thể lưu dữ liệu (các biến cũng như mảng, XML, và các đối tượng dữ liệu khác) vào ổ cứng của người dùng bằng cách sử dụng chia sẻ các đối tượng, tương tự nhưng mạnh hơn các tập tin cookie được sử dụng bởi các trình duyệt Web. Bạn có thể sử dụng chia sẻ các đối tượng để lưu trữ thông tin được tạo ra bởi người sử dụng khi xem bộ phim tên. | Using Shared Objects An SWF file can save data variables as well as array XML and other data objects to a user s hard drive using shared objects similar to but more powerful than the cookies used by Web browsers. You can use shared objects to store information generated by the user while viewing your movie name last frame visited music preference and so on . Shared objects can be used by movies played in a Web browser as well as those turned into stand-alone projectors. You can use shared objects with any of the following for example LoadVariables LoadVariablesNum Importing a shared library The following is an example of a script you might use to create a shared object var myObject SharedObject stuff_I_saved If the shared object stuff_I_saved already exists on the user s hard drive its data is loaded instantly into myObject. If stuff_I_saved does not yet exist it s created and still referenced by myObject. In the latter case myObject would be empty that is it would contain no data. NOTE If used as just mentioned the getLocal method will create a shared object if none exists or will retrieve data from an existing shared object. As you can see from the previous syntax the shared object s name is actually stuff_I_saved however in ActionScript you can t reference the shared object directly using that name. Therefore a reference to the shared object is created using myObject. This means that whenever you reference myObject in a script you re actually referencing the shared object named stuff_I_saved a tricky concept but essential to understanding how ActionScript deals with shared objects. Data is saved to a shared object using the data property. Take a look at the following example This would save the userName variable and its value the text in the userName_txt text field in the shared object. You can save entire objects as well.

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.