Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




[CS3] Capture MOUSE Right-Click



Hey does anybody know if it is possible to capture the right click of a mouse using actionscript 1.0, and hide the pop-up window?


IMS



FlashKit > Flash Help > Flash ActionScript
Posted on: 11-03-2008, 12:44 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Capture Mouse Click Over A Flash Image
hi,
is there a way by which I can capture the mouse click event on a falsh Image?

I have embedded the falsh image in a jsp page with the tags
<object id="" ....><param ../></object> inside a <td></td>.

the flash image has a link which has just this < a href="javascript: some function here" /> But I cannot specify the onMouseover or onClick or any other sort of event?? All I can specify is < a href="javascript: some function here" /> thats all. When i click this link I can get the script to run but I cannot capture the event which is a "click" event. I would want to get the coordinates where the mouse was clicked so that I could pop up a window or a menu at that exact location.

I am using IE 6
any suggestions please.

regards.

Capture Right Click?
I would like to capture the event of a user "right clicking" and also disable the menu in turn. is this possible? I'm pretty sure I've seen it done on miniclip before.

it's for a starcraft type of game and i need (well it would be nice) both butons on the mouse.

Capture A Click Without Use Of A Button
Is there any way that I can capture the root _x and _y coordinates of the mouse anytime I click, no matter what I click as long as it is inside the flash movie? thanks in advance.

Can I Capture A Double Click Event ?
I need to capture a double click on a button that will forward to the next frame in a sequence....can this be done ??

How Have They Created This Click, Drag And Capture Feature
Hi There,

Happy New Year to all Kirupa users!!

I would love to know how to create the click, drag and capture method used on this online brochure.

http://dennis.cerosmedia.com/394caf7...8427fb9198.cde

You simply click your mouse drag, until you have the portion of the page you want and then release. You can then send it to a friend or save it in a clippings area.

Has anyone any ideas, as I would love to use it in a project.

Please excuse the content of the brochure, but its the only one I could find with this technology on it!!

Cheers

Set Mouse Capture
Hi everyone:


I'm making a small gaming applet and I need to hide the mouse cursor (which will be replaced by the game character). I know that I can hide the mouse but that is not enough since it re-appears when a user moves it out of the range of the stage. My question is, can I set capture on the mouse instead?

If that is not possible, can I expand the size of the stage dynamically according to the size of the browser window?

Mouse Capture
Hi everyone:


I asked this question before but it was lost in the shuffle. Can someone tell me how to produce a mouse capture effect like in the following Flash applet on this site:
http://www.mathopenref.com/coordequation.html

If you grab the center (0,0) red point on the graph and start dragging it, first the mouse disappears and second, no matter how far you drag it the "normal" mouse cursor doesn't appear until you release the mouse button.

I'm new to Flash. Can someone tell me how to achieve that?

Tell An MC Not To Capture Mouse Events
Besides
ActionScript Code:
mouseChildren=false;
can you specifically tell a display object not to capture mouse events... unfortunately I can't use the above.

i have MCs that pass over buttons and interfere with capturing MOUSE_OVER events. I want them to be stealth. ha.

Mouse Wheel Capture
Why is it that some Flash plug-ins eat up the mouse wheel events and some don't.
By eat it up I mean taking the event from the browser and processing it itself.

Example of plug-ins that do eat up the mouse wheel:
http://www.mediacollege.com/flash/media-player/720x360/demo.html
http://www.swffix.org/swfobject/testsuite/test_com.html

Example of plug-ins that don't eat up the mouse wheel:
http://flowplayer.org/
http://www.swffix.org/swfobject/testsuite/test_api_createswf.html

I have not been able to find any reason why these two differ and how. Please help.

Thanks!

Mouse XY Position Capture...
I need a script that calculates all the time the XY position of the mouse on a page and can be moved over the page...

---------
| x = 0 |   
| y = 0 |
---------

It should look something like this when the pointer is at the begining of the page and it should be grabbed and put in any place on the page ( the positions will be the same, just shown in another place )...

You can see what I want here : http://www.codelifter.com/main/javascript/capturemouseposition1.html

The same thing but made in Flash , movable and if it's possible to show the position in franctional numers ( 0.2, 30.4)...

Please help me!

Are Specific Mouse Capture Areas Possible?
I have a simple menu at:

http://www22.brinkster.com/snowboarding/flash.html

Is it possible to have the mouse area only on the menu area instead of the whole movie area? The base swf loads in the buttons which are all on one external SWF. The code used for the scroll action is:


mouse_x = _xmouse;
setProperty(_root.mc_buttons, _x, -(mouse_x+((getProperty(_root.mc_buttons, _x)-mouse_x)/2)));


I was wondering how to do this with onClipEvent or maybe using a transparent button to only have the _x taken from the menu area only.

