Flex :: Changes To One Variable Propagates To Another?
Dec 8, 2009
For example I have two ArrayCollection's - firstAC and secondAC. If I do secondAC = firstAC, and than I make changes to secondAC (prehaps put a filterfunction on it) it somehow propagates to firstAC, would anyone tell me why that happens in Flex or Actionscript 3?
What can I do if I only want secondAC to get all data from firstAC but then when I make changes to secondAC it does not show in firstAC?
View 4 Replies
Similar Posts:
Feb 8, 2010
I have 2 movie clips, one being loaded into a container MC via "loadMovie();"In the main movie there is a variable with no value, in the external movie there are 5 frames, each with a value to update the variable in the main movie.
IE: if on frame 1, global value = 1 / if on frame 2, global value = 2 / etc etc I'm familiar with passing variables INTO an external swf, but am stumped on how to do it the reverse way.
View 1 Replies
Dec 11, 2009
I would like to store a hex colorPicker value in a variable and then cast the value of the var backout to a textInput. The textInput is just to see witch hexcolor i have choosen.
thus meaning seeing 0x000000 in the textInput.
what i've done now is pretty simple i have bound the flex colorPicker directly to my textInput. but i want to store the value from the colorPicker in a var first and than spit it backout to the textInput to see the value that i have picked.
When i pick a color value that begins with the number 0 it drops the 0's at the beginning of the number and only spits out the numbers greater than 0. (000033 becomes 33, FF0000 stays FF0000). I want to catch the whole value or write some kind a function to figure out how many 0's got dropped and concatenate it together with 0x. Store that all into a var and bind it to the flex TextInput.
This is what i've got.
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
[Code].....
View 1 Replies
Aug 17, 2009
How can I access the member variable of an object by using a variable in the name.Example:
Entries Object has properties 1, 2, 3, 4, 5.
Normally I would access them by
var i : int = Entries.1;
[code].....
View 1 Replies
Jan 3, 2006
f you know PHP...then you know that you can create a string variable...and then use the value of that variable to declare another variable. like this:
PHP Code:
<?php$foo = "haha";$i{$foo} = "success";print $i{haha};?>
and it would display "success"...or like this:
PHP Code:
<?php$foo = "haha";$$foo = "success";print $haha;?>
and it would also display "success".
View 6 Replies
Feb 7, 2011
I have the following XMLList and am trying to return the XMLList with the node having the label Mail Box or Outbox, depending on string variable called folder. folder can either be equal to "Mail Box" or "Outbox".
`<fx:XMLList id="treeData">
<node label="Mail Box">
<node label="Inbox">
[code].....
View 1 Replies
Mar 21, 2011
For example, I've got var for RegEx DSX-?2 I need add this var to RegEx and get this .match(/DSX-?2/gi)
View 2 Replies
May 10, 2011
I've got a little question answer app that I've created. Everything is working fine but now I'm trying to make the quiz more dynamic by loading and uploading different quizzes from a database.
I seem to have almost everything working fine but I've ran into a bit of a problem converting my answer check function from static to dynamic data.
Here's a bit of my code.
if (b1.selected != true) {
q1a.styleName = "incorrect";
q1a.text = incorrect + b1.value;
score = score -1;
}
Like a said this seemed to work fine with static content just checking if the radio button was selected or not.
I need to replace - b1.selected with my database variable in this case its pertestq1a.
pertestq1a currently equals b1.
How can I add my variable to this if statement to be recognized as an element id?
View 2 Replies
Jul 12, 2011
an easy answer for 99% of you. I have a custom class 'Users()'. In PHP I have all the values being populated correctly. When I go to Flash Builder - and do the test function - All the data comes back properly. However, when I click a button and refer to the lastResult property of the CallResponder - it comes up NULL the first time, and then if the button is clicked a second time it will return the correct result. What step am I missing? I had the same problem with something simliar last night and am getting BEYOND frustrated - especially since I know it is some SMALL detail I'm overlooking.So just for clarification - lets say there is a button named button1So button1's click handler:1) Validates the text input properties2) Asks the server if that user and password match3) If they do - then I want it to grab all of that specific users info and put it into a User class. Again - when I test this function/method from within Flash Builder all the values come back as they should. It's just on the first button click they come back NULL...he second click they populate fine - I.E.-
Alert.show(currentUser.userFirstName); (First Click - NULL)
Alert.show(currentUser.userFirstName); (Second click - "Jack")
View 1 Replies
May 15, 2011
i have a variable take away another variable which makes answer1 variable i then want answer1 to be to the power of another variable how can i do this in flash
View 5 Replies
Oct 23, 2009
In Flex I want to create XML variable like this but parser complains about CDATA in publisher tag:
<mx:Script>
<![CDATA[
private var myXML:XML = <book>[code].....
How do I pass xml text with CDATA into XML variable being in MXML Script?
View 1 Replies
Dec 7, 2009
I need to pass a variable in dispatcher tag... for instance
[Code]....
Now how can i pass the user in the mate dispatcher tag.
View 1 Replies
Jan 17, 2010
I need to know how I can parse a variable path in Flex 3 & e4X. For example, I have two XML strings where the name of one element is the only difference.
[Code]...
View 3 Replies
Feb 16, 2010
I am sending userID through urlRequest like below code,
[Code]...
now when new window is opening in that new swf is opening(new project) that is also in flex only.there i need to retrive userID when initailizing only how can i retrive?
View 2 Replies
Feb 25, 2010
i want to populate a horizontalList component from a xml file, the width value will be inside the xml file as well with all the data.actually i have this code:
<mx:Model id="epg" source="epg.xml" />
<mx:Component id="customRend">
<mx:Label text="{data.description}" width="{data.width}"/>
[code].....
View 1 Replies
Mar 23, 2010
I've got the following Flex application markup:
<app:MyApplicationClass
xmlns:app="*"
width="100%"
[code]....
View 1 Replies
Jun 13, 2010
I'm new at as3, maybe thats the reason why i don't understand, why the setInterval causes an error.
<mx:Script>
<![CDATA[
import flash.utils.setInterval;
[code].....
View 1 Replies
Nov 4, 2010
private var nsPlay : NetStream = main.media.nsPlay;When nsPlay changes,main.media.nsPlay should change accordingly;vice versa.
View 2 Replies
Jan 15, 2011
I'm trying to read the address of a flv file from an xml file and then put it in the "source" property of a videodisplay tag .
[Code]...
View 1 Replies
Jan 26, 2011
Does anyone know some ActionScript api to get String of a variable name like following:
var foo:int;
var variableName:String = getName(foo);
trace(variableName);
The console need to show "foo" as the result of trace(variableName);
View 2 Replies
Jan 29, 2011
The crux of my issue is that I want to allow my application to be able to read off a number on the end of the address. i.e. someone accessing [URL] will then access the application which can come up with information pulled from a database unique to 123456. Now I'd know where to start looking if I was using say html, but with flash builder/flex/actionscript etc.
View 3 Replies
Feb 7, 2011
I've got htmlText that I'm pulling form a db. I'd like to put a variable as the color and then set the variable in flex.[code]...
View 1 Replies
Mar 17, 2011
I am trying to create a xmllist variable in action script like this:
var _menuData:XMLList;
<menuitem label="File">
<menuitem label="Backup Schedule"/>
[Code]....
How do I assign this xml to _menuDAta in actionScript? I dont want to create a string first and then do it all by fixing line break errors.
View 1 Replies
May 15, 2011
Declare variable in flex vs this? [code]...
View 1 Replies
Jul 15, 2011
I'm getting the "Error #1009: Cannot access a property or method of a null object reference." error on my application. Is there a function I can use to detect this before it causes an error... maybe something like:
isValid(variableName);
I know there's one, because i've used it before, but i can't remember what it is right now.
View 4 Replies
Aug 10, 2011
I build an application that need httpservice feature. This application will be deployed at some computer. So, I don't have an idea to set variable at url property.
<mx:HTTPService id="personRequest" url="[URL]" useProxy="false" method="GET" resultFormat="text" result="personJSON(event)">
<mx:request xmlns="">
<getPerson>"true"</getPerson>
</mx:request>
</mx:HTTPService>
I already try with block {}, but no use. Can't I set a variable at property url mx:HTTPService?
View 1 Replies
Sep 14, 2011
what is the use of flag variable in the flex RegExpValidator. what I am to do is to create a validator that can provide variety of error messages as in EmailValidator
View 1 Replies
Oct 11, 2011
I have a app that currently gets event data from facebook and displays this into a list[code]...
View 1 Replies
Nov 23, 2011
I've been trying to get FXG to work in my Flex app, it works and renders fine but what I'm trying to accomplish is a sort of a gallery with data about the images in a database. I used to be able to use <s:Image source=/path/{variable_name}> but now I have to import the FXG files and can't use <s:Image> anymore. Here I can display a static FXG image.
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fxg="assets.fxg.*"
tabBarVisible="false" title="{data.name}">
[Code] .....
Trying to do <fxg:{data.picturename} /> blows up.
View 1 Replies
Dec 14, 2011
My requirement is not to dynamically embed fonts in Flex, but to dynamically embed variable in Flex.[code]...
View 3 Replies