French translation of my previous tutorials
Thanks Patrick from France for translating my beginner’s AS 3 tutorial into French. You can view it here.
He has also translated my Fire tutorial.
betaruce.com
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
« Jul | ||||||
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Thanks Patrick from France for translating my beginner’s AS 3 tutorial into French. You can view it here.
He has also translated my Fire tutorial.
I find that many people want to make a fire effect with the new filters in Flash 8.
I have written a tutorial about my way of creating this effect. My way is quite simple and the effect is realistic enough, altho it maybe a bit CPU intensive. Anyway I hope this can be a useful one .
Basically you can use the same principal and write it in AS 3. If people think it is good and the response is good, I will write one in AS 3 later.
the original MovieClip.hitTest can detect collisoin of boundary box of 2 objects or collision of a point and an object. These 2 are now split into 2:
So this time the string you search will be highlighted by 2 filters. The boundary of the string is found by TextField.getCharBoundaries and then a GlowFilter and a DropShadowFilter are applied to the corresponding bitmap. I am sure there are more possible effects.
here's the example
source
This new feature is definitely one that many users had been looking forward to for ages. It returns a rectangle that is the bounding box of a character.
How to use it?
Syntax:
First you have to get the position of a character in a string. e.g. "FLASH", then "F" corresponds to 0, "L" corresponds to 1, etc. This is the parameter charIndex. You will get back the rectangle that bound the character at the location charIndex.
Read livedocs for more details.
Here's an example. Search for sth and the match will be highlighted. The yellow highlighting patch is drawn by the drawing API. Get the source here.
However there are some limitations or skills in using this new method....
(more...)
This may look strange at the first sight. Actually this new keyword allows function to accept any number of arguments.
The arguments need to be separated by comma, and they will be stored into the array named "rest". It is not a must to name it "rest". You can use whatever names, just make sure you do not use other AS keywords.
You can also use with other predefined parameters, and ...rest need to be the last parameter specified.
...rest is recommended instead of the arguments object. They are very similar, but the new ...rest do not have functionality like arguments.callee.
This maybe the question in many users mind when they first touch AS 3 and Flash 9 Alpha. Can I code in the old way instead of typing those OOP stuff?
The answer is YES. So when should I use it as a scripting language and when as an OOP project? And is there an example of coding in the scripting-language-style?
You may find the answer here: http://as3.betaruce.com/tut/appendix/app_1/app_1.html
----------------------------------------------
AS 3 tutorial by betaruce
http://as3.betaruce.com/tut/
I would like to thank Katsunori Nagai (http://www.himco.jp/articles.cfm) from Japan for translating my tutorials into Japanese. I know that there are many Flash user from Japan visiting this site and I hope the translation will help
Here is the link to the Japanese version: http://www.himco.jp/articles/pdf/AS3Tut.swf
I have been quite busy recently but I have not stopped writing the tutorials. If you have any suggestions you may leave a message here
http://as3.betaruce.com/tut/tut_4/tut_4.html
I will talk more on events e.g. how to use double click. I will also talk about how to use imported image in Flash when there is no more things like attachMovie.
--------------------------------------------------
Access all the tutorials here:
http://as3.betaruce.com/tut/
Here comes tutorial 3 - Make things move and interact with Events. This tells you how to make objects respond to events.
http://as3.betaruce.com/tut/tut_3/tut_3.html
I have also grouped my tutorials in a simple website for faster reference.
I hope my tutorials can help you guys to start coding AS 3. Everyone is new to AS 3 and maybe professionals only have several months more experience in it than you do. Feel free to leave a comment if you have any problems or suggestions and we may discuss together