I have never studied the interaction between AS3 and JS, that is, SWF communication in html. Recently, I was forced to invest in it out of project requirements. I will also make a summary here.
I. The fastest way to pass values in HTML
When inserting SWF in HTML, you can add parameters, such:
Files/home.swf? Id = "21 ″
In AS3, you can receive
Var id: String = stage. loaderInfo. parameters ["id"]; this metho
Source: http://www.riafan.com/article.asp? Id = 84Fluorine's official help is to explain flex as3 (as3) and fluorine in amf0 and amf3 versions.. Net (hereinafter referred to.. Net). Here we will only introduce the amf3 version. The most convenient way to convert data types is to convert as3 custom objects to. Net Value objects.
1. Convert
At present, flash in all aspects of the application of more and more wide, and flash is not only focus on their own brilliant effect, but also need to exchange data with external programs to achieve more powerful functions, with the advent of AS3, Flash and external interaction of the way is increasingly simple and rationalized. Talk about the interaction of AS3 and background data here today (choose
onmouseover events of a movieclip instance in As2, no matter which operation you delete will return an "undefined ", if you set it to undefined (no delete operation is required), you will find that the cursor of the corresponding operation still appears for the object directly set to undefined, and the delete operation will not appear. I am often convinced that this is the case. When determining whether a standard is required, the player will check whether the definition of the onpress event ha
There are many new data types in the variable AS3. Some of these types are not previously present. The basic data types in AS3 are as follows:
Simple data type:
Boolean
Int
Null
Number
String
UInt
Undefined complex data types:
Object
Array
Date
Error
Function
Regexp
Xml
XMLList new data types are defined by classes, for example, Matrix (Flash.geom.Matrix)
Shape (Flash.display.Shape) urlrequest (flash.net
simple. Using it, new, and then commit (), to extend it, you just need to implement a normal command mode, and the valid code can only be a few lines. As an example, I've provided a simple task system in which the command pattern has the advantage of being the most expressive. This is also a substitution scheme for handling AS3 when there is no multithreading. A simple bitmap engine:Yes, although the same is addchild, but this way to add things, is t
There are four kinds of containers for objects in AS3: Array,object,vector,dictionary; others have mentioned several comparisons of CPU memory or speed in their blogs. The performance is not much worse, but for large projects, or for projects that need to be ported to mobile devices, the optimization is compelling.
First, choose the right type according to your needs.
Array, the general language has, here
Greenshock Tween Platform
Greenshock Tween is a powerful Tween class library that I use most often, and can be seen in detail in my previous presentation . But note that this class library is not free for commercial projects, there are many alternatives: Gtween,tweener and so on.
Bulk Loader
Bulk Loader solves the problem of loading of various kinds of files in AS3, and realizes the loading interface of all kinds of data types, which is simple to c
Public Function showtimer (){
Stage. scalemode = stagescalemode. no_scale;
Stage. align = stagealign. top_left;
Initmc ();
}
In as3, many new constants are added to replace strings. This brings us great convenience. For example, to limit the zoom mode of a video to a fixed sizeCodeIs
Stage. scalemode = "noscale ";
The value is a string, and there is no code prompt during input, so it is easy to lose errors (I often copy the string in the help
HP Code (test1.php):
This form of HTML code is not recommended:
The code is as follows
Copy Code
/*** The disadvantage of using this method is that there is no output after the output statement of the as value (the Echo statement below).* Workaround: You can add a variable to the end of the output statement, which is not required to be received in the AS3, for example:* echo "coun=". $country. " pro= ". $province." city=
In the recently developed Adobe Air Project, the front and back end of the communication protocol from XML, JSON to PROTOBUF, and finally choose the protobuf reason, mainly the front and back end maintenance PROTOBUF protocol on the line, but also can use the IDE to do some compile check. Now I can find the Protobuf AS3 Open Source Library, there are some problems: nested classes are not supported, generated code can not compile and so on. It took a l
As3 uses AMFPHP to communicate with PHP from: bbs.9ria.comthread-65836-1-1.html? First, let's talk about the specific configuration: PHP version: 5.2.5, apache: 2.2.11, (or WAMP2.2), amfphp: 1.9 (attachment already provided), and Windows XP. Note: different versions of amfphp may conflict with those of php. As3 uses AMFPHP to communicate with PHP
From: http://bbs.9ria.com/thread-65836-1-1.html
?
First, le
card problems. The GC timing is not controlled yet ......Trace memory remaining
In the test, there is indeed an infinite increase in memory in flash. The reason is unknown. I threw 0.5 million objects into an array. After destruction, the memory usage will be 1 MB (not if it is not thrown into the array), but the number is small, however, to reach the 50 million m memory, we need objects, which is usually hard to reach.
However, some people say that this is only the
1. Flex/Actionscript Math LibraryThe Flex/Actionscript Math Library (as3mathlib) is intended to provide a rudimentary numerical analysis toolkit for the Actionscript/Flex programming environment.
This library has just been converted from Actionscript 2 to Actionscript 3. It is not ready for general use.
2. ActionScript 3.0 library for several basic utilitiesThe corelib project is an ActionScript 3 Library that contains a number of classes and utilities for working with ActionScript 3. these incl
AS3 using amfphp to communicate with PHP
From: http://bbs.9ria.com/thread-65836-1-1.html
?
First, the specific configuration, PHP version: 5.2.5,apache:2.2.11, (or WAMP2.2), Amfphp : Version 1.9 (attachment provided), Windows XP system. Note: Different versions of amfphp will conflict with different versions of PHP. The specific detection method is: In the Web root directory after extracting amfphp, access to the url:http://localhost/amfphp/brows
After the transition from as2.0 to as3.0,Familiar with class usage.In fact, as2.0 transition mainly involves the event mechanism, displaying the list.------------------------------------------By reading help documentation,I have a deep understanding of as3.You can set the previous as2 ProjectIntegrated into as3.0.------------------------------------------As3 is the general trend,Because it is more powerful
Dynamically in AS3, you can use the stage class to dynamically modify the frame frequency of a movie.
The Stage object of the Stage class (Flash.display.Stage) is the stage for all Sprite and MovieClip and other components in the security sandbox. The frame frequency of a stage object can be any number from 0.01 to 1000. To modify the frame frequency, use the following code:
//change frame frequency to 12 frames per second (FPS)Stage.framerate = 1
Protobuf is a set of tools developed by Google for serialization of structural data, communication protocols, data storage, etc., with the advantages of language independence, platform independence and scalability.
When used for communication, as long as both sides of the communication use the Protocol code generated by PROTOBUF, they can be used to serialize data into binary data or parse it. It supports C + +, JAVA, and Python itself. After installing the
Variable (this article is not direct translation, the original text is as follows:)
In ActionScript 2, variables defined within a class ' s body were defined in the class ' s prototype object. This is a efficient means to handle variable definitions but it also meant that complex data types (such as Arrays) had A tendency to is "shared" among instances if not explicitly defined for instances the class within. This are no longer a problem with ActionScript 3. class variables defined in the class
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.