...

View Full Version : Changing Flash Menu Text or Disabling Completely



rt3d
05-13-2012, 08:09 AM
Hello,

I work for a very small company. The individual that was hired on from the outside to create a flash based virtual brochure for our website has decided not to complete the project due to increase in other projects...basically left us high and dry. My boss asked me if possible to continue and start by either changing the text in the 'Right Click' menu that appears when you 'Right Click' on the virtual brochure displayed in the web browser or eliminating it completely. Currently our company name is shown in the menu, but it is spelled incorrectly. Also a user is meant to click on our name in the menu which will bring the user to a page on our website...which currently does not exist anymore.

This project deals with Javascript, HTML, and Flash.

I have a sample of the code in question below (from 'index.html' file). In regards to our misspelled name shown on the 'Right Click' menu...where is that information kept? Is it embedded in the flash file itself? The main brochure flash file is the 'movie.swf'. Unfortunately we do not know where he created the .fla files...I only have access to .swf files.

If unable to make these changes, is there a way to at least just have the 'Settings' and 'About Flash' shown only in the menu?

I have found similar threads related to the 'Right Click' menu, but could not get much out of them to use towards my problem. Sorry...I am a newbie at this and my knowledge is limited. Please let me know if I need to submit more code and I will do my best. Thank you!




var dir = "./files/";
var jsfolder = "js/";
var swffile = "movie.swf";

var flashvars = {};
var params = {
menu: "false",
scale: "noScale",
allowfullscreen: "true",
allowscriptaccess: "always",
bgcolor: "#ffffff",
wmode:"transparent"
};
var attributes = {id: "stream"};
swfobject.embedSWF(dir+swffile, "stream", "100%", "100%", "9.0.0", dir+jsfolder+"expressInstall.swf", flashvars, params, attributes);
</script>
</head>
<body style="padding: 0px; margin: 0px; height:100%; width:100%;">
<div id="stream">
<h1>Requires FlashPlayer</h1>
<p><a href="http://get.adobe.com/flashplayer/"><img src="http://www.adobe.com/images/shared/download_buttons/get_adobe_flash_player.png" alt="Get Adobe Flash Player"/></a></p>
<p>Please try the above link first. If you still encounter problems after installing the Flash Player, try this one:</p>
<p><a href="http://get.adobe.com/shockwave/"><img src="http://www.adobe.com/images/shared/download_buttons/get_adobe_shockwave_player.png" alt="Get Adobe Shockwave Player"/></a></p>
</div>

djpaul1963
05-13-2012, 09:37 AM
I have no good news for you I am afraid.

Right click in flash is handled by the flash plugin itself and the only thing you can do -as a programmer- is to insert some menu items (like your mispelled company name) but not hide it completelly as it is the only way you can modify player settings and that's why Adobe denies further discussion.
That said, you must have the .fla (and probably .as) file(s) to fix your problem and from the moment your ex programmer left you in the middle of nowhere he must at least provide you with all the sources.

The other -extremely difficult- option you have is to play with the javascript code embedding the swf and disable the context menu in browser level but I would not recommend that as it is something most users hate, especially if the swf is not the only content in your page.

rt3d
05-13-2012, 10:22 AM
Hi djpaul1963,

Thank you very much for your response and expertise on this.

I just want to make sure I understand you correctly...

1. You are saying that I would need the original .fla and .as files in order to at least correct our company name?

2. There is no way to permanently disable the right click context menu with what I have available.

3. Somewhere in one of the javascript files I may be able to disable the right click context menu from appearing. If I did choose this option, do you happen to know where I would start? There are (2) .js files...'swfaddress.js' & 'swfobject.js'. Opening in notepad, neither one of these has the 'movie.swf' file in it that is listed in the 'index.html' file.

Btw - not sure if it helps, but the 'movie.swf' file, when I open it is the working virtual brochure along with all active buttons & etc.

djpaul1963
05-13-2012, 03:06 PM
1. Correct

