Hide controls for flash (swf)?

Asked

Viewed 78 times

4

How is the correct way to hide the controls in the SWF? For when the user right-click does not appear the options...

These are the controls:

inserir a descrição da imagem aqui

This image here is what I want it to be about:

inserir a descrição da imagem aqui

I don’t know if it’s with the <embed> or the <object> or if it is with action script... : S

2 answers

2

It is in the object.

Put inside:

<param name="menu" value="false" />

And within the tag embed place:

menu="false"

2


You can make it by putting AS like this:

var meuMenu:ContextMenu = new ContextMenu();
meuMenu.hideBuiltInItems();
stage.contextMenu = meuMenu;

In addition to hiding the controls you can try to use Actionscript itself and hide the contextmenu thus:

stage.addEventListener(MouseEvent.RIGHT_CLICK, function(e:MouseEvent):void {});
stage.addEventListener(MouseEvent.CONTEXT_MENU, function(e:MouseEvent):void {});

  • 1

    Mmm, I’m gonna use that!

  • @Jacksonantunes has to disable the contextmenu, but I underlined it because I didn’t test it, but as soon as I test it I confirm if it works

Browser other questions tagged

You are not signed in. Login or sign up in order to post.