Developing web games with flash will inevitably deal with various art resources. For static resources, there are various images. For dynamic resources, you can consider making SWF directly. The art resources produced into SWF can be divided into two
Ado|stream Upload a picture or display SWF when you want to get its height and width
The basic principle is to use ADODB.stream to read binary files and then parse them, and then return an array
The first element is type (BMP JPG PNG GIF SWF)
The
BMP format
BMP is short for bitmap. It is a standard image file format in windows and can be supported by multiple Windows applications. With the popularity of the Windows operating system and the development of a wide range of Windows applications,
' Get picture width and height of class, support Jpg,gif,png,bmp 'Class Imgwhinfo Dim ASOPrivate Sub Class_InitializeSet aso=server.createobject ("ADODB. Stream ")ASO. Mode=3ASO. Type=1ASO. OpenEnd SubPrivate Sub Class_TerminateErr.ClearSet
For external resources such as image loading in as3, I usually use two methods: loader and embed. Their respective features are summarized as follows: Embed: resources are embedded in the Flash compilation phase, that is to say, image resources will
Class imgwhinfo '': class for retrieving image width and height. jpg, GIF, PNG, and BMP are supported.
Dim Aso
Private sub class_initialize
Set Aso = server. Createobject ("ADODB. Stream ")
Aso. mode = 3
Aso. type = 1
Aso. Open
End sub
Private sub
How to convert Flash to exe file
With a small software Winafp (download address: http://www.skycn.com/soft/7101.html) can be easily completed. Besides the function of flash playback, it also has the function of exchanging SWF file and exe file.
30. Q: How can I optimize Flash animation to make files smaller and smoother? A: Flash is a professional software developed by Macromedia for webpage production and animation creation. It is easy to operate and has functions.Powerful and has become
In general, there are two distinct types of image formats: lossy compression and lossless compression.
1. lossy compressionlossy compression reduces the amount of space the image occupies in memory and disk, and when viewed on the screen, it does
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.