Project needs, start learning Flash_flash as

Source: Internet
Author: User
Project needs, start learning flash
A good memory is better than a bad pen, while learning to remember it. Look at my way to learn how long it will take to learn some simple programming, enough on the line, and there is not much energy to the "Buddha poop" to understand. ~_~
The grammar aspect, knew that it is similar with the JS quite early.
The array was first manipulated, basically all the same.
1,
Practice the application of the array;
var myarr=new Array ();
myarr[0]= "Language";
myarr[1]= "Mathematics";
Myarr[2]= "Chemistry";
var temp= "";
for (var i=0;i temp+=myarr[i];
}
Test.htmltext=temp;

Trace (temp);

Note the usage and meaning of trace [
statement, and in test mode, evaluates the expression and displays the results in the output panel.

Use this action to record programmatic comments or display messages in the output panel when you test a movie. You can use the expression parameter to check whether a condition exists, or to display a value in the output panel. The trace () action is similar to the alert function in JavaScript.

You can remove the trace () action from the exported SWF file by using the Omit Trace Actions command (Omit trace action) in the publish settings.

Remember these I think the trace function is sufficient.

Also found a bit different from JS
var i:number = 5;
Personally, I don't like this kind of writing,
In this way of writing, help is such an explanation drop!
Use a colon in your code (:) Specifies the data type for the variable. To specify a specific data type for an item, use the VAR keyword and the following colon syntax to specify its type, as shown in the following example:

Strictly specify the type of the variable or object
var mynum:number = 7;
var mydate:date = new Date ();
Strictly specify the type of the parameter
function welcome (firstname:string, Myage:number) {
}
Strictly specify the type of parameters and return values
function Square (Num:number): number {
var squared:number = num * num;
return squared;
}

You can declare the data type of an object based on the built-in classes (Button, Date, MovieClip, and so on) and the classes and interfaces that you create. A new object for the custom type Student is created in the following code fragment:

var firststudent:student = new Student ();


2, do not want to wait for the "Buddha-poo" carried out in the end
Then I learned the Custom function
function Test (s) {
Trace (s)
}
Call the custom function;
Test ("I am a heap of rubbish!") ");
Yes, it's that simple.
3, the use of Loadmovie () dynamic loading of pictures.
Don't say much, see an example to understand.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.