I'm instantiating a group of RadioButton components into a Sprite and then later adding it to the display list. When the latter occurs, I can visibly see the font of the RadioButtons' labels changing from a serif to sansserif—but I have NO code to that effect anywhere. This occurs long after the components are actually instantiated, when they (via their parents) are added to the displaylist.
In Question_UI.answersContainer.answer:
answerUI = new RadioButton(); answerUI.group = rbg; answerUI.label = text;
[Code]....
I've triple-checked the obvious, but there's NO code regarding the font of the label at all. It seems to only have to do with being added to the displaylist.
How do I assign a value to a radiobutton when it's in a for loop to then trace out the value when radiobutton is clicked? I got this now, but it just sets all the radiobutton values to 10..
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:
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 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 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 string variable that I'm using to keep track of something. After all is said and done I'm building a string that is the same name as a movie clip that's one the stage. However I cannot get it to work,this is how the clip in question has been added to the stage middle_layer.addChild(restore_mc);restore_mc.name = "restore_mc";
variable page out is "restore_mc" **
// this is my code when I want that clip to go to and play the in label
var outClip:MovieClip = new MovieClip(); //outClip.name = getDefinitionByName(pageOut)(); outClip.gotoAndPlay("in");
this is an alternate route I've triedvar outClip = pageOut as MovieClip;outClip.gotoAndPlay("in");
I've got a weird issue with the RadioButton(fl.controls) when I add it to the stage.Here's a quick way to reproduce the issue:create an empty MovieClipadd a RadioButton componentset the width of the component to a value smaller than 100trace the container width The container width will trace 100 even though the RadioButton instance on stage is less than 100 wide.If I add the component from code, it works if I invalidate the stage after adding the RadioButton first, then check the container width in a Event.RENDER handler.
I have been searching around for a while now, and cant find anything. In Flex, I need to be able to change the fontWeight of a RadioButton that is selected to bold. So, when a RadioButton is selected, it would call a function in AS3 that would set the fontWeight of that selected RadioButton...
valveRadioGroup.addEventListener(Event.CHANGE, changeRadioHandler); private function changeRadioHandler(event:Event):void { //change this RadioButton's fontWeight to bold
I am making a quiz application for mobile.The questions are comming from xml. How can i make multiline Radiobuttons? I tried to do a skinclass but it didn't worked.In this code i make the RadioButtons.
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 was writing a custom chart component where. To add labels, I create a spark label and add it on screen. Although all other labels rendered, I noticed that the zero label does not render at all. Here's my code:
var invisibleTextField:TextField = new TextField(); var zeroLabel:spark.components.Label = new spark.components.Label(); zeroLabel.text = "0"; zeroLabel.name = "0Label";
[code]....
After multiple attempts, I figure that the label discards "0" as an empty string. I managed to workaround using spaces before and after the zero. Only one space would also do, but I needed center aligning.
I'm wondering if there is a better way to approach this than my current solution...
I have a list of items, I then retrieve another list of items. I need to compare the two lists and come up with a list of items that are existing (for update), a list that are not existing in the new list (for removal) and a list of items that are not existing in the old list (for adding).
Here is what I'm doing now - basically creating a lookup object for testing if an item exists.
Comparison of number or string is understandable. But how come when in flash AS3.0, we do :
var a:TextField = new TextField(); var b:TextField = new TextField() ;
[Code]....
Is their some Application-wide ID, that flash gives to each component instance. Or is it compairson of the strings ( comparing the whole path of each component )