ActionScript 3.0 :: Delete A Node From Xmlon Id Basis?
Jul 31, 2009how to delete a node from xmlon id basis
< text id='1' x='1' y='1'><</text>
< text id='2' x='1' y='1'><</text>
how to delete a node from xmlon id basis
< text id='1' x='1' y='1'><</text>
< text id='2' x='1' y='1'><</text>
I need to delete some nodes from an XML variable and I want to keep the original intact. So I pass the XML to a new variable and delete the nodes from that one but the original changes with it. Is there a way to protect the XML from the original variable?
View 1 RepliesHow can I from AS make this
Code:
<match_statistics version="1.0" 01_06_2010 16:48>
Looks like this?
Code:
<match_statistics version="1.0">
Just delete the 01_06_2010 16:48 part.
I have a Flex tree with an ArrayCollection as data provider. The ArrayCollection is composed by objects linked eachother by the "children" field (that is an Array containing other children objects)
[Code]...
I have a tree with nodes , and a delete button , first user select the node and click this delete button , I want this node to be removed from the tree , Its not XML , every node in tree is of type Object
{label:'folder',children:[{label:'file1'}]}
I tried delete myTree.selectedItem (but compiler wont let me do it) also tried myTree.selectedItem = null (just unselects the item)and also how can I access reference to parent object of myTree.selectedItem ?
Is there any way to scroll Datagrid on timer basis.Let say there are plenty of records which can not be shown in one screen. And the screen is showing the first 10 records. An auto scroll should start after 5 seconds and bring up the next 10 records. Then again after 5 seconds the other 10 records and so on. A kind slide show effect.
View 1 RepliesI have a Flex LineChart which contains three series:
two LineSeries
one ColumnSet
Has anyone seen or heard of a way to set the dataTipRenderer on a per-series basis? You can only override it for the entire chart and I would prefer to not have to overlay multiple charts just to achieve this effect.
I'm trying to make a small game where u are able to shot on "things" falling from the sky... I'm done with the movement on my cannon and the shouting part. what is the best way to do the following: I have, let say, a ball as a movieclip and i want this ball to dublicate and randomly, on x basis, fall down, but i only want the screen to have a total of 10 balls falling at the same time and all of the balls has to have a unique number.
View 2 RepliesI have an AdvancedDataGrid tree with a ArrayCollection as its dataprovider. Now, for instance, i drag a leaf from one node to another node. To catch the event I'm adding a Listener to dragComplete.
[Code]...
My Problem: I want to know the new node where the leaf was dropped. Actually i would have expected that in the event there is a property like dropParent. This is not the case.
I have a tree im my mxml that uses a XMLListCollection as dataProvider. Itīs XML is like:
<list>
<conta nome="Plano de Contas" id="1">
<conta nome="Creditos" id="2" />
<conta nome="Vendas" id="4" />
[code]....
How can I make the node for, say, id==4 visible AND selected?
I just created an application in flash with the topic colour harmonies. You are able to pick three colours from a colour wheel. Those colours are transformed into a scaleable grid in the arrangement colour 1, colour 2, colour 3, colour 1, colour 2, colour 3,. If you scale down the grid to pixel squares you can see the mixed colour (usually it should be displayed grey then because of the color harmonie law). Now I want to compare this process to a computer generated colour out of those three basis colours. So is it possible to mix the three colours and transform the resulting mixture colour (usually grey again) into a new colour field? Or is there any function that does the same?
View 15 RepliesThis is my XML data in a file named nodesAndStuff.xml.
<?xml version="1.0" encoding="utf-8"?>
<root>
<node label="One" />[code].........
Now I have added my tree just below the list and I have saved counting from 10 to 19 in one.xml, 20 to 29 in two.xml and so on in different XML file. I have no clue how to connect the XML containing counting from 10 to 19 as the single node in tree at the selection of label one in list
i have a question whether we can create a new xml node in as3 node containing dynamic value inside.....
as like if i want to get like..var newNode:XML = <IMAGE FULL="fullimages/3.jpg"THUMB="thumbnails/3.jpg"/>
where the images are dynamic values...
I thought this was going to be easy! I would like to search an XML file for a particular data set i.e. set of nodes depending on a passed variable. However, storing a subset of my XML file via Code:var gallery = this.firstChild; and then searching 'gallery' as you would an array-using a for()-doesn't work since this.firstChild isn't returning an array
Code:
<gallery>
<collection title="Christmas 2004">
[code].....
I got these four errors when I tried to create a button on the stage that would delete the text I inputted in the inputtext(ti). Based on the scripts I have and the errors, what should I write to create the delete button?
[Code]....
I am implementing a flex auto-suggest combobox - as the user types in each character: Consider the string 'Stackoverflow' and user input = 'st'
1) the data provider is filtered to show all items starting with 'st'
2) text is set to auto-suggest string such that the un-typed part is highlighted.
So for instance, the combobox text may contain st'ackoverflow', where 'ackoverflow' is highlighted using setSelectedIndex()When I hit back-space or delete, and check the 'this.text' value, I expect that the last un-highlighted character ('t' in the above case) gets deleted and the data provider is filtered to show all items starting with 's'. However the text property contains 'st', as before
I've got some xml:
var xmlData:XML =
<1stNode>
<buttonID>first child node value</buttonID>
[Code]....
Then I want to read specific node value based on a value passed to a function. .
var buttonID = new Button;
var imageID = new Image;
var labelID = new Label;
[Code]....
I'm don't know how to get the value when node name is dynamically changed.
just trying to get straight how this works. Say I create some XML like so:
ActionScript Code:
var sample:XML = <sample>
<items>
[code]......
I'm developing a flash application that capture an input sound using the microphone object. Unfortunately in this way there's no possibility to get the sound frequency or the bands of the source. How to make Sound Visulizer on the basis sound frequency
View 3 RepliesI have flash where there is a link for song download. And, at the bottom of the flash I've a count, loaded thorugh flash vars which should increment everytime donload button is hit. Please let me know what approach should i take to do that. can i call a Java method on donload button which will insert a row in the table and and then get the count and render it to the count variable in my flash?
May be this extremely confusing. Here is a very similar example on how it is done. This is actually very similar to what i want to do. [URL] on this link there is count below which increments you hit the download button.
i have ade moultiple textbox at run time now i want to delete a textbox by delete key how it is possible .
View 4 RepliesI'm trying to use the delete keyword to remove nodes from an xml file and it just plain won't work.Here's a stripped down example of what I'm working with. Every node has a child named "deleteme". If its value is equal to 1 I want to remove it from the xml file. If its anything else I want to leave it be. The delete method is deffinately gettig call but it's having no effect.
<?xml version="1.0" encoding="utf-8"?>
<stuff>
<i>
[code]......
i have A,B,C,D moveiclip
now i want to delete a mc with delete key .if i select A then press delete key it will delete .
I have a datagrid called dg that has data populated to it thru an external XML. What I am trying to achieve is whenever someone clicks on an item in the grid it stores that items coordinates to a variable called locCoordinates. At this moment it is tracing out the coordinates for all of the items in the grid. I just dont know how to go about only getting the selected items coordinates.
XML Snippet
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Document>
<Placemark>
[code]....
Given
<nodeList>
<crazyNode>Data to be overwrited</crazyNode>
<simpleNode>Normal data</simpleNode>
<crazyNode>Actual data</crazyNode>[code]......
I want to get the last crazyNode (the one which contains Actual data).I know how to access the first node, for example:
nodeList.crazyNode[0]
And I guess a solution would be
nodeList.crazyNode[nodeList.crazyNode.length() - 1]
But for some reason I don't like doing that, too verbose and maybe there's a method more elegant.
This might be a stupid question:
Let's say I have:
var myXML:XML = new XML(<node></node>);
and I want to set a value for the <node>, so that the xml would become[code]...
I want to add new node to the current XML file. It already contain some data and I want to add new node with Flash. I know how to retrieve the data but don't know how to insert
View 3 RepliesDoes anyone know of a way to get an XML node's name? Or to call the node without knowing it's name? I'm looking for something generic and reusable, with the child-node name not hard coded. My XML looks like this:
Code:
<list>
<doc>145</doc>
<doc>388</doc>[code]....
I've tried to import a string into the class to replace "doc", using XMLList, descendants, elements, children, etc. and nothing seems to work short of turning the whole thing into a string and chopping it up later.
I currently have the following XML code:
[Code]...
That however didn't trace anything. how I can read the galleryname?
How would I move an XML node? For instance:
<root>
<child />
<child />
<child />
<child />
<child />
</root>
I want to move the third <child> node up one.