Mouse not working with MovieClip

Clicking not working in AS3? 
If you change your mouse to a movieclip by say using: Mouse.hide(); and then simply make the movieclip’s x and y equal to the mouse x and y (stage.mouseX & stage.MouseY) you will run into trouble if the point mouseX and mouseY are not clear. You will always be clicking on […]

Smooth MovieClip Key Control in AS3

In Flash Actionscript 3.0 it is not as simple as AS2 to create a smooth control of a movieclip’s movement. You may find the key engages, then pauses for half a second, then continues. This is no good for gaming. Also the basic KeyboardEvent.KEY_DOWN event listener will only handle one key at a time, so you can not […]

Move ship based on angle AS3

Imagine you are writing a game and you have a space ship that needs to move towards a target in a smooth fasion. It needs to turn towards the target, all the while moving forwards. The following is a function/method in a class used to control the movement of the ships in the game. The ships […]

Learning AS3

Actionscript 3.0 has been around for a while now and it is time I got my head around it. I purchased a book for this very purpose. Why purchase a book you might wonder when anything can be googled, from tutorials to samples?
I have found in recent years, that I can tackle just about any […]

Loop video in Flash AS2

If you want to loop a movie on your flash project, select the movie / video and in the action script box put:
/////////////////////////////
on(complete){
 this.autoRewind = true;
 this.play();
}
/////////////////////////////
This should just keep it running for ever.
Bookmark to:

Flash Actionscript Set Focus

If you want to set focus to a text input field / text area in Flash then use the following code:
stage.focus = myTextField;
Selection.setFocus(instanceName);
Bookmark to: