Learning the Adobe Flash shortcuts isn't necessarily essential, but certainly can come in handy!
Selection tool – shortcut key = v
Oval tool – shortcut key = o
Rectangle tool – shortcut key = r
Brush tool – shortcut key = b
Paint bucket tool – shortcut key = k
Convert to keyframe – shortcut key = F6
Convert to blank keyframe – shortcut key = F7
Clear keyframe – shortcut key = shift+F6
Test movie – shortcut key = Ctrl+Enter
Debug movie – shortcut key = Crtl+Shift+Enter
Test Scene – shortcut key = Ctrl+Alt+Enter
Actions – shortcut key = F9
Transform – shortcut key = Ctrl+T
Have this list somewhere nearby your computer, in no time you'll be able to use them off the top of your head.
Learn how to use Adobe Flash with all the free tutorials. Game Making, Animating, Cartoon Design, Web Design and much more...
Setting x and y co-ordinates
Defining a movieclip's position using only actionscript is essential. And can be used for so many different tasks, game making, website design, logo placement, title placement etc.
Draw out a shape or picture on the stage, make it moderate size and place it anywhere on the stage. Select the whole of the shape/picture you have drawn, right click on it, and convert it in to a movieclip.
In the properties box, give it an instance name of ‘myimage’, without the quotation marks.
Now right click on frame 1, on the first and only layer, and select ‘actions’.
Insert the following actionscript:
myimage.onEnterFrame = function() {
this._x = 253;
this._y = 178;
this._width = 55;
this._height = 55;
};
This tells Adobe Flash that when it enters the frame, the images x (horizontal) co-ordinates is to be set to 253, and its y (vertical)
co-ordinates is to be set to 178.
It also tells flash that the width and height of the image is to be set to 55. If you apply this to a simple shape like a square it should turn out perfect, but changing the width and height of something like a stick figure, will most like distort it. Unless you adjust the height and width settings until you have the desired effect. Obviously for a stick figure you would want the height to be greater than the width otherwise he will be one funny looking stick figure.
The current x and y co-ordinates will place the image in the center of the stage (providing the stage size is set to default). Now test the flash movie and the image will have those exact co-ordinates, height and width properties that were set in the actionscript.
How could something like this be applied to a game? Shooting or car game, when the player dies they are reset back to the set co-ordinates, RPG, when the player reaches a certain point in the game they are taken to new part of the game. The possiblities are endless. Play with the ideas and test them out. There is no exact line of actionscript that will make something happen, there are a number of different ways of writing completely different lines of actionscript, but still having the same effect.
Draw out a shape or picture on the stage, make it moderate size and place it anywhere on the stage. Select the whole of the shape/picture you have drawn, right click on it, and convert it in to a movieclip.
In the properties box, give it an instance name of ‘myimage’, without the quotation marks.
Now right click on frame 1, on the first and only layer, and select ‘actions’.
Insert the following actionscript:
myimage.onEnterFrame = function() {
this._x = 253;
this._y = 178;
this._width = 55;
this._height = 55;
};
This tells Adobe Flash that when it enters the frame, the images x (horizontal) co-ordinates is to be set to 253, and its y (vertical)
co-ordinates is to be set to 178.
It also tells flash that the width and height of the image is to be set to 55. If you apply this to a simple shape like a square it should turn out perfect, but changing the width and height of something like a stick figure, will most like distort it. Unless you adjust the height and width settings until you have the desired effect. Obviously for a stick figure you would want the height to be greater than the width otherwise he will be one funny looking stick figure.
The current x and y co-ordinates will place the image in the center of the stage (providing the stage size is set to default). Now test the flash movie and the image will have those exact co-ordinates, height and width properties that were set in the actionscript.
How could something like this be applied to a game? Shooting or car game, when the player dies they are reset back to the set co-ordinates, RPG, when the player reaches a certain point in the game they are taken to new part of the game. The possiblities are endless. Play with the ideas and test them out. There is no exact line of actionscript that will make something happen, there are a number of different ways of writing completely different lines of actionscript, but still having the same effect.
Learning actionscript
Learning actionscript can be really difficult, it's just like learning another languange, a languange that allows you to communicate with Adobe Flash and tell it what to do, when to do it and how to do it. This is one of the most important skills to learn for anyone wanting to develop their skills in game making, website design and interactive pages.
Actionscript is extremely precise, 100% to be exact, so you will need to become really familar with the languange, and this is obviously achieved through constant use of actionscript, trying different things, solving code errors. Learning to solve code errors is definately a really effective way of developing your skills. It doesn't matter in the slightest if you have to Google the solution, your job is to remember the mistake, and REMEMBER THE SOLUTION!
Get to know the basics, before progressing to more advanced actionscript you should at least know some of the most basic lines of actionscript. For example, a very common line that you will use very regularly:
'gotoAndPlay(2)' - This tells Adobe Flash that you want it to go to the
second keyframe on the timeline, and play. Timeline control is definately something you need to understand, and luckily, it is really easy to pick up. This line of code doesn't really achieve much though. To make this more detailed, you could make it,
'on (release) {gotoAndPlay(2)}' - This actionscript would work perfect
with a play button.
That may only be one line of actionscript,and a very simple line, but it's a start. And in no time you should be able to memorise that and use it regularly without even thinking about it. Of course you will eventually need to use much more sophisticated actionscript, but once you have mastered the basics, this won't seem so daunting. And these tutorials will ease you in to the process.
Summary: Begin to learn actionscript and remember it, you should never copy and past, the idea is learn to write your own code, the more you type in the actionscript, the quicker and easier you will learn to write your own code!
Quote: 'When you come across a problem, find the solution, and remember the solution!'
Actionscript is extremely precise, 100% to be exact, so you will need to become really familar with the languange, and this is obviously achieved through constant use of actionscript, trying different things, solving code errors. Learning to solve code errors is definately a really effective way of developing your skills. It doesn't matter in the slightest if you have to Google the solution, your job is to remember the mistake, and REMEMBER THE SOLUTION!
Get to know the basics, before progressing to more advanced actionscript you should at least know some of the most basic lines of actionscript. For example, a very common line that you will use very regularly:
'gotoAndPlay(2)' - This tells Adobe Flash that you want it to go to the
second keyframe on the timeline, and play. Timeline control is definately something you need to understand, and luckily, it is really easy to pick up. This line of code doesn't really achieve much though. To make this more detailed, you could make it,
'on (release) {gotoAndPlay(2)}' - This actionscript would work perfect
with a play button.
That may only be one line of actionscript,and a very simple line, but it's a start. And in no time you should be able to memorise that and use it regularly without even thinking about it. Of course you will eventually need to use much more sophisticated actionscript, but once you have mastered the basics, this won't seem so daunting. And these tutorials will ease you in to the process.
Summary: Begin to learn actionscript and remember it, you should never copy and past, the idea is learn to write your own code, the more you type in the actionscript, the quicker and easier you will learn to write your own code!
Quote: 'When you come across a problem, find the solution, and remember the solution!'
Subscribe to:
Posts (Atom)