To find the best solution for web development, you can try flex3. We recommend that you try it all. Official Eclipse plug-in: plugin. As a simple example, server technology is not checked. This step is a little tricky. In fact, I just want to write a demo and there is no need to use the server. Complete the information. The goal is to compile flexdemo. mxml.
<? XML version = "1.0" encoding = "UTF-8"?> <Mx: Application xmlns: MX = "http://www.adobe.com/2006/mxml" layout = "absolute" creationcomplete = "onLoad ();"> <mx: SCRIPT> <! [CDATA [import MX. controls. alert; import flash. external. * Public Function onload (): void {alert. show ("Hello World") ;}]]> </MX: SCRIPT> <mx: button label = "Call JavaScript alert" Click = "externalinterface. call ('alert ', 'Hello World'); "x =" 120 "Y =" 171 "/> </MX: Application>
Creationcomplete is equivalent to the onload event in Javascript, and click is equivalent to onclick. By the way, we have observed that there is no on event here. It is a verb. For example, the click event we see is a click event, layout = "absolute" should be absolute positioning.
Why <! [CDATA []> because the. mxml file is an XML file, the script contains special characters that cannot be recognized by XML, so you must use them <! [CDATA []> if you don't talk about anything else, you can guess what they mean by name.
I think it is similar to writing Javascript. Here I have written two examples: one is to call flex's msgbox and the other is to call JavaScript's msgbox. Literally, calling Javascript is an external call to call external, the import method here is the same as the import method in Java, that is, the method definition is a little unacceptable, and the return type is written in the following code: If it is the same as Java, it will be harmonious.
Even HTML has a graphic designer. Of course, you need to add an image to show the workspace in the design mode.
HoweverProgramIt may take K... maybe I won't use it. It should be compressed.
Example address
Http://www.flashempire.com/myfe/upload/flash/166/1651500_1215941762.swf