The question seems to be simple, however it create problems for me. I have a dataGrid with two dataFields: peerID, name. The information in a grid updated dynamically when new user joined the group (I'm creating a chat). I need that information about user deleted from a grid after it's disconnect. So, on "NetGroup.Neighbor.Disconnect": event i want to compare "event.info.peerID" value with all peerID values in a grid and delete info about disconnected user.
I'm trying to use next construction:
for (var i:uint, len:uint = txtDataArray.length; i < len; i++) { if (txtDataArray.source[i] == event.info.peerID) {
[code]....
But it doesn't work at all!
I'v noticed that construction txtDataArray.source[i] (or txtDataArray.getItemAt(i) ) returned [object GridColumn] insead of value. So, I have two questions:
1) How to get the value of exact cell?
2) How to organized info delete after user disconnect?
I have an Array retrived from XML via xPath. I then compare one bucket with a string and dont get the result i want. It seems that the XML string isn't really a string.
i placed a movieclip with a textfield in it on the stage.i want to compare between the textfield.text value to a string' but always recieve a false value when i'm doing it.when i use trace:
I need to compare a number with a element in a Array(curModeDisplay), I can trace the element and see it without problem. But when I try to compare the inside element with a String, it didn't work. Why?
ActionScript Code: curModeDisplay = new Array(); \this is the Array I need for (var tvM:XMLNode = tv.firstChild; tvM!=null; tvM=tvM.nextSibling){ curModeDisplay.push(tvM.childNodes); \received element fine here } trace(curModeDisplay); \ This works fine. Array displays correctly
When I need those elements from the Array(curModeDisplay) and try to make some comparison work, it did not work:
ActionScript Code: function DigitCompare():Void{ for(var index in curModeDisplay){ if(curModeDisplay[index]=="11265"){ //it seems didn't work here
[code]....
Is that because the element in the Array is reference to the XML node, and "11265" is String. If so, how should I fix this problem. The "11265" will be changed to any named String type variable in the future.
I have a String variable in my flex (flash builder 4) application containing CSV data. I need to allow the user to download this data to a local file. For example, giving them a "csv" button to click and it might present them with a save file dialog (and I would be sending the contents of my string variable).Is this possible / how ?I am using the ResuableFX component for the datagrid to csv. This the code I ended up with that works to save the string to a text file for the user (in a web browser):
var dg2CSV:DataGrid2CSV = new DataGrid2CSV(); dg2CSV.includeHeader=true; dg2CSV.target=adgEncounters;
I am trying to compare a user inputted string to a variable already created. When I do this with int it works fine but when I try changing it to strings I can't get it to work.
How to compare a string with strings inside an array for a match? I have a file in which each sentence (or word) (generally string) is present in a new line. Opened the file and read the contents to a string.
Code: private function readHandler(event:Event):void{ _str = _readStream.readUTFBytes(_readStream.bytesAvailable); _strArray = _str.split(" "); //contains each string that appears in a new line _length = _strArray.length; [Code] .....
But this doesn't work. Seems like if(_input == _strArray[i]) never gets executed even if they are equal. What might be the problem. Is there some better way to so it?
I have a flash movie that displays a list of movies. It uses an xml file to get this list.The xml file changes frequently.I'd like to know if there's a way with JavaScipt, to compare the xml file in the cache and the one in the server, if they are different, the script alerts the user and then refreshes the page.
Is there any procedure yet for importing vector formats AutoCad dxf or Adobe Illustrator ai into Flash using Actionscript 3?You can manually import them from the Flash File menu.Seems like there should be a method to dynamically import dxf or ai drawings with Actionscript.
I am looking for a easy way to convert Autocad polygons to swf files. Is there a converter for that? Or is there an intermediatory format that can be used to convert from polygons to the adobe flash swfs. Each polygon would be a swf file.
I need to compare a random numbers of XML files, sometimes is 3 and others 500, the swf need�s to loop the entire directory and check each XML to see if the TAG inside of it it�s equal to the SWF filename, here�s what I got until now.
ActionScript Code: var file_name_only:Array = _root._url.split("/"); var file_swf:String = file_name_only[file_name_only.length-1]; //var file_swf='6723.swf'
With 5 variables consist of a value, I would need to check if any value between fa to fe has a gap of 6 in integer as in f1=1, f2=0, f3=0, f4=7, f5=10; and between f1 and f4, which has a gap of 6.
Let's say I have created a class named Store. This class has several elements such as Name, PhoneNumber, Owner. I've created 2 instances of this class and want to know which values are different. So lets say that Store1 and Store2 are instances of this class.
Is there a way to automatically loop through all elements of a class instance and compare them to the same element in another class instance and return something when they differ?
which tool should i use QTP, RIATest , Selenium for Flex Application Functional Automation Testing. please help me compare them with different advantages and disadvantages.
Basically I'm trying to output the contents of an XML document into a dynamic text field (as loaded - not just its node values and content - the entire thing - into a variable called _root.log). The text field is set to show the variable value of _root.log.This is the actionscript...
PHP Code: var newProfileXML:XML= new XML("<contacts result='true'><contact name='John Doe'/><contact name='Jane Doe'/></contacts>");
I have some components declared in MXML tags, with some properties and event handlers.For some of them there is the need to re-instantiated, so I came up with the following architecture.Array of components that will be re-instanciated at some poin:
of course i could hardcode that - but if I then change something about the as file, the linenumbers won't be correct anymore, or maybe i rename the as file and so on. It'd be great to be able to create that string somehow using compiler directives. Is this Possible in an AIR application created with ActionScript 3.0?
The dictionary use strict equals(===) for key comparison, how to change the comparison, so I can use my standard for comparison, for example, I have a class named Student:
class Student{ var id:int; var name:String;[code]....
I want Dictionary use id to compare if the two keys are equal, not use strict equal(===) to compare if the key is the same.
I have a text file called testa.txt,In it it reads simply var2=value1When I test the code the text file loads properly.I have two dynamic text boxes. (This is all in a single frame for the whole movie on one layer)One text box dyn_text displays what it should: value1The second text box dyn_texta is supposed to tell me if what the value of dyn_text = value1 or not (is true) (YES or NO)dyn_texta is always telling me NObut I can't get it to work.Could you please tell me how to fix this?Code here:
Code: myData = new LoadVars(); myData.onLoad = function(){
I suddenly find that there are many "normal" trace in my file flashlog.txt (supposed at your Window's location:{SysDrive}:Documents and Settings{yourName}Application DataMacromediaFlash PlayerLogs).
normal normal normal normal normal normal 1/10/2011 15:32:13.008 [INFO] org.spicefactory.parsley.core.view.impl.DefaultViewManager Add view root: null/flash.display::Stage normal normal normal
But when I run the application with the FlashBuilder, the logging in the consul page is ok, it doesn't include any "normal" String.I thought that the output of the flashlog.txt file should be the same as that of the consul of FlashBuilder.And I don't think I have added such a stupid trace in my code.The question is how can I find out where these "normal" trace come from and how to remove it.