TAILIEUCHUNG - Using The LoadVars Class

Sử dụng The Class LoadVars Bạn sử dụng lớp LoadVars khi làm việc với dữ liệu ở định dạng chuỗi URL. lớp học này cho phép bạn tải dữ liệu biến từ một tập tin văn bản, hoặc để gửi và tải dữ liệu đến và từ biến một kịch bản phía máy chủ. Chú ý khi biến dữ liệu chứa trong một tập tin văn bản có thể được nạp vào Flash, Flash không thể lưu dữ liệu vào văn bản một tập tin trực tiếp, bạn phải sử dụng một kịch bản phía máy chủ để làm điều. | Using The LoadVars Class You use the LoadVars class when working with data in the URL string format. This class enables you to load variable data from a text file or to send and load variable data to and from a server-side script. NOTE While variable data contained in a text file can be loaded into Flash Flash cannot save data to a text file directly you must use a server-side script to do that. Creating a LoadVars object in Flash is simple. Look at the following example var container LoadVars new LoadVars This creates a new LoadVars object named container. To load variables from a URL into a LoadVars object use the load method http TIP You can get the total number of bytes loaded so far or the total bytes that will be loaded by using the getBytesLoaded and getBytesTotal methods of the LoadVars object. When data has been loaded into a LoadVars object you can access it by referencing the name of the particular LoadVars object that contains the data you want followed by the variable name of that piece of data. For example if you were to load the following string into a LoadVars object named myData name Jobe age 28 wife Kelly these variable values could be referenced as follows For example userAge Here userAge would have a value of 28. In the same manner a variable value in a LoadVars object can be set from within a script in Flash like this 45 A variable value inside a LoadVars object therefore can be set not only by loading external data into the object but by setting the value internally using a script inside the movie . NOTE When loading variables into a LoadVars object Flash will overwrite existing variable values in the object or append new variable values. If you want to send the variables in a LoadVars object to a server-side script for processing use the send method. That syntax is as follows myLoadVarsObjectsend http No response is

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.