|
|
|
| Author Details |
|---|
| All Tutorials by kirupa | Home page URL is http://www.kirupa.com |
[First Page] [Prev] 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 [Next] [Last Page]
|
|---|
Var Declaration
This is not a very important issue for small movies, but it is a good thing to think about it.
| | Hits:111 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-04-11 Rate It | Error | Review | | | Category: Home > Flash |
|
|
|---|
Variable Scope
One of the first problems programmers encountered when switching from Flash 5 to Flash MX was the variables scope.
| | Hits:106 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-04-11 Rate It | Error | Review | | | Category: Home > Flash |
|
|
|---|
Relative Addressing
We have talked already about scope issues and addressing. They're tricky. Well there's very particular issue I want to talk to you about: the use of _root.
| | Hits:119 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-04-11 Rate It | Error | Review | | | Category: Home > Flash |
|
|
|---|
_root, _parent, and this
_root is an alias, just as _parent and this.
root, _parent, and this
by ilyas usal
_root
_root is an alias, just as _parent and this. It is used to access the root of the current level. For instance, if you write this in the first frame of your movie:
MovieClip.prototype.whichRoot = function () {trace (_root);}
_root.createEmptyMovieClip("firstClip",1);
firstClip.createEmptyMovieClip("secondClip",1);
firstClip.secondClip.whichRoot();
// returns _level0
Quite normal, since the default level is 0. But if you load a movie in _level1, and if that movie is referring to _root, it will mean _level1. So be careful about that: to access the _root of the master movie from the loaded movie, you have to write:
| | Hits:129 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-04-11 Rate It | Error | Review | | | Category: Home > Flash |
|
|
|---|
Incrementation or Decrementation
First: what does increment mean? When I say that I increment a value by 1, it only means that I add 1 to this value. There are several ways I can do that.
| | Hits:113 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-04-11 Rate It | Error | Review | | | Category: Home > Flash |
|
|
|---|
Getting an Index Position from an Array
There are several times when I found it helpful to get the position of an item contained in an array.
| | Hits:101 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-04-11 Rate It | Error | Review | | | Category: Home > Flash |
|
|
|---|
Array Duplication Made Easy
To make a duplicate of an array proves more difficult than it seems.
| | Hits:107 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-04-11 Rate It | Error | Review | | | Category: Home > Flash |
|
|
|---|
Tertiary Operator
This operator is also used to shorten if tests. It is used in the case that: if something is true, then 1 (or 0) thing happens, otherwise 1 (or 0) thing happens.
| | Hits:121 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-04-11 Rate It | Error | Review | | | Category: Home > Flash |
|
|
|---|
Color Object
What the color object does is allows you ways to apply color and alpha effects to movieclip objects much in the sense of a filter.
| | Hits:112 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-04-11 Rate It | Error | Review | | | Category: Home > Flash |
|
|
|---|
The Drawing API
Using the drawing API is not the easiest thing in the world, but once you get the hang of it, you can produce very easily lots of cool all-code movies.
| | Hits:131 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-04-11 Rate It | Error | Review | | | Category: Home > Flash |
|
|
|
|
|
|
|
|