Flex :: Add Icons To A PopUpMenuButton Using A XML File?
Sep 4, 2009
I've been looking at the following example for populating a PupUpMenuButton [URL] and would like to add icons to each menu. Ideally, I would specify the icon in the xml and assign it in a similar way to using labelFunction for the text. The only information I've found via google is to create a menu as follows
(seems I can't include more than one url, but it is an example that creates a menu object using the following function):
private function initMenu():void {
menu = new Menu();
menu.dataProvider = xmlList;
menu.labelField = "@label";
menu.iconField = "@icon";
}
but I would really prefer to build it all from the XML file.
View 1 Replies
Similar Posts:
Jan 18, 2011
I am trying to create a popupmenubutton, with images and label as its nodes. But I am unable to embed the icons. It gives me and error(given below). Thou the label alone are working fine.
<mx:PopUpMenuButton id="menu_file" labelField="@label" itemClick="{menuClickHandler(event);}" visible="false"
height="20" left="0" top="0" width="15" alpha="0.5" cornerRadius="5" useHandCursor="true"[code].....
This gives me an error: Initializer for 'Embed': unrecognized compile-time directive.
View 2 Replies
Sep 23, 2010
I've got a PopUpMenuButton in a Flex 3 application. If someone clicks on the pulldown part, it works fine. But, if they click on the main button part, I get get ReferenceError: Error #1069. After the user dismisses the error, it then does what it's supposed to do.
<mx:PopUpMenuButton
id="myPopUpMenuButton2"
label="Flip"
labelField="@label"
[code]....
View 1 Replies
Dec 10, 2009
I am trying to create a slider that when changed either adds icons or subtracts icons.Here is what I got:
Code:
package
{
import flash.filters.*;
import flash.ui.*;
[code].....
View 5 Replies
Jul 23, 2009
I have PopUpMenuButton. I want to make it so that a mouseover (over either the button or the "V" part) pops open the menu. I don't care about the button click.I tried to do a My_PopUpMenuButton.dispatchEvent(new MenuEvent(MenuEvent.ITEM_CLICK)) when another button was clicked, but that didn't work.
View 2 Replies
Sep 11, 2010
I'm working on an Adobe Air Desktop App ATM. My question is how to get the icon for a given file extension, but without actually loading up a file of such type.
I had the idea to just create a blank file for the extension and then delete it once i have the bitmap for its icon, but that seemed like too much trouble and kinda inefficient.
So for example i want to get the icon associated with a .txt file, or .html file. Is their any way of doing such without having to directly reference and existing file , or create a temporary one as mentioned above?
View 1 Replies
Jul 28, 2011
I am trying to place an image besides the label in y-axis. So I have created a custom label renderer(A HBox containing and ). The source for the image has to be set based on a property present in the data provider. The problem is, I am not able to access the BarSeriesItem in the fnSetSource() method.
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
width="1280" height="750">
[code].......
View 2 Replies
Jan 27, 2009
I am not new to html or flash but, some what new to XML. I created a carousel based off the tutorials and it works great on my computer but, when I create an html file and attach the .swf file the flash file loads but, the icon images or anything from the .xml file doesn't appear.This is what I use to load my .swf file :
<div id="spacer">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" [code].....
Do I have to put a special script in the html document for it to be able to see the xml file?
View 1 Replies
Oct 21, 2010
In a dropdown how to get icons along with text and once we select any of the index from the dropdown i want that icon also be selected and to be displayed on that dropdown header
View 1 Replies
Dec 3, 2010
I can display the icon of a file that has been associated with that file in the native OS.
I have a tile list of a folder's contents. For images, I display the image, for everything else I display a generic image. However, it would be great if I could tap into the OS and just use the icon that the OS uses. For example, if I have installed Microsoft Word on my computer, then when I view a word document in the file system it will display the word icon that Microsoft created for word documents. For MP3's it might be an iTunes type sound icon, if I have iTunes installed and so on.
Basically, for all the files in my tile list I want to just show the same icon that Windows, or Mac OS would etc.
In addition to this, if the OS creates a thumbnail for the file (images, videos and PDFs for example) is it possible to tap into this OS generated thumb?
View 2 Replies
Feb 9, 2012
I have the skin below for my buttons:
<?xml version="1.0" encoding="utf-8"?><s:SparkSkin
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
[Code]...
I was wondering how I can add a different image for different buttons which have the same skin.
View 2 Replies
Oct 21, 2011
I have this sample of Popupmenubutton, I want to know how to enable & disable popupmenubutton elements at run time?
[Code]...
View 0 Replies
Apr 5, 2010
can i add system icons (.doc, .ppt icons etc) into my flex application without embedding them into the application directly.
View 2 Replies
Jan 25, 2011
I can't seem to work out how to enable icons in the AIR Debug Launcher. This seems to work on Linux, but when I run it on Windows or Mac only the Adobe AIR icon shows. I have specified the location of the icon in <icon></icon> in the application descriptor file.
View 1 Replies
Jun 4, 2010
i have a sequence of buttons and each button has its own icon. I was wondering if I have to create a Spark skin file for each button in order to assign its icon.
View 1 Replies
Dec 15, 2010
In the MX TabBar component, the iconField property allowed us to display different icons in each tab. In Spark, there does not seem to be an inherent way to add icons to the TabBar.Does anyone have an example of implementing icon support for Spark's TabBar?
View 4 Replies
Aug 2, 2011
I want to add two icons on spark button.I am using button skin.But the icons are not coming properly.
<s:HGroup width="100%">
<s:HGroup id="iconContainer" top="1" bottom="1" left="0" right="0"
horizontalAlign="{iconPosition}" verticalAlign="middle">
<mx:Image id="iconImage" source="{icon}" />
[code]....
View 1 Replies
Feb 28, 2011
Anyone successfully added an icon to their tabs in <s:TabbedMobileApplication> ? I've tried just using something like:
<s:ViewNavigator firstView="views.appmobile_HOME" width="100%" height="100%" icon="@Embed(source='../assets/home_icon.png')"/>
I've also tried in <fx:Script> something like:
[Code]...
Neither of these methods worked, and to be safe i used the same code to embed an image on the screen and it works!. I just can't seem to get the icons to appear in the tabs also note - I was doing all of this in my main mxml file, just incase you're familiar with the Flex Burrito "Mobile application" file structure. And another thing is that I don't get any errors when trying these methods. It lets me compile and test it.
View 1 Replies
Jul 23, 2011
I have to designed a datagrid, in first column i have to use closed lock icon. when i click a row in a datagrid the selected rows' icon should change as opened lock icon. how i can achive this task in flex 3.
View 2 Replies
May 13, 2011
The traditional way to assign an icon would be to use the icon field of the item renderer,which reads the value of "icon" property in your data, for example:
listData.addItem({label: "Logout", icon: "com.classpth.DefualtThemeLogoutIconClass"});
But i want the DefualtThemeLogoutIconClass to changed to another class: ightThemeLogoutIconClass when the theme is changed.The only way to do this would be to use a style declaration containing a classReference to the icon, and change its the value in each of the CSS files of the various themes.The question is, is there any way to assign this style to an icon in a List, something as easy as intuitive as list[0].getIcon().setStyle("styleName");
View 1 Replies
May 14, 2009
Im looking to have a combobox dropdown with the name of an operating system along side its logo ie Image -> Red Hat 5 This is my code so far
[Code]....
View 1 Replies
Aug 26, 2009
I'm using this code to play flv [code]...
But I want to hide all icons (Play, Stop, timeline and scroll bar), how can I do that?
View 4 Replies
Jan 15, 2009
I have a project using 2 groups of radio buttons. Each group needs its own icon. I can skin the RadioButton Asset, but that affects ALL radio buttons. I guess U need to be able to change the icon property on an instance-by-instance basis.
View 7 Replies
Jun 18, 2010
there are two icons that become visible when a mc is selected, a small crosshair and a small circle. Sometimes they're in the same place, sometimes not. I understand the small crosshair is the origin, where all transforms originate from, but what's the circle, and what does it mean when the two icons are in different locations?
View 2 Replies
Jul 11, 2011
Is there a way so that I can add icons to my swf files? Or can I convert them to .exe and then add icons to them?
View 8 Replies
Jan 19, 2010
i have been making some little animated icons and I have gotten stuck on one in particular.I think I have attached an image of it here. What I want to do is start off with a solid red triangle and animate it being sucked or beamed up into the spaceship, as you see in the picture.I want it to look kind of like the triangle is dissolving into little particles which are being sucked into the spaceship
View 4 Replies
Nov 18, 2010
Here's my listBox code for a listBox called myList (pretty basic):
var xml:XML;
function onLoaded(e:Event):void {
xml = new XML(e.target.data);
[Code].....
In addition to the text label (to the left of it, actually), I'd like to have a square icon (an image thumbnail) with each row in the list.
View 8 Replies
Oct 26, 2010
I'm trying to set my own icons for Air for Android using Flash CS5. I see the icon tab within the Air Android Settings panel, but it won't let me navigate to my icons. Also, I would add the path to my manifest.xml file, but it gets overwritten while publishing.
View 1 Replies
Aug 15, 2009
Does anyone know how to get rid of the reflection off the icons in the carousel?
View 3 Replies
Feb 18, 2004
I need to make a dance dance revolution-type game. the icons are gonna fall from the top of the screen and the player has to press the keys on the keyboard that correspond.
View 1 Replies