Actionscript 3 :: Flex 4 - Access A Specific Cell By Index?
Sep 20, 2010
I would like to edit a cell by the row and column indexes so essentially do the following:
advDataGrid[2][3] = "Dogs"
so that I am setting the data grid row 2 and column 3 to Dogs. I cannot for the life of me figure out how to do this!
Side note: I need this because I am trying to allow the user to copy a section of an excel file to a section of an AdvancedDataGrid like Google Docs does. I am using this idea to do it: [URL]
I am using the default TileList component in AS3/CS4, where a user can upload their images and it is displayed in the TileList by using the URL of the upload as the source parameter.The final piece of the puzzle is knowing the dimensions of the image that was uploaded, but bugger me if I can find how to access each image that is displayed in each cell of the tilelist. I can of course get the dimensions of the cell itself (which of course is always the same for each one), but I want the content of the scaled image within the cell ..
I'm trying to get an absolutely positioned DIV to display in front of a Flash object; I can get this to work in every browser except Chrome.There are a couple of similar questions on here, but nothing pertaining to a problem with Chrome specifically. I've tried several of the suggested solutions, such as setting the 'wmode' param to 'transparent', and setting z-indexes for both the flash object and the div, but nothing seems to work.URL...There is some green text: "Click here to begin", which should appear in front of the Street View panorama. In Chrome, you can see that the DIV appears in the correct position, but is then obliterated by the Flash object.
The question I have today is concerning a design of a Flash Website. Is there any certain way you will need to design a flash site so it can be viewd over cell phone with web access. The reason I'm asking is that I have a friend that say he can view some flash site and some he can't. So I'm thinking tat must have something to do with the way the site is designed.
I have a datagrid and I need the user to enter data in one of the columns. I have gotten that far, but I havnt been able to get the data the user types in. I need the input from the user. How do I retrieve it
percentColumn = new DataGridColumn(); percentColumn = dg.getColumnAt(3); percentColumn.cellRenderer = LoaderCellRenderer;
i have a few filters on a sprite. on mouse over i would like to access one of the filters in the filters array, but i'm having a bit of trouble trying to accomplish this.
I need to insert string in another string in specific index. var str1:String = "A"; var str2:String = "LoremIpsum"; I need str2 to be "LoremAIpsum", insert str1 in index 5 in str2.
I have a textBox and I am using it as a mail address input field where the user can type in several addresses, a bit same as in hotmail. Each address is rendered into a clickable button. Thus upon double-clicking on a specific address I want the item to be editable. After having edited the address when the user taps enter, the item is added to the list of mail adds.I am adding it using the code below:
flowBox.addChildAt( myItem, myindex);
However addChildAt seems to add the item as the last item in the list. But I want it to add the item the position where it was originally. Say the item was at position 2 in the mail list, after editing adn tapping enter, it should add at position 2 itself and not at the end of the list.
I have a textBox and I am using it as a mail address input field where the user can type in several addresses, a bit same as in hotmail. Each address is rendered into a clickable button. Thus upon double-clicking on a specific address I want the item to be editable. After having edited the address when the user taps enter, the item is added to the list of mail adds.I am adding it using the code below:flowBox.addChildAt( myItem, myindex);However addChildAt seems to add the item as the last item in the list. But I want it to add the item the position where it was originally. Say the item was at position 2 in the mail list, after editing adn tapping enter,
awhile back I completed the load random swf tutorial provided here on kirupa. But now I want to load specific swf files when the screen is refreshed or when someone clicks on the home or index. here is the code, can anyone point me in the right direction?
I am adding movieclips (myBall) to the stage by the click of a button. There is a base class applied to myBall which allows it (and its children) to be dragged and dropped. Within the base class on mouse down, along with startDrag, the movieclip is being brought to the top index. I would like to be able to refer to this movieclip in my document class. The point of doing this would be to apply a function to the last clicked movieclip (finding what movieclip was last clicked would happen by applying the function to the movieclip (myBall) with the highest index).[code]...
This adds five new instances of the Thing class through the main timeline. In the Actionscript code for the Thing class I want to be able to reference the index of the given instance for identification purposes.
Upon the stage of my flash movie, I have several symbols (movie clips) which I need to address dynamically using a loop. The symbols that I want to address all have instance names beginning with the string "lamp_", they then each have a different number concatenated on the end to distinguish between them (e.g. lamp_1, lamp_2, lamp_3.....).
The following noobish effort I have devised is totally useless, and I am hoping someone can show me how I might get this working[code]...
In a flex tileList, is there a way to get the cell-address of a given item? i.e. for a given item, get the row/column location for that item in the list.
I have a flex datagrid to which I need to add this functionality: user clicks on particular cell, window should pop-up with additional information about the value in that cell. The pop-up might need to be another datagrid with more info.Can u provide flex code for this.I am new to flex.
I have an editable datagrid with a dataprovider which is basically Numbers. Is it possible to delete a value? When I do it it puts a 0 in that cell but I really need an empty value, like a Null or a NaN whose are going to be cleaned later with a labelFunction. BTW I also need the cells to keep the 0 if needed to.
I'd really like to be able to make Flash's array access syntax 'wrap' over the array's bounds.
Lengthy explanation -
var array:Array = ['a','b','c','d','e','f'];
To keep things simple, the first index is 0, and its value is the first letter, 'a'. To get that value, we'd do this -
array[0]; // returns 'a'
As long as the index you're using to access the array is between 0 and array.length (6 in our example,) everything works fine - but if you use an index outside of those bounds, you're shut down.
array[-3]; array[9]; // both return 'undefined'
Sometimes that's a good thing - sometimes you expect that to happen, and you're fine with it. Other times, you find yourself wishing (or at least I find myself wishing) that it'd behave a bit more like this -
array[-3]; array[9]; // both return 'd'
(e.g. a photo gallery that jumps back to the beginning when you click 'next' on the last photo)There's a little chunk of code I use over and over for this sort of thing, but it's always to alter the index before passing it into the array:
var index = -3; while(index < 0){index += array.length} array[index % array.length]; // returns 'd'
... and that's fine, but what I really want to do is extend the Array object itself so that it'll automatically 'wrap' index values that go out of bounds.TL;DR - Is index-wrapping possible by extending Flash AS3's Array object?
How do I determine which Flex AdvancedDataGrid cell - row and column index - I've just dropped onto? calculateDropIndex seems to give me the row, but how do I get the column?
I have a Flex DataGrid, which has some columns, i had put a item renderer, which makes all the elements in that column hyperlinked, i have a requirement, where i need to see the type of user, based on that i have to either enable or disable the hyper link.
Is there any good way , where i can get the style properties at the cell level...?
I have datagrid with data populated.when user clicks on one particular cell of one column ,popup window has to be dispayed.And also same requirment is there for another column also.I could not find how to do it for cell.doubleclick and click properties are applicable to row selection.
I want to select information in a single cell from my DataGrid in Flex 3.
Specifically, I'm displaying three phone numbers per line and the user needs to be able to select one of those numbers, from any row, but not the whole row.
While similar to this, I am displaying the DataGrid to the user. The answer for that question was to manipulate the dataProvider, how can I know what cell I've selected in order to do that?
I have an AdvancedDataGrid that loads data from a web service. It only loads the top level stuff and then as you click the arrows it gets that data. All I want to do is to find out if some text is in one of the cells. I originally did this:
public static function assertTextInAdg(params:Object):Boolean{ // Gets the ADG trace('youre in the assertTextInAdg function'); var grid:* = FPLocator.lookupDisplayObject(params); trace('var grid:* = FPLocator.lookupDisplayObject(params): ' + grid); [Code] .....
And then it fails, because it can't get the source, I think. I am completely open to other strategies and I have been stuck on this problem for 10 days now. This seems like it would be relatively easy. I have been going down a slightly different route. I am now trying to iterate through the HierarchicalCollectionView with a cursor. This seems to work. But, when I get the node I can't do anything useful with it... I have been looking for examples but so far they all stop at the point of getting the node.
public static function assertTextInAdg(params:Object):Boolean{ // Gets the ADG trace('youre in the assertTextInAdg function'); var grid:* = FPLocator.lookupDisplayObject(params); trace('var grid:* = FPLocator.lookupDisplayObject(params): ' + grid); [Code] .....
I am creating Flex application.When enter data in data grid cell that time i want to check that cell value is less then 20 and if it not then change that cell's back color to red.