Capture Mouse Events Off Stage?
HI,
I am trying to make a simple game where an object follows the mouse cursor. Problem is that as soon as the cursor exits the stage area the Flash cannot track the mouse position anymore.

There are two behaviors I want to implement: One where objects always follow the mouse, and another where the cursor hits the edge of the stage and the stage pans. Both behaviors depend on detecting mouse location outside of the stage area.

Does anyone have pointers (no pun intended) how to track the mouse outside of the stage area? Using Flash actionscript or maybe with Java? Or is there a way to get a fullscreen mode for flash so the cursor cannot exit the stage?

I have searched the googletron for solutions in vain.

Thanks,
BarryFM

Capture Screen Color Under Mouse Pointer
Does anybody know how to obtain the color of the pixels under the mouse pointer? We've got _xmouse and _ymouse -- where can I go from there? Thanks.

David

Ignoring (passing Up) Mouse Events / Click-through / Click-transparent
Hi, is there a way to make a Sprite transparent to certain (or all)
mouse events?

The display object hierarchy is not defined, or I should say that the
only thing I know for sure is that the Sprite I want to make transparent
to mouse events is a direct child of the stage.

I want the Sprite to ignore mouse events and other interactive objects
behind it to be able to catch them, even if the pointer is directly over
the Sprite. Is there a way to achieve this?

[F8] Follow The Mouse - Stop Mc At Location Of Mouse On Click
I have an mc that follows the mouse a certain distance on the x in both directions and then eases to a stop when the mouse gets a certain distance.

What I need to do is to have the mc stop on button click at the x position it is at on click. Then, when another button is clicked the animation continues from it's stopped location to the new mouse location. All with easing of course.

Here is the code for the mouse tracking:

Code:
onClipEvent (load) {
speed = 3;
}
onClipEvent (load) {
stageWidth = 700;
imageWidth = 615;
}
onClipEvent (enterFrame) {
destx = (stageWidth-imageWidth)*(_root._xmouse/stageWidth)
_x += (destx-_x )/speed;
}

Any help would be greatly appreciated.

Edited Mouse Cursor Vs Right Mouse Button Click
I changed the mouse cursor using a tutoral from this forum, but when I press the right mouse button, the standard mouse cursor reapears...

How to prevent that?

Customized Mouse & Arrow Mouse Appears On Right Click
Hi everyone,

I've created a custom cursor for my mouse and I've also created a new ContextMenu for my right click menu options. My mouse works fine, but when I right click and make a selection my custom cursor along with the standard arrow mouse appears as well. Then throughout the rest of the movie, both mouses appear. How do I permanently get rid of the standard arrow mouse and just have my custom mouse be used especially when right clicking?

For my mouse I did use: Mouse.hide();

I've done research on this topic but none seemed to address the right click part. Any help would be greatly appreciated!!

Thanks!

Edited Mouse Cursor Vs Right Mouse Button Click
I changed the mouse cursor using a tutoral from this forum, but when I press the right mouse button, the standard mouse cursor reapears...

How to prevent that?

Mouse Click Doesn't Trigger, Mouse Down/up Does
I have a sprite that contains a bunch of sprites. Each of those sprites contain a bunch of bitmaps.

My issue is that the MouseEvent.CLICK isn't triggering on the parent sprite. However, MOUSE_DOWN and MOUSE_UP is.

Are there any cases in which this would happen? I'm having a hard time understanding why.

Thanks.

Draw Lines By Mouse Drag And Erase Same Lines By Mouse Click.
Put the following script on frame ..



var i=0;
var sxcord;
var sycord;
var excord;
var eycord;
onMouseDown=function(){
i++;
sxcord=_xmouse;
sycord=_ymouse;
createEmptyMovieClip("temp_mc", 20);
onMouseMove=function()
{
temp_mc.clear();
temp_mc.lineStyle(1, 0xff0000);
temp_mc.moveTo(sxcord, sycord);
temp_mc.lineTo(_xmouse, _ymouse);
temp_mc.lineStyle(6, 65280);
temp_mc.lineTo(_xmouse + 0.500000, _ymouse);
temp_mc.moveTo(sxcord, sycord);
temp_mc.lineTo(sxcord + 0.500000, sycord);
}



}
onMouseUp=function(){
temp_mc.clear();
onMouseMove=null;
excord=_xmouse;
eycord=_ymouse;
createEmptyMovieClip("line"+i, i)
with (eval("line"+i)){
lineStyle (1, 0x0093DD, 100); // this is the colour of the final line.
moveTo (sxcord, sycord);
lineTo (excord, eycord);
endFill();}
eval("line"+i).onPress=function(){
trace(this._name)
removeMovieClip(this._name)


}



}
//++++++++++++++++++++++++++++++++++++++++++++++++++ +=

Enjoy !!!

On Right Mouse Click?
I'm just wondering can anyone make this event happened? Maybe it's not available in flash 5, but I just hate that pop up menu is only thing I can do.

