Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: right click detection
From: John Croteau
Date: Mon, 27 Dec 1999 12:23:33 GMT

Hi Eric,

> That is correct, it does only work with HTML (I even tried the
> document.embeds[] and document.movieid stuff). Now I'm not quite sure,
> because I'm still a novice flasher, but if Flash can intercept keypress
> events, I'm assuming that it could also intercept a right-click event (which
> is seen as a sort of keypress, at least it is in JavaScript).

It could (and it probably will Flash 5) but it doesn't provide us with that info
now.
Some utility programs that create projectors and screensavers disable or allow
you to customize the right click menu.


> Regardless, it should still have an ASCII code of sorts that you could
> intercept and test
> for, couldn't you...?

Not really.
Regular left mouse clicks are not detectable unless they occur over a button.
The right click is used by Flash for the menu and is not available to us.

You can test for many key presses with On(key), but only one per button.

As with a right click, Flash gives us no way to determine if a Control or Alt
among other keys has been pressed.

> So the following is a solution for HTML but not for Flash:
> Correct me if I'm wrong (it certainly won't be the first time),
> but I tried this a long time ago with no success.
> If there is something I'm missing, PLEASE clue us in :-).
> Maybe IMNSHO should be IMHO :-)
>
> I hope all my fellow Flashers had a merry Christmas (whatever your religious
> inclination might be) and are looking forward, like I am to a happy and
> (hopefully) prosperous New Year.
>
> > <solution>
> > here is a simple script that you can use...
> > ----------------------------------------------------
> > <!--
> > function RightClickCatcher(click){
> > if (document.layers && click.which == 3) {
> > alert('You right-clicked!');
> > return false;
> > }
> > if (document.all && event.button == 2) {
> > alert('You right-clicked!');
> > return false;
> > }
> > }
> > document.onmousedown = RightClickCatcher;
> > //-->
> > ----------------------------------------------------




--
Co-author of Flash 4 Web Animation F/X and Design
Autographed copies now available - http://www.crownmall.com/Flash4/
----------- -----------------------
John Croteau croteauaterols [dot] com (mailto:croteauaterols [dot] com)
------------- -------------------------
FlashTek (Advanced Websites with Flash) http://www.FlashTek.com/
Flash Bible (Fast track to good Flash) http://www.FlashBible.com/
Flash Central (The Universe Starts Here) http://www.FlashCentral.com/
The Flash Tech Resource (Tech Notes) http://www.FlashCentral.com/tech/




flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California

Reserve your space today at http://www.streamingmedia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  RE: FLASH: right click detection, Eric Dunham

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]