ForumsProgramming Forum{AS2} THE MOUSE {AS2}

15 5447
Dannydaninja
offline
Dannydaninja
948 posts
Nomad

How to i make it that, if i click on a movieclip ( with the house ) it makes you go to a new room.

I know how to make other objects hit other objects to go to another room but how do i do it with the mouse!? Please help!

  • 15 Replies
Dannydaninja
offline
Dannydaninja
948 posts
Nomad

i'm not sure how to make things a button.

rjbman
offline
rjbman
215 posts
Nomad

If you select the movie clip and convert it, like komputerkurt recommends, you should still be able to alter the movie clip in AS. Meaning you can make it go to and play a frame of it.

But it sounds like you don't need a movie clip, so in library you can select the object you want and right click; then select properties. From there change it to button instead of movieclip. Then from there (assuming you have each room on a separate frame) you would go to the separate frame.

Dannydaninja
offline
Dannydaninja
948 posts
Nomad

Thanks is this the same with AS3?

rjbman
offline
rjbman
215 posts
Nomad

Oh, sry I meant AS3, not original AS... whoops.

For AS3, click buttons are:
[quote]
button.addEventListener(MouseEvent.CLICK, buttonclicked);
function buttonclicked(event:MouseEvent):void{
gotoAndPlay(2);
}

At least, I think that's it. I don't have Flash in front of me.

rynad27
offline
rynad27
4 posts
Nomad

For AS2
onClipEvent(mouseDown){
if (this.hitTest(_root._xmouse,_root._ymouse,true)){
_root.play()
}
this will make the timeline play.

Dannydaninja
offline
Dannydaninja
948 posts
Nomad

Thanks for the idea's guys!

Dannydaninja
offline
Dannydaninja
948 posts
Nomad

Thanks for the idea's but it's not working! help?

Dannydaninja
offline
Dannydaninja
948 posts
Nomad

Yes yes, i dont know what i'm doing wrong. So what do i send to you??

Dannydaninja
offline
Dannydaninja
948 posts
Nomad

bump

Dannydaninja
offline
Dannydaninja
948 posts
Nomad

Bump... again...

Showing 1-10 of 15