开发者

some basic question about actionscript

From my previouse two post:

1) create a page which contain a flash can be add text dynamiclly

2) make an element full screen in the web page

I found that I have to learn the actionscript to reach my requirement. However I have NEVER did the flash dev,and after googling I do not have a clear understanding of actionscript.

So I want to know some basic concepts:

1)what's the runtime environment of as?

We know the javascript run within the browser,but how about the as?

2)how about the run mechanism ?

For js,the browser download the xx.js to local,and run it.

How about the as?

Since I have download an actionscript example: but I do not find any xx.as,and just the xx.swf,and xx.fla,so is the xx.fla equal to the xx.js?

3)Should the actionscript be complied?

For js,answer is no. Everyone can see the source codes of the xx.js,but when I try to open the xx.fla with a text editor,I found it is a binary file.

4)ho开发者_如何学Gow to get started with actionscript,I mean the dev environment.

For javascript,I need nothing,just learn the js Syntax,then open my favoriate text eidtor,then I can write a xx.js,and run it.

But how about the actionscript? Since from google I heard people said the flex sdk is needed,I am not sure about their realationship.

Also,Do I have to learn how to create the flash - xx.swf? what's the realationship between the actionscript and the flash file? Any populate tool?

I am really confused by the above question,I wonder if you guys can do me a favor.


Here's my attempt:

1) what's the runtime environment of as? The Flash plugin loads swf's, swf's are binary / compiled actionscript

2) how about the run mechanism ? Download to browser and run - it can communicate externally with services just like JS - load, send, POST, etc

3) How about the as? The FLA is a shell in which you CAN write your actionscript. It's proprietary to Adobe's Flash IDE software. You can write and compile actionscript though in a variety of ways. Adobe's Flash Builder doesn't use an FLA, open-source FlashDevelop uses the open-source Flex SDK to compile it's actionscript. FDT is a similar tool, but not open-source (or free) that compiles actionscript. All of these either compile actionscript to a SWF, an Adobe AIR app, or can be cross-compiled to a variety of other platforms (like Android, iOS, etc).

4) Should the actionscript be complied? Not SHOULD, but HAS to be. You cannot run a raw .as file - it's just a text file with actionscript code in it.

5) how to get started with actionscript,I mean the dev environment. You can download FlashDevelop and Eclipse if you want a free method to start development. You can also download a 60-day trial of Flash CS5 or Flash Builder to see what their tools offer.

6) But how about the actionscript? Since from google I heard people said the flex sdk is needed,I am not sure about their realationship. Flex is similar to Flash in that they both use actionscript, yet Flex is aimed more at application development whereas Flash somewhat leans towards web-only stuff, which may or may not have animations as part of the end result. These lines are VERY fuzzy though, as you can create almost any type of actionscript project in either one. Flex has a slightly different approach to the language, in that you end up writing an MXML file, whereas Flash uses an FLA file which has library assets that you can use, a timeline for animations / organization, and a stage on which to display it all.

7) Also,Do I have to learn how to create the flash - xx.swf? what's the realationship between the actionscript and the flash file? Any populate tool? You write your code in actionscript, then your tool compiles the end result (a swf, an AIR app, etc). The Flash IDE is the most popular tool, as well as Flash Builder, FlashDevelop, FDT, etc.


flash file (.swf) not (.fla) can be run in webpage by the help of flash player browser plugin.

when you write code for swf file in browser it initialises the flash player plugin and fetch that swf file to that. Then it displays runs the swf file code on it ans displays the output in web browser.

1.) run time: flash player
2.) swf file contains the compiled code for flash player which will make it run.
3.) fla file are flash source file that can be opened using Adobe flash software. It has IDE and stag for animation and code writing 4.) i dont know any other ide for flash fla file other than adobe flash and swish. They both have ide for writing "AS".


Actionscript is used within flash, either with an .fla created using Adobe's software or using the Flex SDK, which can be downloaded for free.

With the Flex SDK, you will also need at least a text editor to create your .as and .mxml files. The code then has to be compiled into a swf, which the SDK includes. There are programs available that facilitate using the Flex SDK such as Adobe Flash Builder and FlashDevelop.


regarding the runtime environment...

The most frequent use has been as swf files that are handled by the flash plugin in different browsers. But we're now seeing a lot more flash content outside of the browser. In addition the the browser plugin and the standalone player, use of AIR is becoming prevalent. Compiling for AIR allows flash a few more features, like handling files on your computer, which you otherwise could not. Additionally, most of the new mobile devices, ( with the exception of one brand rhymes with snapple) can run AIR content targeted for mobile platforms.

somewhat off topic... you might be interested in looking at haxe. This is a separate language that compiles into other languages, so you can code in haxe, and have it compile into actionscript, javascript, php and a few more. Upside is that the as3 code generated from the haxe compiler usually displays better performance, but the trade off is that there are fewer resources (higher entry barrier)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