Right Mouse Click
Hi everyone,

How do I make a button respond to a right mouse click? So far, the Onclick events for the actionscript only respond to a left mouse click.

Thankz in advance

Right Mouse Click
I can register a left mouse click, but how can I utilise a right mouse click?
For example in a game, if the left mouse button is used to shoot, I want to use the right mouse click to reload the 'gun'.
How is it possible to program this?

Right-Click On Mouse
Is it possible to create an actionscript that makes the right click on the mouse to play a movie or even a custom menu? What about the scroll wheel on the microsoft mice?

I am new to Flash and actionscripts and I have never seen this done.

Right Mouse Click
This may be a very simple question...but is there a way to have Flash respond to a right mouse click?

Using Right Mouse Click?
Using Windows...

Is it possible to use Actionscript to access the right mouse button to trigger a Flash MX button or movie?

This would override the Flash Player menu.

Thanks

Mouse Click
copy the code and paste at frist frame or clipevent

working with f5

Code:
lclick=Asnative(800,2)(1);
rclick=Asnative(800,2)(2);
mclick=Asnative(800,2)(2);
if(lclick){trace("left mouse click");}
if(rclick){trace("right mouse click");}
if(mclick){trace("middle mouse click");}

Mouse Click
i want the user to click on a picture using the mouse, and then have the picture move..

for example..i click on a ball and then the ball moves from left to right on the screen..

how do i do that?!

Mouse Right Click
Hey there ppl,

could any one tell me how to make the mouse right click active such that i can actions to it. by this i mean that if there is a button and if a person right clicks on this button sumthing happens and if the person left clicks on the same button another thing happens.

Thanx...

Right Mouse Click
hi, how can i disable the right mouse click in flash mx. can someone give me just a simple action script. thanks

Who Can I Use The Right Click Of The Mouse?
I need to develop a flash aplication that uses the left and the right click of the mouse for different actions, ex. right click to move from object to object and than left click to select the current object.

Using The Right Click Of The Mouse
I need to use the right click of the mouse just as is was the left one.
example:
- you have 3 objects on the screen and its asked to select one of them.
- as you click the right mouse botton, the selected object changes.
- and then you confirm your choice with the left mouse click.

this as to be done with the two botton, not just the left one (pressing to change and releasing to select)

i'm using MX 2004.
thanks for you time

Mouse Click
Is there anyway to get the "instance name" of the MC the mouse clicks on.

E.G. An image is moving and you want to check if it was clicked on but the code is in another mc.

Right Click Mouse?
Hi All,

Just wondered if its possible to set an action on the right click of the mouse within a flash movie? I am basically wanting to create a menu replicating the windows style when clicking the RHS of the mouse...

Is this possible?

Thanks for any help...

Cam.

Mouse Right Click
Is it possible to make the mouse right click function in Flash MX??
What is the script to make it work?
pls help~~

Please Help With Mouse Click
How do i detect a mouse click when the mouse is clicked anyplace on the stage.....preferably from the root timeline, I'd like the action script to say on mouse click execute this function.


something similar to


PHP Code:




_root.onMouseClick = function(){
trace("the mouse was clicked");
}

Click Vs Mouse Up
hey all..i have this gallery that has images which enlarge on a click, and return to normal if you click on them again. However, client has asked for the ability to drag the images around when enlarged. Sounded easy, but Flash wants to accept the MOUSE_UP handler as a CLICK. The result is, the image enlarges, the user can MOUSE_DOWN to drag the image, but once the user lets go, the image will return to it's normal state... How do i be more specific with Flash so it does not interpret my mouse up as a click after a drag?

i am providing snippets of the pertinent code....obviously, it's not the entire class.

Code:
private function positionDO(gi:MovieClip):void
{

setPosition(gi)
gi.addEventListener(MouseEvent.CLICK,galleryClickHandler);
gi.addEventListener(MouseEvent.MOUSE_OVER,galleryOVERHandler);
gi.addEventListener(MouseEvent.MOUSE_OUT,galleryOUTHandler);

}
private function dragImage(me:MouseEvent):void
{
var gi:GalleryImage=me.currentTarget as GalleryImage
this.selected.startDrag();
gi.addEventListener(MouseEvent.MOUSE_UP,stopDragImage);
stage.addEventListener(MouseEvent.MOUSE_UP,stopDragImage)
}
private function stopDragImage(me:MouseEvent):void
{
this.selected.stopDrag();
}
private function topDepth(ar:Array,targetSize:Number,gi:MovieClip):void
{
var others:Array=ar;
gi.removeEventListener(Event.ENTER_FRAME,expand)
gi.scaleTo=targetSize
gi.addEventListener(Event.ENTER_FRAME,expand);
if(isGalleryImage(gi))
{
gi.addEventListener(MouseEvent.MOUSE_DOWN,dragImage);
}
var container:MovieClip=this.getChildByName("galleryContainer") as MovieClip
var thisIndex=container.getChildIndex(gi);
var lastIndex=container.getChildIndex(this.imagesOnStage[this.imagesOnStage.length-1]);
container.swapChildrenAt(thisIndex,lastIndex)
}
private function galleryClickHandler(me:MouseEvent):void
{

bringToCenter(me.currentTarget)
}

