General AS3 development projects will be placed on the web, which involves remote debugging.Steps①: Add website address:1: Right-click the Project-> Properties-> Open the project Properties panel:650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/85/28/wKioL1ebF9PQY_DGAAE-ZjFhqKM354.png-wh_500x0-wm_3 -wmp_4-s_2450848107.png "title=" 01.png "alt=" Wkiol1ebf9pqy_dgaae-zjfhqkm354.png-wh_50 "/>Edit the configuration as:650) this.width=650; "Src="
In the use of special characters in AS3, there will be errors, or the characters are not displayed, or show the wrong, this article to do a simple analysis, if there is better analysis, please keep abreast.
Sample.xml and Sample_cdata.xml are the XML files that need to be used in this example, please click to see their content, this example takes special characters
Since
CDATA used for text data that you do not want to be parsed by the XML parser
We will add the blur and diagonal angle filters to the image. All the animations are made with corner 3.0 and move your mouse over the image to see the effect. When you have mastered this, you will also be able to create other filter effects. Well, let's start with opening your flash.Set the environment:1. Create a new document with a size of 500x250.2. Import two images to the stage (about 200x200). You can import a square image and a garden image like me.3. Convert the two images to MC. Yo
("Allowscale", "false");
Compared to AS2, the AS3 is much simpler to implement.
Fullscreen
The code is as follows
Copy Code
Stage.displaystate =stagedisplaystate.full_screen
Click the Btn_gonormal button to exit the full screen
The code is as follows
Copy Code
Btn_gonormal.addeventlistener (Mouseevent.mouse_down,gonormal);function Gonormal (event:mouseevent): void{Stage.di
considered a match. Character set can only match one characterIn character sets, we can use the hyphen "-" to define a range. Three common character sets [A-Z], [a-z], [0-9]The role of the inverse sign (^) in the character set is to take the inverse character set in the square brackets. That is, the anti-symbol is used. As long as it is a character that does not conform to the character set description, it will match.Special characters to be escaped in the character set. We only need
The two-way linked list in the data structure is written as a class in AS3, which is very useful. Some non-program flasher may not understand the data structure. If you think of arrays as queues of data, the linked list queues hand in hand, but each person only knows himself and his/her front and back. If you use the idea of classes, you can understand the following: objects with three data attributes: 1. Oneself; 2. People behind oneself; 3. People b
Use AS3 to embed the SWF in your code and encounter error:unable to resolve '. /resources/lv1.swf ' for transcoding this problem, check that the code does not have a problem:public class Swfcontroller{[Embed (Source = ": /resources/lv0.swf ")] static private Var swf_0:class;[Embed (Source = ": /resources/lv1.swf ")] static private Var swf_1:class;[Embed (Source = ": /resources/lv02.swf ")] static private Var swf_2:class;[Embed (Source = ": /resources/
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
VaR
Str
=
Loaderinfo. Parameters [
"
True_name
"
];
Note: The parameter name is. SWF ?... Address
In fact, it is very simple. I used to use: xx.swf? Xx = 11 xxx = 22 ...... It is inconvenient to pass parameters to flash. Later I checked the param tag. Oh, it's too easy ~ I would like to share with you the following!
In the webpage, add a sentence under the Code:
mousefunction fn1 () {Trace ("1");} function fn2 () {Trace ("2");} ([Fn1,fn2][math.random ()*2>>0]) ();View CodeThis is a random execute function command.var a:int=3; if (a>0 (Trace ("A is positivenumber"),a1)Trace ( "A is positive oddnumber");View CodeFirst Execute a>0 TrueExecute trace again ("A is positive number")Finally judge A is not an odd numberThe comma expression here is executed from left to rightMainly used to determine if there are any statements executed.var a:int=+; var b:int=-;
indefinitely, which is tantamount to using a common public constructor. And we just need an instance of the MyClass type, so we should need a global variable to hold this unique instance, and then return this instance each time we call the getinstance () method instead of re-new. Just like this: Package {public class MyClass { private static var _instance:myclass; Public Function MyClass (enforcer:singletonenforcer) {} public static functi
As3,referenceerror:error #1056: Could not be created for XXattribute xxx.When the display object is associated with a script class, and the display object in the Display object is set to the name in the Properties panel, the Referenceerror:error #1056: Cannot create attribute xxx for XX. "Error. It is said on the web that defining a common attribute of the same name and type in a script class is not really necessary, just like this:In Flash9, the File
// Double-click the event to trigger the click event.
package {import com.greensock.TweenLite;import flash.display.DisplayObjectContainer;import flash.display.Sprite;import flash.events.MouseEvent;import flash.utils.getTimer;public class Test1 extends Sprite {private var _rect:Sprite;public function Test1() {trace("hello world");// this.stage.addEventListener(MouseEvent.CLICK, __onTraceClick);drawRect();_rect.addEventListener(MouseEvent.ROLL_OVER, __onOver);_rect.addEventListener(Mous
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.