I'm making a OSX-finder-type file browser in CS4.The Structure for the folder and files is being generated by a PHP in a XML, heres an example:(sorry the xml is not sorted, but the command i'm using in php doesn't sort it)
I have a Canvas which has many components inside it and those again, have many components inside them.
getChildren() returns only the top level children. What is the best way to retrieve all the children (children of children of children and so on).
Well, I sorta know how to do this by iterating through the children, but the code is really messy. I'd prefer to use a nice recursive function. Has anyone written this before? Or is there a Util class to do this?
In this game attached I need the old Children (rats) to hurt the character when he walks into them, however only the most recently added Child is active in that way... also the rats seem to appear above the character instead of below, is there any way to resolve these issues??
I have a Sprite called pageContent. Inside pageContent are 12 more Sprites with unique names, a couple of Buttons, and some TextFields. Inside each of the 12 Sprites I have either one or two TextFields and one TextInput. My question is, since they are children inside a child of pageContent, how can I access them? Here is how I am trying to do it:
[Code]...
In my mind, this should totally work. But surprise, surprise, it doesn't. I have debugged it and it works fine for the first two lines, but when it tries to get numChildren of a Child of pageContent (line 3), I get this error: PHP Code: 1119: Access of possibly undefined property numChildren through a reference with static type flash.display:DisplayObject.
I want to have a rollover effect of a movieclip (mo1) inside a movieclip (mo) of another movieclip (popup1).Is it possible to do that? I try calling it using this code in the frame 1 of my flash, am i doing wrongly?
Newbie to XML here and I have what I *hope* is an easy problem, but I just don't know the answer. And as I have to try and show this by Monday, I'm sort of stuck. I am trying to pull in information about houses via an xml file. Each house has 1 address, 1 owner, 1 description, and about 6 photos. I have no problem accessing the address, owner, etc, and I can always access the first photo, but whenever I cycle through the photos, I seem to cycle through the first photo for every house, not every photo for each house.
Basically, I need the children <images> to go up by one, without the the parent going up by 1. I am hoping I am describing this well. My code looks like this:
I am trying to pull in information about houses via an xmlfile. Each house has 1 address, 1 owner, 1 description, and about 6photos. I have no problem accessing the address, owner, etc, and Ican always access the first photo, but whenever I cycle through thephotos, I seem to cycle through the first photo for every house,not every photo for each house.Basically, I need the children <images> to go up byone, without the the parent going up by 1. I am hoping I amdescribing this well.My code looks like this:
total = xmlNode.childNodes.length; totalb = xmlNode.childNodes[0].childNodes[5].childNodes.length;
for some reason STORAGE[0].getChildAt(0) works whereas liner.getChildAt(0).getChildAt(0) does not. STORAGE is a movieclip and a child of liner. the error is something about not being able to use getChildAt on a display object. what's wrong? is there any other approach i could use? PS: liner.getChildAt(0) works and does indeed seem to refer to STORAGE[0]
I am using a GroupingCollection to bind my advanceddatagrid. I have used groupingcollection to group the data by date.
Now I need to select the data in the datagrid through the code. I need to loop through the adg's dataprovider and select the item that matches the criteria for the selection.
Does anyone know if its possible to access children elements in a SWC? I have created some MC's and inside of some of these MC's I have some dynamic textFields. I export the content to a SWC and load it into my Flex project. No problem loading it or accessing the parent elements, they display fine. But I want to access the textfields nestes in the MC's and modify the text. When I debug the app, I can see the textfields as child elements. It's typed as a TextField and the Instance Name is the same as input in the Flash IDE but I cannot access it. When Flex compiles it throws an error saying it doesn't recognize the method. I've tried to insert actionscript on the timeline, linked external classes and nothing can be accessed.
I have a custom component extends from skinnableContainer and only has two NumericSteppers.I explicitly set focus to my component like myComponent.setFocus(). It sets focus to first stepper which is correct, but when I press TAB to move focus to next stepper it moves focus to the next Component.
I set tabEnabled = true and tabChildren=true of the component, still no luck. How could I set focus to next stepper on pressing TAB?
I'm resizing a chart and want to take a picture of it when all the children of that chart are done updating.
For example I'm drawing some stuff on the chart after the size changes. I've tried chaining a bunch of callLater() but I'm still running into problems on slow computers.
Raising an event when the last children has executed doesn't seem to work as it might take a while to draw (hence the callLaters).
Is there a best practice to find out when something is done updating?
I'm trying to build a webmap application in flex. For this, I've got a fxg-file which represents the maps. It's in a also there are some elements, like POIs, text etc., in this group. I zoom the with scaleX and scaleY, this works just fine for the map. But the problem is: All children zoom also. I don't want this. They should stay the same place on the map and the same size.
Heres some code the as function <fx:Script> <![CDATA[ import mx.skins.Border; [Bindable] public var hoehe:Number = 1; [Code] .....
ComponentsLakwView contains some labels etc. This should not be resized?
I have an ArrayCollection with following structure (when viewed in debug mode): [0] - [0] -- src - [1] -- src src is the path to an image.
I need to get all of the src's out of the arraycollection. However because of the first (unnamed) node I can't take them in. I've tried ArrayCollection[0].children and save the result in another ArrayCollection, however the new ArrayCollection has 2 Objects in it but no 'src'. There are just 2 null objects firstArrayCollection is filled with the data as described above. secondArrayCollection.addItem(firstArrayCollection[0].children);
When viewing the content of secondArrayCollection i see following structure (and data): [0] null [1] null
I'm having sizing issues with a TabNavigator. The direct children of the TabNavigator are Canvases, and within these I am adding Images. I'm trying to resize the images to fit within the Canvas without scrollbars. The Canvas height is set to 100% of the parent, which is the TabNav. Then I'm setting the image.height = parent.height *.9. The result is that Flex is generating scrollbars because the images are too high. It appears that the root cause is that the height property of the TabNavigator is the height of the entire component, including the height of the tabs. I'm assuming therefore it also contains that little strip of space between the tabs and the children of the TabNavigator. This makes sense, but is there a property that returns only the height of the children? I'm aware of the scrollbar policy properties and I've experimented with those. I know I can also try a different multiplier for the image size to get it to fit. It just seems like there should be a property to get the size of the space for the children.
but i want to achieve this dynamicall with arrays, objects, or arraycollection (as applicable).I need to loop through each string path using string methods which isnt a problem but how do i create "DYNAMIC" (depth) children?
I'm using as container for my LinkButtons. I would like to know 1) How can I remove the space between the items in my Tile container. 2) How can I set dynamic width for my items (at the moment they all have the same width regardless the width of the included component) 3) How can I avoid to display scrollbars if the items are not included in the container
If I have a container, and I set clipContent to true, how do I get the total height of the children inside it? Is there a method for doing this without itinerating through every child and summing the heights?
One of my decoration bitmaps covers up some important elements in my flex application. The problem is these elements become not clickable. How could make the bitmap not clickable or how could I pass the click event along to those children elements below?
I've got a problem while migrating my TabNavigator from Flex 3 to Flex 4.5. Stripped to the bare minimum, the following code will produce the bug, namely that the second child of the TabNavigator fails to be created properly:
I can access the attribute, but if i am selecting "Thread Works" i want only access <product catalog="Thread Works"> with children node , for additem to array collection
I've got a Flex 3 application with an HTTPService returning an Atom feed. I catch the result from it and store it in an arrayCollection which is then the provider of my Datagrid. I have no problem accessing the data from the "first-level" of my Array, but cannot go under it. Not very clear, so here is some code:
The "title" column shows the data correctly, but the status column is empty ! When I launch my app in debug mode, I can see that my notesArray has the correct format and I can access todo -> status with the value..