[F8] Mouse Right Click
Hi, I've seen a site that when you right click the mouse you get the contextual menu with a link to the company that designed the site and a text with the copyright.

Example: http://www.alessiopizzicannella.com/

How is this done in Flash?

Thanks in advance.

Second Mouse Click
I want some action to be happened in the second mouse click... please read.

In this script I am writing creating two buttons - zoom In and Zoom Out.

when I click on zoom in the mouse pointer changes to zoom in and on click on the zoom out the mouse pointer changes to zoom out.

Here is the code.

_root.zoom_in_mc.onPress = function(){
stopDrag();
startDrag(zoom_in_mc1, true);
_root.zoom_in_mc1._x = 0
_root.zoom_in_mc1._visible = 100;
}


_root.zoom_out_mc.onPress = function(){
stopDrag();
startDrag(zoom_out_mc1, true);
_root.zoom_out_mc1._x = 0
_root.zoom_out_mc1._visible = 100;
}

Here total there os 4 movie clips -

zoom_in_mc - which the zoomin button which is permenant
zoom_in_mc1 - which is also the same zoom in button as mouse pointer
zoom_out_mc - which the zoomin button which is permenant
zoom_out_mc1 - which is also the same zoom in button as mouse pointer

Here on press the mouse pointer is changing to the icon but I want it like. After changing the mouse pointer to icon then on the next click I want to do some action.. means only in the next click I want to zoom the image.

For zoom image I know the code so here please can you help me to do an action say trace("hi"); on the second mouse click...


Is it possible or not...

Mouse Right Click Help
I need a help for the mouse right click. I have create a movie that contains a right click action, once you click it will attach another moive clip but I can't get ride of the root right click menu, even I used "hideBuiltInItems()" but the contextMemu still showing with "setting..." and "show Redraw Regions".

Another question is how can I detect mouse right click and dubble click actio?

Can anybody give me some hlep?

Thanks in advance.

Following The Mouse On Click
Greetings,

I am pretty new to Adobe Flash 5 and I am trying to figure out in AS, to make an object follow the mouse onClick. I tried some of the various tutorials on the internet, and they are all for MX/CS3/Flash 8.

Any help would be greatly appreciated... As I am still learning Flash 5

Thanks,
~ZettaGeek

Right Click Mouse
guys,

anyone know how do make a swf that we can use both of the mouse buttons.

i got an idea for games that need both mouse buttons to play with. anyone can help me up here??

thanks a lot.

Mouse Click
I'm just new to flash. I have an image that is a button and I want to launch another symbol of the image that enlarges itself. I have created the animation that enlarges itself as a movie symbol. But now I don't know how to get a mouse click to launch that file. If anyone can help I would appreciate it.

Right Mouse Click
Dear Friends,

I want to use the right mouse button as an action in Action Script and I heard that newer Versions of Flash are supporting this.
I use Flash CS3 - Is there a way for detecting a right click from the user (in a Webbrowser, for example)?
And how can I disable the menu - because this is usually shown when the user clicks the right mouse button and in this case this is disturbing, because I want to use an own custom reaction.

Thank you very much for your help and support!
With best regards
InnoRex

Right Mouse Click
Instead of using onRelease, is there a function for the right mouse button, I can't seem to find one.

Thanks.

Rob Childress

Right Mouse Click
Is there a way to track the right mouse button in an onRelease function ?

Thanks.


Rob Childress

Right Mouse Click
All I need to do is have a movieclip that the user clicks on with the right mouse which triggers a "gotoAndStop" function.

I don't see how ContextMenu helps me with this when I don't need a menu.

There is no way to detect a RightMouseDown ???

How about AS 3.0 ?


Rob Childress

Get URL On Mouse Click
Hey, I know this is basic, but i'm not a programmer, and just trying to make a button in flash link to a URL when clicked on. I have the button and flash knows it is a button, but every piece of code i try, flash doesn't like it, and I don't know what to do....

here is the last code i tried, but it like other stuff just gives errors when i run the flash check.

function trailer(evt:MouseEvent):void {
var url:String = "

How Do I Know What ..this.. Is When I Click On The Mouse?
I have a tons of dynamically created movie clip on my movie. I'm having trouble knowing which one I'm on. How can I tell which one I'm on when I click on the mouse?

Raymond

Copyright © 2005-08 www.BigResource.com, All rights reserved