Program | Programmer Implements, interface
This is an example of an interface.
Interface Pointinterface
{
function SetPoint ();
function Distance (p:tpoint): number;
}
Class Tpoint implements Pointinterface
{
function SetPoint ()
{
}
function Distance (p:tpoint): number
{
}
}
Static, dynamic
In general, only properties that already exist in a class can be manipulated through an interface. In dynamic, however, you can dynamically add a property to the class.
Defined
Dynamic class Tpoint
{
var _x:number;
var _y:number;}
Reference
var point:tpoint = new Tpoint ();
Point._z = 5; This won't be the lead to a compiler error and because the class is dynamic.
Public, private
Class Tpoint
{
private Var _x:number;
function GetX (): Number
{
return _x;
}
}
var point0:tpoint = new Tpoint ();
GET, set
A typical object-oriented approach, hehe.
Class Person
{
var Age:number;
function Get Birthyear (): Number
{
var year = new Date (). getFullYear ();
var birthyear = year-age;
return birthyear;
}
}
var Person1:person = new Person ();
Person1.age = 18;
Trace (person1.birthyear);
function set Birthyear (yr:number)
{
var year = new Date (). getFullYear ();
age = Year-yr;
}
var Person1:person = new Person ();
Person1.birthyear = 1975;
Trace (person1.age);
Import
var point:tpoint = new Folder.nestedfolder.TPoint ();
Import Folder.nestedfolder.TPoint;
var point:tpoint = new Tpoint ();
Import folder.nestedfolder.*;
Class Folder.nestedfolder.TPoint
{
}
Third, Commands Previously executed Third-party plug-ins, export SWF required, and then by Flash Import. Now commands can integrate the Third-party plug-ins directly into Flash, and can be directly reflected in the timeline. Some well-known third-party plug-ins, such as the production of font effects and stereo image software, will be integrated into the flash of a new version of the launch. Ordinary version of the commands temporarily Timeline effects, Timeline effects is to change the image blur, Drop Shadow, Expand, explode and so on. In addition, there are independent developers who can develop commands to flash, which equals plugin for Flash.
Four, behaviors Behaviors is the use of some written action script for people who do not know how to program, now you can quickly apply the action script through the panel without understanding the code, users can also create their own behaviors. Similar functionality is available in other products in the Micromedia series.
Five, Data Binding The program can only be associated with the performance data, all network services can be done through the SOAP protocol, you can use Flash remoting to achieve network services, but now you can use the Flash MX 2004 more simple data components to complete.
Data components are not visible to the user, you just have to validate external data sources (such as XML or network services) and provide some parameters, all connection processing, data interaction and parsing are done by the component. If you are familiar with the Firefly components of Macromedia, you will understand such things as connecting components, processing components and data sets (tools that describe and process data details). New ways to connect and manipulate data. Use Web services and XML components to connect to a data source to easily display data and manipulate data.
vi. new architecture of component programming The new architecture of component programming, called Macromedia Component Architecture, is implemented using ActionScript 2 to define the style and skin of the components by classes, and to control the appearance of the component. The purpose of the new architecture is to produce unified appearance and behaviors.
The group also provides Broadcaster/listener Event model,depth, focus management, accessibility coordination.
Seven, Form Based Can be similar to VB to use the Form object programming, this is a traditional application development moved to flash on the function, the past with timeline to define the different state of the time has passed, replaced by a form.
Viii. Collaborative work source management Making a slightly larger project will almost always form a team. Even if only one person works, the new project panel helps you manage all the project-related files. For the development team, you can check out and lock the files so that your team members will not be able to overwrite files with the same file name. The project panel uses the same structure as the Dreamweaver MX, which allows the project panel to be extended to version control tools. Use this panel to organize multiple-file relationships in your project and a set of source code management systems that work together to load and edit external action Script (Flash Project, which is *.FLP files) and JSFL files.
Source control functionality is required to develop larger projects.
ix. JSFL Order The code generated in the history panel uses the JavaScript Flash Language (JSFL) language to control the work area of Macromedia Flash. JSFL can complete repetitive or complex processes, almost any development work you normally do with your hands now you can record and replay them using a script. The history panel also uses the same language to record every step of your action.
Here is an example of a mask painted on the back of the stage. Seriously look, is very interesting, hehe.
var width=fl.getdocumentdom (). width;
var height=fl.getdocumentdom (). Height;
Fl.getdocumentdom (). Addnewrectangle ({left:-500, top:-500, right:width+500, bottom:height+500}, 0);
Fl.getdocumentdom (). Selectnone ();
Fl.getdocumentdom (). Setselectionrect ({left:0, top:0, Right:width, bottom:height});
Fl.getdocumentdom (). Deleteselection ();
You can run this code or other JSFL code from the Command menu. Just store the JSFL file and read it in Flash, or read the SWF that you have put into the flash environment. Now you can use code to control the file you open, in fact JFSL can, create, open and store Flash MX 2004 files, and even possibly boot and execute JSFL in unbound Macromedia Flash MX 2004. Although JSFL contains real commands that affect the workflow of Flash, you still have to open them often through the user interface, which is what XML is involved in the UI. This is a traditional way for you to define the input mechanism-the overall operation window.
10. Other As far as I can see, the Unicode encoding is supported in Flash MX 2004 (Oh, good news, free transcoding, no more worrying about not being able to display the local code). And in the Flash MX 2004 also support mobile phone and PDA development, the first half of the release of the handset manufacturers signed the cooperation agreement, Macromedia Action is really not slow.
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.