Flex :: Adding Events To Menu Options
May 5, 2009[Code]...
how to add addevents to the menus in the popupButton.
[Code]...
how to add addevents to the menus in the popupButton.
I'm developing a flex application and I want to add it a context menu. I got it with this
code:
var myMenu:ContextMenu = new ContextMenu();
myMenu.hideBuiltInItems();
[code]......
I am using Flash 8 by the way. Anyways what I am doing is making a menu with different options. I need the user to click on various buttons from the menu and then after those buttons are clicked, an animation needs to play and then return to the original menu. I have got the mouse to follow my custom cursor and made the general outline of the menu, but no buttons so far.
View 3 RepliesI'm having some trouble with drop down menus. I've got them set up with onrollover to display the menu options and use both rollout & dragout to deactivate (which prevents the menu from sticking by accidentally "dragging" off the area).The menu displays just fine, and I want the background of the options to highlight (by switching color) when the mouse moves over it or presses on it. Unfortunately, nothing happens.I used this as my base color switch
------------------------
function paint(mc, brush){ var fincolor = brush;myColor = new Color(mc);myColor.setRGB(fincolor);}[code]..........
I have a bunch of menus that will over lap each other at different times, and they have buttons in them you can click for commands. But when I have menu B on top of menu A, like cards, I don't want the onPress commands used in menu B reacting with buttons on the menu A beneath. Normally I would just move the menus, but in this case, they need to be laid out like cards.
View 1 RepliesI am in the process of making my first FLV player in Flash CS4, for videos I plan to upload on my site. The play/pause/rewind buttons seem simple enough. However, I have searched and can't find-a timeline 'duration' that tells how many minutes have been played and how many total there are-a fullscreen button that toggles full/not fullscreen in the browser-if possible, some way to manipulate the timeline (e.g. drag the cursor forward to make the movie skip ahead)or explain to me how to do thisAs I said, I have searched for the above and found the play/pause/rewind tutorials but no timeline/fullscreen ones.
View 2 Repliesset the brightness of the WHOLE MOVIE with the use of a + and - button in an options menu.. if so how?
View 14 RepliesIs there possibility to mark options in right click context menu ?
For example, if you right click on Windows bar, Lock the Taskbar is checked (marked).
I would like to create an Options Menu in my Flash AIR application for Android. I've figured out already, that this ActionScript code could be used for capturing the hardware Menu button press event:
stage.addEventListener(KeyboardEvent.KEY_DOWN, _onKeyDown);
function onKeyDown(event:KeyboardEvent):void {
if(event.keyCode == Keyboard.MENU) {
event.preventDefault();
trace("Menu Pressed");
}}
But how do you create the actual menu? If you can't do it with AIR, then has anybody tried to recreate/mimic it manually already and could you please share the properties (colors, transparency, any gradients?) and transitions (sliding in/out) you've used? I've found some guidelines already, but any Flash-specific tips/properties (like which easing to use for sliding transitions?).
where I can get or make a component where menu options are zoomed when rolled over, similar to the dock in Mac OS X?
View 2 RepliesIs it possible to have a context menu on a multiple frame movie with all the options except next, prev and play..?I want to have zoom in/out but not next/prev..
View 3 RepliesIm building a program that queries a database for options and displays the options in a number of comboBoxes. The comboBoxes are dynamically built and loaded via code and added to the stage. I would like to build the comboBoxes into a single movie clip (maybe not the correct wording) so I can use options like tweening and such to make it look better. The code is below.
package classFiles
{
import flash.display.MovieClip;
[code]....
My group is working on a Flex/AS3 scientific web application that is data intensive. Luckily the only plots involved are line charts. However, each line chart may have multiple traces (up to 24), and each trace may contain up to 2000 points. The user will need to zoom in and out and interact with the data (e.g. data tips, etc.).
The response I'm getting from developers is that's a lot of data to render in a plot in Flash. For reasons beyond the scope of this post, we can't sample the data to reduce the size (this has already been done and nature of the data prevents further sampling).
Rendering speed is critical for this app. What kind of rendering speed should I expect the Flex 4 line chart component to provide for a given number of points (e.g. 1 second to render 1000 points?)
Are there products available that handle plotting large data sets better, which can be incorporated in Flex (I've seen FusionCharts and ZingCharts online but have no idea how they compare with Flex's components)? Of those, which are easy to develop with while still providing a lot of flexibility in look and feel?
I'm trying to setup a DataGrid that contains a column of combo boxes. The values of the combo boxes are defined by data specific to that row. I cannot get this to work though, I'm asking for a solution to this, either fixing what I have below or a recommendation on a different way.One of the columns of my DataGrid has an object derived from a ComboBox for an ItemEditor. The itemEditor is set like this:
<mx:DataGridColumn editorDataField="selectedItem" dataField="type" editable="true" >
<mx:itemEditor>
<mx:Component>
[code].....
I'm interested in finding out the best approach to this issue, it's not technically difficult but there must be an elegant solution. Basically i have a form that features mostly text inputs, i would like to change the style of the input boxes based on the current state. I can do this in the mxml on each input...
[Code]...
I want to make a movieclip invisible initially but i dont want to set it manually within the properties in flash because i cant then see it on the scene.i could add some code like so:
MC Frame one.
this.onClipEvent(load)
{
this._alpha = 0;
}
but I cannot. How can i set the MC _alpha to 0 for all instances without adding it manually to each instance or setting it in the properties?
edit: or creating a class for it just to set the alpha.
I am loading an external SWF using the Loader class, and adding it to the stage with addChild.When trying to add a mouse click event listener to the MovieClip, using addEventListener, nothing happens, the event never fires.Is there a specific way to add listeners to externally loaded movie clips?My code looks somewhat like this:
var target:MovieClip = assets["screensaver"] as MovieClip;
target.root.addEventListener(MouseEvent.CLICK, onClickScreenSaver, true);
addChild(target);
The target shows up on the display, but the CLICK event is completely ignored.
having problems adding parts of a snake on through timer events
package {
import flash.display.Sprite;
import flash.events.KeyboardEvent;[code]....
I downloaded the trial of flash cs4 and have created a simnple flash.I am creating a simple slideshow, each of the slides should be clickable and redirect the browser.I created images then imported them and they were automatically converted to symbols.I combined the symbols using some motion tweens.I then created an actions layer and created clasic tween wher I want the user to be able to click.My problem is I cant get it working. I think I am not referencing the right objects.[code]I have tried setting the object reference to the motion tween instance name, the classic tween name on the actions layer and the symbol name none seem to work
View 1 RepliesI have a Main Menu swf with Menu selections. When you click on the Menu1 button it launches a separate swf file that will be doing allot of things. I have buttons, video etc. All with some sort of a addEventListener attached to them. Because the Main Menu is running and you have the option to select another button, which launches another swf, I am unloading the current swf. I can tell the video is still running in the previous swf because you can hear it. I use the SoundMixer.stopAll() and that stops the video. But what about all those addEventListeners?
This is what loads the external swf (Main Menu).
Lesson = external swf
var myLesson:MovieClip = new MovieClip();
addChild(myLesson);
myLesson.x = 205;
myLesson.y = 30;
[Code] .....
This is what unloads the external swf: I call this in a couple of places depending if the selection is in another external swf.
myLoader.unload();
I also have been noticing that the naming of instances is increasing allot in a few of my lessons. Don't know if that has an impact on anything or not. How do you control events running in a separate external swf from a Main swf or stop, remove them.
I have an AIR application running on a Mac and I want to have the behavior of hiding the window when someone "closes" the app (e.g. hits the red "x" button or cmd-w). However, if someone hits cmd-q or chooses "Quit" from the dock context menu or top level menu, I want the app to actually close.I can preventDefault on the "closing" event sent by the application, however, this causes all "close" methods to just hide the window. The only way for someone to close the application at that point is ForceQuit (or through a separate interface I provide, like a context menu option on the dock icon).
I have also tried capturing the cmd-q keyDown event manually, but it doesn't get sent. Also, this wouldn'tor the case when people try to quit the app using the menu options.Furthermore, if I preventDefault on the closing method, it causes my application to cancel a shut down process immediately (which is a terrible user experience).Is there a way to detect different methods of closing an AIR application? I want to be able to tell the difference between these closing methods and react to the appropriately.
I have to change the "Yes" and "No" buttons in an Alert.show(..), to another language (Dutch, for instance).
Is there a (easy) way to do that?
I forgot to mention - I have a -locale nl_NL in my compiler options, but it is still Yes/No
I know Flex MXML / AS3 very well. I also have good knowledge in C#,XAML and ASP.NET. I will be forced in the next years to do more HTML (Webapps) work. I could take ASP.NET but i dont like it really as i have to care about all that browser specific things and coding Javascript ist just horrible when you come from C# and AS3. Also ASP.NET isnt just as smooth in writing and using Components as it is in MXML or XAML. MXML (with FDT not FlashBuilder) and XAML also have awesome tooling for their Markuplanguage and their business language which i need. I know some Java too and willing to learn a new language if gives me what i need. I took a look at Vaadin and GWT but both seem to lack a Markuplanguage.
View 2 RepliesTextField objects have a built in context menu containing items which target cut, copy, paste, delete and select all events.i would like to map keyboard keys and modifiers to these events to obtain their free functionality.
View 1 RepliesI'm trying to recreate a UI for an application that my company makes in order to create an in-depth training companion to the application. One of the features is a weird tree view that works quite different from any tree view component I've ever seen, so I decided to create my own version of it as the Flash AS2 Tree Component doesn't have the functionality, and I haven't found any Tree Component for sale or download that works like that either. At first glance it seems like a standard Tree, except that it behaves differently if you click on the icon for each node than if you click on the label.
Some labels are links, some nodes can have 2 different labels, each with their own link, and most nodes have a second label underneath the label next to the icon (these don't have events assigned to them; they're just a quick way to view information). So anyway, I set up an XML file with all the information that I need (the easy part), but populating the whole thing, making sure each subnode can properly exist within each parentnode while allowing me to open and close them has been a real challenge.
Basically, I decided to use a whole bunch of loops to go through the nodes in the XML, but my lack of experience in using them is kicking my rear end. Basically, I need some code that can evaluate all the nodes in the XML and sort them within the proper hierarchies and then create all the clips in the stage to add the mouse events for opening, closing, and handling the links (which do not direct to the same event as when the icon next to that link is clicked).
I had Flex Builder 3 installed and working properly.
I then downloaded Zend Studio 7 (Eclipse) and installed the flex 3 plugin for it. Since doing that I now have a problem with Flex Builder.
I right click on the Flex project and select "properties->build path" there are now missing options. I should be able to add project references and SWC's. These options are simply missing. I basically get a blank window instead of the options.
I have tried completely removing both Zend and Flex Builder. I re-install Flex Builder and it's still the same.
This is on a Vista Ultimate system. I have tried running the installer as Administrator.
I've been trying to find if there is a way to do a clean uninstall of Flex Builder, can't find how to anywhere.
Is there any way to open a folder in Windows Explorer from Adobe AIR?
It looks like these APIs won't be added until AIR 2.0, but until then are there any workarounds that can be used to enable this feature?
LinkeSetFx has its own CollectionEvent, but I don't know how to map the LinkedSetFx event to mx.events.collectionEvent(I want use it in ComboBox). LinkedSetFx is in AS3Commons-collection framework.Here is the url, choose the as3commons-collections-1.0.0.zip, you'll find LinkedSetFx in srcorgas3commonscollectionsfx
View 1 RepliesI'm having a problem with this menu tutorial I followed from ASGamer. I have done and used most, if not all of the tutorials from that site.Anyway my problem is their base menu class;
package com.game.scripts.menu
{
import flash.display.MovieClip;
[code].....
I've got the following Flex code in an MXML file:
<mx:Label id="lblVersion" styleName="versionID" bottom="0" right="10" text="Version { BUILD::version }"/>
where the "BUILD::version" is meant to be substituted from symbols defined in compiler options:
-define BUILD::version "'LOCAL'"
The Flex plugin doesn't seem to understand the compiler option usage syntax and flags "BUILD" and "version" as "unresolved variable or type"