Right Click with Flash Player 11.2

29 posts

Flag Post

I found in the web a source code of Right Click in the new flash player 11.2
See this link if you are interested:

http://www.emanueleferonato.com/2012/06/04/easily-handle-right-mouse-button-in-flash-movies/

I wanted to share it with the developers to help them with their games. Have a good day!

 
Flag Post

Because I can never conscionably allow someone to go to that website:

//listening for either of these events will disable the default context menu
MouseEvent.RIGHT_MOUSE_DOWN;
MouseEvent.RIGHT_MOUSE_UP;
 
Flag Post

Is this new to Flash Player 11.2? And it appears to only work on browsers unless Flash Player Projector 11.2 is out?

 
Flag Post

There’s already a projector for 11.4 :|

 
Flag Post
Originally posted by truefire:

Because I can never conscionably allow someone to go to that website:

Good call!


They’re also listed here, except without any explanation.

 
Flag Post

Can you do this in older versions of Flash Pro as long as your flash player is up-to-date?

 
Flag Post
Originally posted by GameBuilder15:

Can you do this in older versions of Flash Pro as long as your flash player is up-to-date?

No. Because your Flash Pro v10 doesn’t have a compiler for Flash 11.2

 
Flag Post
Originally posted by truefire:

Because I can never conscionably allow someone to go to that website:

What’s wrong with that site?

 
Flag Post
Originally posted by player_03:

They’re also listed here, except without any explanation.

There’s better (though still not that good) explanations in the documentation for the dispatcher of events (because the same event type can be implemented differently by different objects).

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/InteractiveObject.html#event:rightClick

 
Flag Post
Originally posted by starfiregold:
Originally posted by truefire:

Because I can never conscionably allow someone to go to that website:

What’s wrong with that site?

Without going into a flaming war; his code is very messy and just isn’t very well done. His concepts are okay, but the way he goes about implementation is bad.

 
Flag Post

His concepts themselves are, IMO, often debatable. In the very abstract realm (ie: what do you want to do?) he’s fine. But then when you ask “how do you do it” on ANY level it starts to fall apart.

He spent too much time in AS2, basically. Scarred for life.

 
Flag Post

Bottom up design. XD

 
Flag Post
Originally posted by Senekis93:

There’s already a projector for 11.4 :|

So it doesn’t work when not in browsers because of something to do with browsers, not because the flash player projector isn’t up to date?
 
Flag Post

What do you mean?
It will work the same in any Flash Player with version 11.2 or higher.

Also, I don’t see the point of hiding it.
Why do you want to prevent the player from accesing the storage options?

 
Flag Post
Originally posted by Senekis93:

What do you mean?
It will work the same in any Flash Player with version 11.2 or higher.

Also, I don’t see the point of hiding it.
Why do you want to prevent the player from accesing the storage options?

Well, if you want to use the right-click in your gameplay you’d have to hide the menu.

 
Flag Post
Originally posted by truefire:

Because I can never conscionably allow someone to go to that website:

Derp! Why not!? :D

 
Flag Post
Originally posted by Senekis93:

What do you mean?
It will work the same in any Flash Player with version 11.2 or higher.

Also, I don’t see the point of hiding it.
Why do you want to prevent the player from accesing the storage options?

from that link
“Just notice right mouse clicks examples will only work in browsers, testing them from the Flash IDE won’t work.”
My question: why?
 
Flag Post

Because Feronato is a noob and/or Adobe is a noob.

He probably didn’t have the proper standalone player installed or something.

Why do you want to prevent the player from accesing the storage options?

I don’t know. I personally just love when a context menu pops up asking me about storage every time I try to swing my secondary weapon.

 
Flag Post
Originally posted by truefire:

Because Feronato is a noob and/or Adobe is a noob.

He probably didn’t have the proper standalone player installed or something.

I do recall that the previous solution to this problem, involving a custom function in java, I believe, also did not work when not in browsers. I’m not sure if this is due to the same issue though.

Anyway, I’ll go and have a try.

 
Flag Post
Originally posted by Drakim:

Well, if you want to use the right-click in your gameplay you’d have to hide the menu.

Yeah, but that’s a result of implementing RIGHT_CLICK.
I mean why would you want to hide the context menu when you application doesn’t require RIGHT_CLICK to work? As with all those people throwing tutorials with their addEventListener(MouseEvent.RIGHT_CLICK,doNothing);

Originally posted by feartehstickman:
from that link
“Just notice right mouse clicks examples will only work in browsers, testing them from the Flash IDE won’t work.”
My question: why?

According to the live docs, it works for AIR 1 and FP 11.2.
If it doesn’t work in the Flash IDE, well… who knows? CS is a wtf in every aspect.

 
Flag Post

CS5 defaults to FP10 when you test the file. With an extra click (or different shortcut) you can do a publish preview instead, which would pop it open in a browser for you. It’ll work in CS6, I imagine. If not, publish preview! :)

 
Flag Post

About the thing you mention, it’s Javascript, not Java, and as you see in Aaants reply it isn’t related.
Basically, you catch the right click with JavaScript and then call a function in the Flash movie.


I’ve always wondered why CS has so many weird settings.
I mean, you’re paying a good ammount for it. The least you could expect is that it would automatically update and target the most recent version.

Or how they don’t include Flex (although you can easily include it, but still…), or how it takes more to compile than other IDEs, or the nonsense file size of the FLA.

I mean, those are Adobe’s tools. One would expect their software to outperform any program made by others, but that isn’t the case.

 
Flag Post

After a bit of screwing around, I’ve managed to get a decent solution.

As Aaants said, CS5 (which I have) defaults to target FP10. To make it target FP11.4 is a bit of a pain but can be done (get the right .swc, copy an .xml file and edit it a little).
But it appears that the Ctrl+Enter preview won’t change from FP10 due to something that I’ve got no idea about with CS5. So yeah, you need to F12 preview in a browser. Which can be a pain because you won’t receive output (trace calls and the like) without an external program that I’ve forgotten the name of.
Once exported, however, it does work in Flash Player Projector just fine (tested with 11.4).

If anyone has any idea how to perform some magic and get CS5’s debug player to update to 11.4, that’d be great but I doubt it’s an easy task.

 
Flag Post

http://blogs.adobe.com/flashplayer/2012/08/flash-player-11-4-and-air-3-4.html

A Flash Professional updater will be released in early September and will have many exciting features for you to choose from and experiment with, including ToolKit CreateJS 1.1, support for Flash Player 11.4 and AIR 3.4, improved iOS app development workflows including iOS simulator support, and direct on-device deployment.

 
Flag Post

I saw that but I can only hope that it isn’t CS6 exclusive