2. Flash context menu cannot be disabled. You can only display it to the minimum (that's what menu: false tries to do in your javascript) but to eliminate it on a browser it's impossible. This can be done only in desktop solutions (AIR) but that is not your case. So even if you find the sources, right click menu will always be there BUT if you find the sources you can remove extra items or correct what you want.

3. swfobject is a third party library and has nothing to do with that. What you need is a function inside index.html disabling the right click on browser level. A very easy method is described here http://www.javascripter.net/faq/rightbut.htm but keep in mind that you may face some weird behavior where right click blocking will work anywhere except your flash! That's why I said 'extremely difficult' before.

Try it and let me know if you were lucky :)

rt3d
05-13-2012, 10:46 PM
Ok, thanks for clarifying. And thank you for the link. I did give it a try(not 100% I placed it correctly):



var dir = "./files/";
var jsfolder = "js/";
var swffile = "movie.swf";

var flashvars = {};
var params = {
menu: "false",
scale: "noScale",
allowfullscreen: "true",
allowscriptaccess: "always",
bgcolor: "#ffffff",
wmode:"transparent"
};
var attributes = {id: "stream"};
swfobject.embedSWF(dir+swffile, "stream", "100%", "100%", "9.0.0", dir+jsfolder+"expressInstall.swf", flashvars, params, attributes);
</script>
</head>
<body style="padding: 0px; margin: 0px; height:100%; width:100%;">
<div id="stream">
<body oncontextmenu="return false;">
<h1>Requires FlashPlayer</h1>
<p><a href="http://get.adobe.com/flashplayer/"><img src="http://www.adobe.com/images/shared/download_buttons/get_adobe_flash_player.png" alt="Get Adobe Flash Player"/></a></p>
<p>Please try the above link first. If you still encounter problems after installing the Flash Player, try this one:</p>
<p><a href="http://get.adobe.com/shockwave/"><img src="http://www.adobe.com/images/shared/download_buttons/get_adobe_shockwave_player.png" alt="Get Adobe Shockwave Player"/></a></p>
</div>


You are correct...the embedded swf file that activates upon accessing the index.html file still shows the standard Flash context menu with the company name when you right click anywhere. So I guess I am stuck not being able to alter or eliminate the flash context menu (or at least setting it back to default).

Another noob question for you...what about opening the swf file in a program to view the code? Would you think there is a way with setting up a method of 'recreating' or even 'resetting' the flash context menu and having it override the one I am trying to access (whether altering the code of the index.html file or the 'movie.swf' file?

djpaul1963
05-14-2012, 01:47 AM
You can try to decompile the swf with http://www.flash-decompiler.com/ or http://mac.eltima.com/swftofla-converter.html but keep in mind two things:

1. You must have the legal right to do so. If the programmer kept the copyright for his own, you are not permitted to do anything without his permission even if he left without prior notice, even if he was in your company's payroll at that time, even if he did something unethical.

2. There is a possibility he used some kind of protection/obfuscation in his code to stop a decompiler action, so you will not succeed to get back anything valuable.

Isn't possible to find him and ask for the sources? For me, is the most preferred way.

djpaul1963
05-14-2012, 02:19 AM
And what is the relevance with what OP asked?

Edit: This post was an answer to an irrelevant post of someone that disappeared today :)

rt3d
05-15-2012, 03:34 AM
Thanks again for your response and expertise djpaul1963

Looks like we have exhausted my options.

I agree that contacting the freelancer would be the best, but unfortunately he has responded with minimal communication despite our best efforts. The last bit of information we received from him was about 2 weeks ago. He told my boss "there should be enough for someone to finish it.". Not sure what that meant, but we will try again to at least contact him about the .fla files.

dougcollins02
05-16-2012, 09:55 PM
The way I see it, you have three options here:

1.) I would venture a guess that, when you got the freelancer to help you out, you had him sign a contract for the work to be completed? These are usually pretty straight forward for any outside contractor working at a small business, and usually state that any work completed on company time while being paid by the company is property of said company, and that the contractee waives all rights to said work.

If that's the case, you have every right to decompile the .swf file, rebuild a .fla file using his code, and finish the project yourself.

2.) If you have that paperwork completed, you could pass the files onto another freelancer and have him or her continue on from where you left off.

3.) Cut your losses, hire a new coder and start from scratch.

If you don't have the contractor paperwork filled out, I think you're stuck with option 3.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum