ActionScript 3.0 :: Reordering / Resorting A List Of Items And Moving Them Around?
Jul 23, 2010Basically Reordering / Resorting a list of items and moving them around.[URL]
View 1 RepliesBasically Reordering / Resorting a list of items and moving them around.[URL]
View 1 RepliesHow to make list items as tool tips for combo box items?
View 2 RepliesI'm creating a facebook application in flex. I'm actually working on the friends component that shows your friends who are using the application. now, each friend has a profile image.
I created the component using a s:List element.
In the Skin Class of the element i configured the requestedColumnCount to 3, which means it shows 3 friends. i added buttons to scroll left and right in the list.
Whenever I scroll to see a different friend, for a half of a second i see no image because the List component is loading the image in order to view it.
is there a way to make the list preload all the elements so i won't have this kind of problem ?
I'm using flex 4.1 to write an application. i read in the documents that has the rowCount property to set how many items to display. the does not have that property. how can I limit the list to display 3 items ?
View 3 RepliesI am working on an older Flash project created in CS3 ActionScript 2.0 How can I make the pointer cursor change to the hand when hover over a list item?_root.slidePanel.myList'myList' is the list. I have traced out the contents of the List MC and it has a child MC called 'content_mc'. I assumed this was the object containing all of my list items but the only members of this MC I can see (when tracing them out) are 'setRGB' and 'searchKey'.
View 1 RepliesHere is a snip from within my code:
[Code]...
The 'recommendations' dataProvider is an ArrayCollection of String, which are generally sentences about as long as this one. By setting the variableRowHeight and wordWrap properties as shown, if a sentence is too long to fit on a single line, everything works fine- the row expands and the messages show on two lines, or occasionally three.
The space allocated for this panel within the entire canvas means if the total text size of 'recommendations' exceeds six lines, I need for the entire list scroll. This is also working just fine. The trouble is when using the mouse wheel to do the scrolling- Flex scrolls both the entire list and the single item where the mouse is hovering. Often this results in only the second half of a sentence being visible. Non-programmer friends I have asked to look at this noticed this, and tell me it as a problem. If a user does not notice the dual scrolling, and sees only a fragment of a sentence, it will be perceived as an error in the application.
[Code]....
Why I have to press 2 times the arrow key down to get a navigation through the list items in a list component of Flash?
Theres any workaround for this? I have a listener for keyboard event that checks if keyCode is equal to 40 if it is then I use 'stage.focus = list', but I have to press 2 times key arrow down to start navigating through list items.
while i using drag & drop from listbox1 to listbox2 ,how can i get all the items of listbox2 in flex
View 1 RepliesFirst, here's what I want to do:
* Compile my library code into a SWC * Do not staticly link the Flex framework
At first, I tried just setting up a Flex module, clicking the "library" and "use framework as an RSL" buttons. This however doesn't compile any of my code into the SWC, and it basically just compiles a new SWC of the entire Flex framework, all resources and classes included.
Then, I managed to get my classes into the build using a custom compiler config, but it still includes the few Flex classes that I reference in my library code.
Finally, I figured I could use the custom flex-config.xml file, remove the parent reference to the library using <library-path append="false"></library-path> and then using a custom command line parameter (and also from ant), add -compiler.external-library-path references to the SDK and PlayerGlobal.swc. This should probably work, but Idea won't let me set command line parameters when I'm using a custom config file
I need to build something like a banner that shows two things. One is a picture coming in from the left or right side of the screen. The second is related text coming in from the left or right on the screen. I need to have it all controlled by an XML file that lets me specify the picture, direction the picture is coming from, text, and direction the text is coming in from.
View 1 RepliesI am trying create to move objects (boxes, named box_1, box_2 etc) to positions on the stage (xPos_1, xPos_2 etc) using onEnterFrames. I can make all the boxes move individually, but I cant get them to move together. I am using the following code in an attempt to move 3 boxes.
[Code]....
I'm creating my first game in Flash mx. Its a conveyor belt game where toys move from left to right. There are several boxes located underneath the belt. The user has to drag and drop each toy into its correct box. I want each toy to continuously come out in a random order. (1 idea) randomly select movie clips from the library? Each movieclip representing a toy.
View 3 RepliesI'm creating my first game in Flash mx. Its a conveyor belt game where toys move from left to right. There are several boxes located underneath the belt. The user has to drag and drop each toy into its correct box.
I want each toy to continously come out in a random order.
(1 idea) randomly select movie clips from the library?
I'm looking for a javascript style drag and drop reordering class or tutorial. if you move one clip, the rest of the clips will shift depending on where you drop it.
View 14 RepliesI have a Flex list and a custom ItemRenderer. I'd like to be able to have some items in the list use a different ItemRenderer (say, depending on the class of the item). Is this possible?
E.g.: <s:List dataProvider="{_systems}" itemRenderer="myItemRenderer"/>
Most items in _systems use myItemRenderer. But if element 3 of _systems is "specialSystem" the renderer would be "specialItemRenderer".
i want to alter the code in a way that every time 5 items are in a row the next 5 will be in another row with Y +200
Quote:
# var scroller:MovieClip = new MovieClip();
# this.addChild(scroller);
# scroller.y = 30;
[code]....
How do i add to a display list thats already has items on it?
this is what I have already
ActionScript Code:
public function LotteryDraw() {
// get the display list positions for each MC and text field...
var startButton = this.getChildAt(0);
[Code].....
i would like to have a list being appeared in wich the items appear gradually one by one.generating the list isn't a problem, but letting the items fade in after each other ?in a later fase these item would become button for in a menu. my current code, probably a mess:
title = new Array("house DC","residence GRK","offices J","youth hostel","house VDV","concordia");
var fadespeed="10";
dupMovie = function () {
for (i=0; i<title.length; i++) {
option.duplicateMovieClip("option"+i, i);
[code]....
if there is a way to get a manual text list (or an array or really just anything I could use to get an overview) of items in the library of an FLA...?
I have about 60 movieclips of different flags in my FLA- they all are "linked" to be used in Actionscript- so they have names there but are not named otherwise (as instances on the stage, for example).
Is there a way to get a list of them? I don't want to have to type them all out manually, if there is another way
I have a vertical menu which is generated via xml. Each menu item also has its own sub menu (not shown). When clicking on the top level item I want the rest of the items to move down to show the sub navigation. i.e.
menu item 1
menu item 2
menu item 3
menu item 4
menu item 1
sub menu 1
sub menu 2
sub menu 3
menu item 2
menu item 3
menu item 4
I have that working fine. Say if I have clicked on menu item 1, and the sub menu is displaying, before i have can view another sub menu I have to click on menu item 1 to close it before I can click on menu item 2.
This is the code that I am using to tell whether or not to move the buttons up or down:
Code:
menuButton.clicked = false;
menuButton.onRelease = function () {
if(menuButton.clicked == false) {
_root.moveMovieDown(buttonNum, buttonHeights);
menuButton.clicked = true;
[Code] .....
Basically I want to be able to click on any menu item button, if a menu item is open, I want it to close, and then open the new one. Just like this one. [URL
i have a simple array, for example: ( 50, 20, 60, 30, 10, 8, 15, 25) but need to output it in ascending numerical order ( 8, 10, 15, 20, 25, 30, 50, 60 ). Any one have a handy code snippet to do so?
View 7 RepliesThis is driving me crazy, it seems like it should be simple but I haven't been able to find any documentation on it anywhere. I have a List() that I've created and populated with a DataProvider. I want it so that when you click on a list item that item becomes disabled (in the same way you set list.enabled = false). Since I haven't found out how to disable the list, I have something like this which just removes the entry:
[Code]....
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[code]...........
i want to implement a simple list containing 6 items in action script 3.0. The screen shall show 4 items at a time and it has to get the key presses just to move UP?DOWN in the list.
View 1 RepliesI have been working on making a menu for list items. The file below has an animated menu. If you click on Artificial Intelligence on frame 60, it jumps to frame 61 (a specific section for that list item). How do I make the Artificial Intelligence button on frame 61 jump back to frame 60? I dont know where to add the action script for the function. I need to add a similar script to all 9 list items, do they go on one actionscript file? if so what location? [URL]
View 2 RepliesBelow is a function set that's used to get info from an XML source(s) and populate a List Component (videoList). Works great. The second function loads data from a separate XML source and populates the SAME List Component. When the second function is called it loads the data in addition to the existing data into the List Component. I want it to REPLACE the data. How would I accomplish this?
public function getXMLdata(event:Event):void {
var campXML:XML = new XML(xmlLoader.data);
var vid:XML;
for each(vid in campXML.vid) {
[Code].....
For the RSS I made a scrollable list of the items from the xml to show the time+title - this is working fine. Now when I click on the title it show on the text area (logText) the description. Now what I want is to add a link behind the description. I have tried with .link but it shows the whole link tag and not clickable link to the page...
function selectLog(evt:Event):void {
logText.htmlText = rssXML.channel.item[evt.target.selectedIndex].description;
Would be nice to have the link working.. like "read more".. clickable link... behind the description.
How do i link the items in the list to a button?
View 5 RepliesI created an isntant of a list component on stage called "myList" and added 8 items to it.I need to align the labels in this list to the right or center.It's on the main time line and not in a seperate as file (if it matters...).I tried using setStyle but it failed (not the solution or I used it wrong).
View 3 RepliesI have a list item with buttons in it like so:
<mx:List contentBackgroundAlpha="0" baseColor="0x333333" leading="10" id="weekButtonList" width="260" borderVisible="false" dataProvider="{_data.mappoints.week.@number}" itemClick="onWeekClick(event);" >
[Code]....
No matter what I do, these buttons have a vertical gap inbetween them. I have tried everything from setting the "vertical-gap" property to negative and positive numbers as well as changing the padding-bottom and padding-top on them. I want the buttons to be right up against eachother vertically. I have also tried "button-height" and padding on the List component...still nothing. How do I control this?