List component skin or style problem
I am building a scrolling list that pulls data from a xml
file, and binds the data to a list component
I am trying to figure out how to change the look of the list
component.
I need to create a rounded backgound for each list item and I
would like to use a symbol for this.
I can't find a setStyle property to change this and if I try
to adjust the HaloTheme.fla there is no List symbol to change.
How do I access the graphic being used by the list component?
Thanks for any help
You could write your own CellRenderer and apply it to the
list.
http://www.adobe.com/support/documentation/en/flash/fl8/samples.html#component_samples
Similar Messages
-
Skinning List component by code
i have two List component. i want them to have different
skins. i think this can be done using code but i m not abel to do
it.
what i tried was
myList1.setStyle("upSkin",myNewSkin1);
myList2.setStyle("upSkin",myNewSkin2); //myNewSkin1 &
myNewSkin2 are movieClips in my library that
//are exported for Action Script on the first frame.
but this dont work.
plz help
thanks in advancei dont understand y i dont get a single response in this
forum since the last few days. is it that no one has faced this
issue before? sounds strange... -
Problems With List Component Flash Cs3
Hello Friends,
I am working in Flash Cs3.
I am having a List component in my application.
I added 10 items into my list component. Now out of those 10 items, i want to disable particular list items like Item 4, Item 8, Item 9. How to do this using flash cs3 or flash 8.0.
Item1 -- Enabled state
Item2 -- Enabled state
Item3 -- Enabled state
Item4 -- Disabled state
Item5 -- Enabled state
Item6 -- Enabled state
Item7 -- Enabled state
Item8 -- Disabled state
Item9 -- Disabled state
Item10 -- Enabled state
Any suggestions/ideas would be really appreciated.
Regards,
RajeshHello Friends,
I got a partial solution for this. Now i can able to disable a particular list item using flash cs3. I achived this. But it was happening only after clicking the item values....
But i need in a diff way like, as soon as you run the flash file it has to disable. how is this possible in flash cs3.
this is the code :
import fl.controls.List;
import fl.controls.listClasses.CellRenderer;
import fl.controls.listClasses.ListData;
import fl.events.ListEvent;
import flash.display.Sprite;
import flash.events.Event;
import flash.text.TextField;
var sampleItem1:Object = { label:"John Alpha" };
var sampleItem2:Object = { label:"Mary Bravo" };
var sampleItem3:Object = { label:"Trevor Gamma" };
var sampleItem4:Object = { label:"Susan Delta" };
var myList:List;
var tf:TextField;
ListDataExample()
function ListDataExample() {
createList();
tf = new TextField();
tf.x = 10;
tf.y = 125;
addChild(tf);
function createList():void {
myList = new List();
myList.move(10,10);
myList.addItem(sampleItem1);
myList.addItem(sampleItem2);
myList.addItem(sampleItem3);
myList.addItem(sampleItem4);
myList.rowCount = 4;
myList.addEventListener(ListEvent.ITEM_CLICK,listItemSelected);
addChild(myList);
function listItemSelected(e:ListEvent):void {
var cr:CellRenderer = myList.itemToCellRenderer(e.item) as CellRenderer;
var listData:ListData = cr.listData;
if(cr.listData.row == 2) {
cr.enabled = false
tf.text = "Row selected: " + listData.row;
waiting for your replies.
Regards,
Rajesh -
Displaying Text in List Component
I am using AS3 to load data from an XML document into an Array and use the Array as a dataProvider for a List Component. If I addChild the list to the main timeline, everything works fine. All 38 elements show up in the list with readable text. When I addChild the list into a MovieClip, all 38 rows of the list get created, but no text shows up. What the hell is going on? Does anyone know what the fix for this is and why in the world this is happening?
Here's my code:
TOCList = new List();
TOCList.dataProvider= new DataProvider(TOCArray);
TOCList.labelField="theLabel";
TOCList.y=75;
TOCList.width=250;
TOCList.height=350;
addChild(TOCList);
When I change the addChild(TOCList) to navBar.sceneMenu.addChild(TOCList) the list shows up formatted correctly, just no text.I figured it out with help from another web site's forum and the problem was that the MovieClip that I was loading into was masked, so the font needed to be embedded and my code...
var myFormat:TextFormat = new TextFormat();
myFormat.font="Tahoma";
TOCList.setStyle("embedFonts", true);
TOCList.setStyle("textFormat", myFormat);
...wasn't working, but I didn't know, because the text wasn't showing.
The fix was actually to use the StyleManager...
StyleManager.setStyle( "textFormat", new TextFormat("Arial") );
StyleManager.setStyle( "embedFonts", true );
...to force all components to this style.
I have no idea why the above code doesn't work. If anybody knows, please tell me!!! -
List component row manipulation
I have two questions regarding as3 list component:
- I'd like to highlight and keep selected the item a user last selected from my list component. I've combed the live reference as well as google and must be typing the wrong search words. I can tell what label and index an item was that was selected but am not finding a way to highlight and keep highlighted the user's choice in the list component.
- Also, I'm exploring the notion of inline buttons within a list's rows. If a user hovers their mouse over a row, a set of small buttons come up the user can click on for further functionality. This may be more of a make your own component answer but I'm exploring it nonetheless. Any thoughts or comments on this?
Thanks!no something else is going on. Or perhaps you didn't explain your problem clearly.
After servlet b calls getList() you have two servlets each having a reference to the same list
A------\
List
B------/ -
Using a List Component to create a photo gallery.
This feels like a lot to be asking but i'm gonna go ahead and
ask to see what happens.
I'm trying to figure out how to use a list component to
select 6 items from a large list, display the words to the 6
selected items (in a text field), then finally (by pressing a
button) I would like to load the 6 corresponding pictures for the
selected items into a seperate frame. If there is anyone that could
point me in the right direction it would be greatly appreciated. I
have been trying to find information online about programming the
List Component but haven't had any luck. Is there a book that
anyone recommends that could help me? I've been doing simple
animations and websites in flash but i'm now looking to learn some
actionscripting as well. Thanks.Hi PinkPowerRanger,
Per my understanding that you have two fields in the table "Date and Time picker" which is Date/time type and another is "Item ID", you need to get the Month from the Date field to display in the X-axis and count(Item ID) related to each
month to display in the Y-Axis, right?
I have tested on my local environment and can do this by create two calculated fields to get the month and year values from the Date/Time field.
Details information below for your reference:
Right click the main dataset to select the "Add Calculated field", specify an name of the new calculated field and add the expression in the field source as below:
Year: =Year(Fields!Date.Value)
Month: =MonthName(Month(Fields!Date.Value))
Add the three field in the Chart as below and remember in the Value area you have got the Count(ItemID) but not SUM(ItemID):
Preview you will got the chart like below:
If you still have any problem, please feel free to ask.
Regards
Vicky Liu
Vicky Liu
TechNet Community Support -
Help with a vertical scroll bar issue with a List component
hi. i have a basic <s:list> that uses an XMLListCollection as it's data provider and a very basic itemrenderer. when a row in the list is clicked a function gets the list.selectedIndex then populates some text fields with more xml data. that all works fine.. the problem i have is that the vertical scroll bar on the list seems to be "clickable" - just like a row in the list. the scroll bar scrolls normally but when it's clicked the selectedIndex becomes -1 which is not helpful b/c the value -1 is passed to the XMLListCollection.
any ideas? cheers.thanks but still problematic...surely the <s:List> component shouldn't return a value when the scrollbar thumb is clicked? i created a very basic list (see below) and made the list dimensions short enough so that there is a vertical scrollbar and found that when the scrollbar thumb is clicked the trace(event.currentTarget.selectedIndex) returns a number. that's annoying b/c i just want a selectedIndex value for a row that is clicked not the scrollbar.
any ideas to get around? cheers
<fx:Script>
<![CDATA[
protected function list1_clickHandler(event:MouseEvent):void
trace(event.currentTarget.selectedIndex);
]]>
</fx:Script>
<s:List x="162" click="list1_clickHandler(event)" y="276" labelField="@label" width="144" height="153">
<s:dataProvider>
<s:XMLListCollection>
<fx:XMLList xmlns="">
<node label="one"/>
<node label="two"/>
<node label="three"/>
<node label="four"/>
<node label="five"/>
<node label="six"/>
<node label="seven"/>
<node label="eight"/>
<node label="nine"/>
<node label="ten"/>
<node label="eleven"/>
</fx:XMLList>
</s:XMLListCollection>
</s:dataProvider>
</s:List> -
Need help displaying images with List component for Flash CS4 (ActionScript 3.0)
Hi folks:
I am an inexperienced user of Flash CS4 Pro (v10.0.2). I am attempting to use the List component with ActionScript 3.0 to make a different image display when a user clicks each item in a list.
I did find a tutorial that showed me how to make different text display using a dynamic text box and the following ActionScript:
MyList.addEventListener(Event.CHANGE, ShowSelectedItem);
function ShowSelectedItem(event:Event):void {
ListText.text=MyList.selectedItem.data;
...where My List is the instance of the List component and ListText is the dynamix text box. In this case, the user clicks an item in the list, defined by the label value in the dataProvider parameter of the List component, and text displays as defined in the data value in the dataProvider parameter.
However, as I mentioned to start, what I really want to do is make images display instead of text. Can anyone provide me the steps to do this?
I appreciate your help (in advance)!!
CindyHi...thanks for responding! I was planning on using images from the Library, but if there is a better way to do it, I'm open. So far, I just have text in the data property. This is part of my problem. I don't know what I need to put in the data value for an image to display. Do I just put the image file name and Flash will know to pull it from the Library? Do I need to place the images on the stage on different frames? I apologize for the "stupid user" questions, but as you can tell, I'm a newbie.
Appreciate your patience and any help you can offer!
Cindy -
Hello!
I have some trouble with the list component in my
application. The thing is that the keyboard interaction don't work
proper. I've found out that it is my function "transferParameters"
who spoils it. The function looks like this:
Object.prototype.transferParameters = function(ref)
var i;
for(i in this)
ref[ i ] = this[ i ];
I am using the function to duplicate objects without making
the instances refer to each other.
What should I do to get the keyboard interaction to work?
Regards TobenNope that doesn't seem to solve the problem. I tried putting
the listListener function and all the variable definitions outside
of the onData, but still have the same problem! Is there a thing
with the List component that you have to click into them before
they're activated or something? Or might it be something with
Firefox? It works almost all the time in IE.
Thanks,
Mukul -
List Component multipleSelection and wmode
I'm trying to use the list component with multipleSelection
set to true; however when I set wmode to transparent in FireFox the
multiple selection breaks. It appears to function properly in IE.
Does anyone know of a workaround for this?
Thanks in advance!"however, we need wmode set to false"
So what exactly is the problem then... if you need wmode set
to false, then don't add the param and you won't have it. -
Highlight color in list component
Hi there
Can anybody tell me how to change the color from the default blue that the list component uses for the currently selected item.
myList.highlightColor = something; ??
Many thanks- Doubleclick your list. -> goto frame 2
- Doubleclick the 3. (Cell Renderer Skins) -> goto frame 2
and you will see
there you can doubleclick preferred over, down states... -
Why doesn't list component identify grid component
Hi,
I have couple of doubts.
1. I put <grid> component inside of <List>
component . Surprise! The <List> component is not identifying
the <Grid> component. Is this bug of Flex Or it's property of
Flex <List> component.
What I have to do to make <Grid> visible even I put
inside of <List> component.
2. what is an equilanat of <Table> in Flex. Ofcourse it
may be DataGrid. Suppose If I use DataGrid I have lot of
restrictions.
These are the problems I am facing with <DataGrid>
( i ) Is this possible to put radio button / link bar as one
of column in a row. I mean how to put radio button / link bar as
row in array
( ii ) Is it possible to make columns in a row as variable
sizes i.e. suppose if DataGrid header has size=100. Is it possible
to make column of next row size as 200.
anybody help me in this regard. I am eagarly waiting for
reply.Because I have been strugling to solve this problem for last
4 days.
Regards,
Siva KumarA custom itemRenderer will be the solution to several of your
issues(1,i).
For 2., there is no exact equivalent of an html table. Look
at Grid, TileList, or consider making your own component.
for ii), no, all cells in a columns must be the same size.
Tracy -
PM:Task list Component addition
Hello Guys,
We are facing below issue.
1. In task list component screen, if we add a component via Direct entry, system create Standard BOM.
2. If we add the component via component selection from BOM, it creates the material BOM.
The second method is preferable as changes in BOM is reflected in task list as the link is maintained. This is not an issue if we are creating task list manually as we can select the component manually. But however, if we create task list via LSMW or load program, the issue arises.
When contacted SAP on OSS, SAP advised to use BADI IMRM_COMP_PROCESSING, method SET_COMP_PROCESSING with
E_CORRECTION_ACTIVE = ' '. This seems to resolve the issue. But I am not sure of the side effects.
Has any one implemented this BADI earlier and can share the experience?
Thanks
Ashish Barsagadehi,
U can assign material BOM in Tasklist header... there is a Assembly field... just enter the name of Material BOM. and Material BOM would be attatched to task list.
it will solve ur problem
Regards,
Amit kushwaha
Edited by: amit kushwaha on Feb 25, 2008 10:45 AM -
Scroll one item in List component
Hello!
I use List component for song list in my flash music player. Everything works ok except for one problem - when the name of the song is too long, user can't read the full name of the song. One solution would be to use the horizontal scroll bar, but I have a better solution on mind: would like the current song automatically scroll (go around like in mp3 players). I guess I have to get current song's DisplayObject, to change it's x coordinate, but how? Maybe there are other solutions?
Thanks in advance,
elvmanOh, I forgot to mention that I am using ActionScript 3.
-
The App Store really needs a Wish List component
I love the App Store and the thousands of offerings, but with so much to browse, it would be helpful to have a Wish List component so that I could "park" things for later study. After viewing many, many apps, I sometimes fortget just where I saw a particular one. I'm not always ready to buy on the spot. A WL would solve that problem.
Message was edited by: Ruth Brown1I totally agree, I'm a DJ, and buy a lot of music, so I need to be sure that I really want that music. A want list would make it so much easier. A friend of mine don't use iTunes store because they don't have one.
I also think that they should have 1 minute samples instead of 30 seconds.
Maybe you are looking for
-
i have an old ipod touch that i have not used in a very long time, and im having trouble gettign it to turn on. ive had it on a charger for over an hour now and still nothing hs changed. i just updated my itunes to the current version they haev so i
-
Item Status can be controlled for open Sales Order
Hi All, Is there anyway we impose restriction on changing the status of the item if there are any open Sales Order against it? Example: If an item A is in Active Status and has a Sales Order with Awaiting Shipping Status. Before the order is booked i
-
[HELP] Windows 7 Boot Camp Boot Problem?
Hi, I have a problem when booting windows 7 after installing it using bootcamp. Here is what i did: 1) Used Boot Camp assistant to "Install Windows 7 or later version" (Last tick box option) - This also partitioned my drive. 2) While Windows 7 was in
-
GE70 and Windows 8.1 Update
Hi there, I was wondering if anyone has managed to update their GE70 running a pre-installed Windows 8 64bit to the Windows 8.1 that Microsoft rolled out. The update shows up in the Store but download doesn't seem to start. I tried downloading the IS
-
Hi, I had a PC that crash the hard drive. I want to eliminate the autorization so I can have an available authorization for another computer. Thanks for your help. Regards