|
|
|
| Author Details |
|---|
| All Tutorials by free-webmaster-resource |
1
|
|---|
Moving and rotating a rocket spaceship with button symbols
This entry-level tutorial will show you how to make button symbols and create ActionScript that will enable movement and rotation of a rocket movie clip with those same buttons. Dive in! The tutorial is very detailed and descriptive, so it is perfectly suited for beginners.
Functions are an essential part of any coding language and thus also in Flash Actionscript. They are very useful too and after you learn to use them you won't ever want to go back to not knowing about em. Functions sound like some StarTrek word that can mean a lot, but it isnt that hard to understand. Functions are like little engines that we can feed some data and the code inside the function will run when we actually trigger that function.
You create a function thisway:
functionName = function(value1,value2,etc,){
//CODE TO EXECUTE(like an engine)
}//closes the function
To call this function and thus feed that little engine you do this:
functionName(1,2,whatever);
That would trigger the function called functionName and plugs in 3 pieces of data which can be used in that function. You dont have to feed it data, but often thats what makes the function so cool, you feed it some data and you get the result returned to you. You could write some sort of routine like adding one variable to another only once and just include your function in your new document. Then you would immediately enable to use that function in other Flash files you might create.
Dont worry if this already sounds confusing because ill give you an example right now to clear this up.
| | Hits:542 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-04-11 Rate It | Error | Review | | | Category: Home > Flash |
|
|
|
|
|
|
|
|