ForumsProgramming ForumMovie Clip clicking

5 3299
Samurai7x
offline
Samurai7x
64 posts
Nomad

what is the code for clicking a movie clip and having it do something

  • 5 Replies
awesomeness132
offline
awesomeness132
35 posts
Nomad

on(release){

}

Samurai7x
offline
Samurai7x
64 posts
Nomad

thank you is that mouse?

Samurai7x
offline
Samurai7x
64 posts
Nomad

im also using as3

dank
offline
dank
983 posts
Peasant

You need to add what's called an event listener.

Basically what it does is waits for something to happen, then when it detects what you're looking for, it will call a function. In this case you'll be interested in the MouseEvent package.

For example:

stage.addEventListener(MouseEvent.MOUSE_DOWN, mDown);

And that calls:
function mDown(e:MouseEvent){
trace("You clicked the mouse!"
}

kevinseven11
offline
kevinseven11
36 posts
Nomad

dank doesnt tha e: right next to mouseevent mean event, if ur teachin him sumthin that simple maybe you shouldnt abrevate something, even tho it is proper saytnex

Showing 1-5 of 5