Basically what this flash actionscript tutorial will do is to let you see how to catch the mouse is moving, movie down and mouse up events, and just telling you in a text field, as you can test below.
where mc is the instance name of the movieclip you want to tween, property is the property to be tweened, tweentype is any combination from the list below, startvalue is the starting value of the property and endvalue is its ending value. nsecs/nframes is the number of seconds over which the tween will last if the next parameter is set to true, or the number of frames over which it will last if the next parameter is set to false.
Event properties of movieclips can be assigned values, like any property of any class. The type of value to be assigned is a function. It can either be an unnamed function, or a named function that has already been set up. We've seen examples in previous pages of the onRelease property being assigned a function to make the movieclip cause something to happen when it is clicked. The generic form of event property assignments, using the onRelease property as an example, is:
i tried using this script
keyCode: Every keyboard button has a numerical key code value. You don't need to remember them of course. For example, use this movie to find the key's corresponding value.
1. Draw a rectangle and convert it into a movie clip (press F8).
First of all, open up your application and in the first frame we are going to make the sound object that will be played.
First we need our logo to listen for the mouse over and mouse out events we do this by first giving our logo an event listener which will make it come active if you like. Inside the parameters we declare what type event we want it to listen for in this case we need a MouseEvent so we type MouseEvent allowing us to access the MouseEvent class. Then we declare what kind of MouseEvent is needed, we give them MOUSE_OVER and MOUSE_OUT respectively and finally we give both a unique name of our choice in this case we have used onHover and onOut.
Let's go through the code;
Most of us want to know what is going on in the world or in our local area, for that we look to newspapers, the television and the web to inform us what is happening. The news consists of a collection of ?events? that have occurred recently, they are labelled 'events' because they are important moments in time that other people want or need to know about.
Alrighty, now as usual here???s the explanation of the above code. Pay attention:
And that will create the same exact previous result. However, we can now reuse this listener function for more than one object without fear of breaking the code because of the smart reference to our event target:
Event propagation is the continuance of an event from one instance to its parent or a child when the event applies to both. With propagation in event capturing, clicking on a child movie clip would invoke onPress first for the child's parent movie clip followed by the child itself. The parent is first to "capture" the event. When done, the parent "propagates" that event down to each child to which the event also applies.
You can still use the old Flash 5 Event model in Flash MX for the sake of backwards compatibility, it is not officially deprecated by Macromedia, but in my opinion you should consider it to be. There are absolutely no advantages that can be gained from using the old event model.
In the following tutorial you will learn to : - attach movie clips dynamically on the stage using a loop and the attachMovie method - use the  syntax to dynamically assign properties to movie clips - assign events to movie clips dynamically.
You will notice that in the second movie the animation is a lot smoother when you drag the spheres. How does it works ? Without updateAfterEvent the only way to smoothen a jerky animation running in 12 frames per second is to raise the frame rate of the movie, this has been done and will still be done by numerous Flash developers and designers. But the smart way is to use updateAfterEvent which force the screen to refresh independently on the frame rate instead of refreshing it at every frame. As you can see in the definition given in the Actionscript 2.0 language reference updateAfterEvent does work with the onMouseMove listener. Here is the code for both movies
If you run this Flash Movie, you will notice that you have a new mouse cursor moving with your mouse. However depending upon your framerate it can be quite choppy and will appear to lag behind. Just for the sake of this example set your framerate to 12 fps, you will now notice the lag for sure. This lag occurs, because the code that set's the position of the movieclip executes whenever the mouse moves, but the stage only re-renders itself 12 times every second. We need the stage to re-render itself and update the position of our movieclip visually on the stage, everytime the mouse is moved. updateAfterEvent to the rescue: