Right click is it possible

What I wanna do is detect if the user has right clicked within a movie and if so get the coordinates and load a movie at that coordinate. What I am trying to mimic is the right click menu. Like what you see if you right click a IE window. If it is possible someone pleez help.

Key.isDown(2) is true when you right click, just test for that and display the menu then

how do I implement that in a on keypress event?? Could you give a real quick example??.. Also do you have an idea of how would I disply a menu where the right click occured??

by the way thanls for the speedy reply

:bump: you guys post fast.

bump:*(


this.createEmptyMovieClip("rightClickDetect",-1000);
rightClickDetect.onEnterFrame = function(){
	if (Key.isDown(2) && Key.isDown(2) != this.rightWasDown) Mouse.broadCastMessage("onRightMouseDown");
	this.rightWasDown = Key.isDown(2);
}

Mouse.addListener(this)
this.onRightMouseDown = function(){
	trace("rightClick detected");
}

1 last one i hope. I could not get that snippet to do anything. Do I add your snippet to an event handler or something???

I know these are n00b questions.

if you makea a new movie and paste it in the frame, it will work… I dont know how you intend to use it though.

hmmmm…I tried that…and it did nothing.:*( I know I am doing something wrong. Is this code going to show a message or something? If I can get yours to work I may be able to tweak it after and use it for my needs

well there was one problem… I used left instead of right in the code lol but I fixed that and that had no effect on its actual functionality…

Is it supposed to show something besides the regular flash right click menu? It did not do anything on my cpu. where it says Mouse.broadCastMessage(“onRightMouseDown”); am I supposed to substitute something in there?

replace

trace(“rightClick detected”);

with what you really want to happen when rightclick

Okay I replaced it with a getURL and nothing. The regular flash menu still comes up when I do a right click. Hey Rynoe it worked for you also??

Yea worked great, as matter of fact I filed it in my CHOICE TIDBIT file, Send me your fla and I’ll test it on my puter

Okay I feel like a real b00b now. How did you set up your .fla. Or would you mind sending me yours.

Just a sample to see if works!

my file

I think I see what I did wrong. BUt rynoe yours work in the test movie are but when I preview in browser it does not. I really appreciate both of you guys help!

Try this one. I tested on browser, works fer me…

This is the strangest thing, it worked once and did not work again. Does the regular right click menu come up when you do it also? Are you able to do it moer than once?