Flex :: ContextMenu On Right Click Not Showing?
Feb 1, 2011I'm pretty sure my code is OK as the Context Menu shows nicely when I compile for web, but when I compile for AIR nothing shows up.
View 2 RepliesI'm pretty sure my code is OK as the Context Menu shows nicely when I compile for web, but when I compile for AIR nothing shows up.
View 2 RepliesI am trying to use ContextMenu() to display context menus in Flex 4.
Full Render code here [URL]
The problem is that the context menu does not change when I add items to it.
how to add a custom right click menu to a List box in flex (without using external JS, just using ContextMenu as Adobe intended.
I would like to add custom right clicks to a number of spark list controls. I have tried the following as an item renderer. (as per the flex 4 cook book). Full Render code here [URL] When I right click on the Spark List I simply get the Adobe Default Context menu. This is the same default behaviour I had before I added any code to this.
View 2 Repliesi attached a custom contextmenu to a sprite. there is another sprite lying "on top" of this first one. so if i try to invoke the custom context menu of the first one, it does not show when the cursor is over the second one.
i already set the properties "mouseEnabled" and "mouseChildren" of the second one to "false"
I have read all threads and can not find a solution but i am not somebody with a lots of knowledge about actionscript so here is my problem i am using this script .
[code]....
the problem is that when i click on the first button loads ok but when click on second still showing the first movie clip in the back ,,,,, i have try everything without luck ,,,, i guess i need to keep reading but will like to find an answer to this situation ,
I created a movieclip animation that only activates when i rollover the movieclip button. I further extended the frames and created another frame animation that i active only when user clicks the button. So i have a roll over/out animation and click animation in the same movieclip in the same layer. Now the problem is that when i click on the button, its supposed to take me to another page, and it does, unfortunately without the click animation. That means after i click on the button its supposed to first finish the click animation and then go to another page. But when i click, it takes me to another page without showing the click animation
SO I tried the If function, but i seem to make a mistake somewhere and i dont know what to do. Now there is no error in script, but onw there is a problem in link, the button finishes the click animation but it does not go to the tarrgeted"about" frame. here's the code
[Code]...
This is probably something simple I'm missing. There are tons of tuts out there on how to setup a custom right-click menu, however, I've not seen anything on how to get the target of the right-click, not the menu item, but the object actually right-clicked...
Here's the code I'm using. In the customMenuItemHandler I need both the target menu item AND the target object that was originally clicked to open the menu.[code]...
Just compiled it with amxmlc and it gave me errors over the presence of "customItems" - nothing else at all in the entire 1500+ line AS3/flex program. I took out the customItems reference and it compiles with amxmlc just fine. Nothing about that feature 'customItems' is indicated to be anything other than active and current in the documentation. All amxmlc actually does is add a command line argument for AIR to the standard mxmlc.
View 1 RepliesI have a DataGrid with a custom itemRenderer(Canvas) which has a context menu on its right click. I am trying to get the data of the itemRenderer. I tried to find something in event & variables. I also tried with FlexNativeMenu on RIGHT_MOUSE_CLICK. But I didn't find any way out.
View 2 RepliesBeen tearing my hair out for ages trying to get my custom ContextMenu to apply to a TextArea, It will just display the default (copy, paste ect...).
import mx.events.FlexEvent;
public var nm:NativeMenu = new NativeMenu();
public var cm:ContextMenu = new ContextMenu();[code].......
I want to add a context menu with a datagrid which is in a title window, after adding it nothing happens.
[Code]...
I am calling init function on creationComplete event of title window.
I am using a ContextMenu for an AdvancedDataGrid in my application. I could implement the normal context menu for the grid. Now, I am planning to make the context menu dynamic.For example, if I click on a particular cell, I need to see only the items related to that cell in the Context Menu. Is there any way we can do that?
View 3 RepliesI have a Flex Library Project which has both Flex specific classes, and Air specific classes.When I reference the library in an Air project, the compiler complains about an overriding contextMenu in mx.containers.Panel, saying that the param should be of type NativeMenu (instead of ContextMenu). If I switch it over to NativeMenu then it compiles fine.
The issue is when I reference the library in a Flex Project. This time it complains that it doesn't know the type NativeMenu. If I try to change it back to ContextMenu, then I get the same error as above.I've searched google to no avail (found that someone else encountered the exact same problem: http:url.... )
I have been able to create a loop that loads it's from an XML list. What I'd like to do now is have a link stored so that when I click on an item in the list, it adds the appropriate text to the description text box. Presently I only have this scripted to trace but it populates with the last description in the list only. How can i assign a link to each item in the list?
ActionScript Code:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
var _XML:XML;
[Code].....
I want to listen both click and double click events for advanced data grid in flex. I have given double click enabled true and written the function in itemdoubleclick but only click is working but not itemdoubleclick
View 1 RepliesHow to include contextMenu for whole swf?
View 4 RepliesIf I open an empty FLA and put in this code:
Code:
var cm:ContextMenu = new ContextMenu();
cm.hideBuiltInItems();
this.contextMenu = cm;
Then it works and the context menu for the empty flash file has no built in items. But if I take a project that I already have, and in the class that gets compiled's constructor I put that exact same code, it compiles fine and everything but the context menu still has all of the default items no matter where I click.
So in AS2 you could add a contextMenu for the whole movie like this:
[Code]....
I have also tried just adding items to stage.contextMenu but that didn't work either. I also added a custom context menu to my Document class but that doesn't work for the whole movie. So does anyone know if there is something I can do to set the contextMenu for the whole movie?
Using contextMenu, i removed all BuiltInItems. Its working fine in IE.when i am viewing the same html file in mozilla, "Show Redraw Regions" option is still visible when i am right clicking on browser. In IE, its fine.
View 1 RepliesHow will I know the right click menu is currently open? Like a contextmenu.active = true property but that doesn't exist. An alternative would be a way to check if the user just right clicked but the right click event listener is for Adobe Air only as far as I know.
View 2 RepliesI just noticed that using the context menu will take away focus fronm the application.
Here is simple example: one part is similar to the example for flash.ui.ContextMenu, the other one just performs some action on keyboard events (the keys could as well be used to move the square around)
[Code]...
in a flash application i have to build i would like to find out what the target of the context menu is, which gets displayed when i ctrl-click.the reason for that: i created a custom context menu, which only displays over a certain area of the Sprite it belongs to. so there seems to be something "blocking the way".
View 2 Repliesmy code is
var cMenu:ContextMenu = new ContextMenu();
cMenu.hideBuiltInItems();
[code].....
I succeed to display the menu (ContextMenu AS3 class) but associated events (ContextMenuEvent.MENU_SELECT and ContextMenuEvent.MENU_ITEM_SELECT) don't work with IE >= 8 and Chrome >= 12:
AS file :
package
{
import flash.display.*;
import flash.ui.*;
[Code].....
how I can change the X and Y positions where the ContextMenu displays. I know you can do it with the display() method, but not sure how to implement it. My code, so far:
ActionScript Code:
var my_cm:ContextMenu = new ContextMenu();
my_cm.hideBuiltInItems();
[Code].....
in Mainframe of test1.fla
var newMovie_mc:MovieClip;
newMovie_mc=_root.createEmptyMovieClip("New1",2);
stop();
[Code]....
How can use ContextMenu from test1.swf??
in Mainframe of test1.fla
var newMovie_mc:MovieClip;
newMovie_mc=_root.createEmptyMovieClip("New1",2);
stop();
my_cm = new ContextMenu();
[Code]....
How can use ContextMenu from test1.swf??
[URL]..flex-iframe/ for showing wikicontent in a flex app.
<?xml version="1.0"?>
<mx:TitleWindow
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:components="components.*"
title="Hjälp"
[Code]...
When displaying the window: In Ie. it works perfectly, but in FF the content flashes quickly and then the iframe becomes blank?
need context menu items only on certain columns (locked columns) of a datagird and not on the other columns.
View 1 RepliesI have create a custom contextMenu using AS3 and can apply that to the stage. Any movie clip I place onto the stage does not inherit the contextMenu from the stage, i.e. they display the default contextMenu.How do I apply my custom contextMenu to every child in my application?
[edit]This is a simplified version of what I have in my main.as file:
var my_menu:ContextMenu = new ContextMenu();
my_menu.hideBuiltInItems();
var my_copyright = new ContextMenuItem("Copyright - 2012");
I was adding a background image using stage.addChildAt(mc, 0);. For some reason this removes the context menu. Placing the child at 1 fixes this and allows everything to inherit the contextMenu.