Xml :: Initializing A Collection From MXML?
Aug 9, 2004
How do I write a combination of XML declarations and Actionscript classes such that I can initialize each of my three lists from XML?
note that I am not trying to populate a Flex UI element (such as a DataGrid) with the various number-name pairs. I'm just trying to read the data into a plain old vanilla collection. (Once I've got my collections initialized, I can populate DataGrids or whatever at my leisure.) I can't find any documentation of how to address this super-simple case. The documentation all assumes that I'm trying to do something much more complicated, such as accessing a remote database, which confuses the issue tremendously.
View 3 Replies
Similar Posts:
Feb 3, 2010
How does one initialize a collection instance from MXML in Flex/Actionscript?[code]...
View 1 Replies
Aug 25, 2010
LinkeSetFx has its own CollectionEvent, but I don't know how to map the LinkedSetFx event to mx.events.collectionEvent(I want use it in ComboBox). LinkedSetFx is in AS3Commons-collection framework.Here is the url, choose the as3commons-collections-1.0.0.zip, you'll find LinkedSetFx in srcorgas3commonscollectionsfx
View 1 Replies
Jun 30, 2011
When I get a collection back from the service tier, I create an ArrayCollection and apply a sort. When I add an item to the collection later on, the sort is still in place? It seems to be the case. I thought I was only sorting it once, not applying a sort that will stick??Here is the method for adding an item:
private function onAddNewClick():void
{
var fileTemplate:FileTemplateDetailDTO = new FileTemplateDetailDTO();
[code].....
View 4 Replies
Sep 16, 2011
I have an array, crewPositionsAC that contains a list of position abreviatations - EP, PR, DR, WR, and so on. These positions are read in through an XML file each time my flex application loads. Also being populated from an XML is a project. Within a project, there are positions (a student assigned to a type of position listed within crewPositionsAC). These positions are not necessarily in the correct hierarchy order dictated by crewPositionsAC. I have all the positions within an ArrayCollection (positionsAC) with the following structure:
positionsAC (arrayCollection)
[0] = Array
[0] = startOffset
[1] = numDays
[code].....
Then, the user can click a button to add another position. When the "Add Crew Member" button is pressed, the user is presented with a list of possible positions to add. Currently, I simply add another array to positionsAC. This results in the recently added crew member to placed on the bottom of the list. I need to take positionsAC and reorder it based on it's [2] item (role) based on the hierarchy defined in the crewPositionsAC. crewPositionsAC has the following structure:
crewPositionsAC:
[0] = EP
[1] = PR
[2] = DR
[3] = WR
* continue until all possible position types are listed
View 2 Replies
Sep 24, 2009
Does MXML get compiled down to as3 and then converted to flash bytecode? Also, is there a significant performance penalty to compiling mxml vs compiling as3?
View 3 Replies
Jun 4, 2011
I am working on a custom Flex 4 component which is an aggregation of two existing flex components. I would like to be able to specify my own custom properties for the component as well as access the existing public subcomponent properties via MXML. For instance I might want to adjust the font color or style for the label and text input. toy component which aggregates both a label and a text input:
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[code]....
View 1 Replies
May 28, 2011
I am trying to override a Button class, i have a few properties which i wish directly initialise with the mxml description of the component, like :[code]which function is triggered ( in order to override it ) when all properties with mxml description is fully initialised with their values ?
View 1 Replies
Feb 3, 2011
What I'd like to do: create an MXML component with some children, then extend it via MXML to create a new component with more children, without losing the original set.In other words
create a component bc.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
[code].....
View 1 Replies
Jun 22, 2011
I'm trying to do this using only mxml, no <script> tags, although I don't necessarily need a solution that's only mxml. It was more of an educational exercise to see if I could do it all in mxml. I have a custom component that has a slider and textinput and their value/text properties are bound together. I'm surfacing a few properties of the slider in my component so that it can sort of be treated like a slider.
[Code]...
View 1 Replies
Sep 27, 2011
i have defined some functions in a component mxml file let us say addbutton() now i want to call this function in main mxml file.
View 2 Replies
Apr 23, 2010
main.mxml
[Bindable]
private var _dp:ArrayCollection = new ArrayCollection([
[code].....
View 1 Replies
Jun 19, 2011
I have 3 mxml components. In Component 1, I let the users fill in some data. In Component 3 I want to use the data, but I can't find a way to make it work.
View 1 Replies
Jan 30, 2005
this is my code
stop()
container.loadMovie(_root.movie)
this.onEnterFrame=function(){
[code].....
View 1 Replies
Jul 7, 2009
I have a FLA named Window.fla containing a movieclip that contains several other MCs, one of which has the instance name btnContact. This 'parent' MC is in the Library: it's called MainNav and its linkage is set to export, with its class pointed at com.utils.MainNav, the code for which is:
package com.utils {
import flash.display.MovieClip;
import flash.events.*;
[Code]....
View 3 Replies
Jan 31, 2010
I am new to flash programming and am trying to create an empty 2D array.I have the Code:
ActionScript Code:
var squareList:Array = new Array(new Array());
Init();
[code]........
View 1 Replies
Apr 16, 2004
Im having trouble loading a clip through loadMovie and setting some properties of that newly loaded movie at the same time. For example I have an XML object loading data from a php page. The onLoad for that XML object loads a basic table movie, and tries to set the title and body fields of that movie. The problem is that I can load the movie, but I cannot set the properties of that movie until much later. Below are the examples of the failing code.I just cant figure out how to load data into a loaded movie. Ive even tried to include the table movie in the library of the main movie, so theres no loading latency. Even preloading the movie and jut duplicating that preloaded movie.
//frame actionscript
this.info.onLoad=function(success) {
if (success) {
[code]....
View 1 Replies
Jul 15, 2010
I've been working on a project for a little while now, and only yesterday did it start acting up. I added a bunch of new classes, and then two new functions and a few variables in the document class and then tested it only to find that it didn't work. I put a trace statement at the very beginning of the class: nothing. I commented out the two functions: nothing. I commented out the variables, and this time it worked. So I uncommented the functions: stopped working. I decided to check through the variables to see which ones would work, if any. One of them, a GTween instance, did work.
This is in a custom classpath: com.gskinner.motion.GTween. I tried other variables: only a few of my custom classes work (also in the same com folder, but a different path obviously), a few classes from the bit101 path work, but not all of them. The compiler doesn't throw any errors, and output doesn't show anything. It just comes up with my background and that's it. I neglected to mention that it wouldn't even work with some of the classes in the current directory. Some of them were fine. Now, however, it works with those classes that didn't before, but GTween is a problem instead.
View 13 Replies
May 30, 2011
I have a quick question for you all. I'm trying to convert over some ActionScript code to C++ and am having a difficult time with this one line:
private var edges:Vector.<Array> What is this exactly? Is this essentially a multidimensional vector then? Or is this simply declaring the vector as a container? I understand from researching that vectors, like C++ vectors, have to be declared with a type. However, in C++ I can't just put down Array, I have to use another vector (probably) so it looks like:
I don't expect you guys to know the C++ equivalent because I'm primarily posting this with AS tags, but if you could confirm my understand of the AS half, that would be great. I did some googling but didn't find any cases where someone used Array as it's type.
View 1 Replies
Aug 7, 2011
It seem to be buggy for 2 situations, I declare a timer for the socket
[Code]...
In certain situation, NativeProcess will hang itself too, this lead me to wonder if anyone encounter the same issse?
View 1 Replies
Jul 7, 2010
suppose i have 3 buttons(for example say, productin, marketing, sales ) on my main.mxml..once i click on one button it should take me to abc.mxml page with production data, once again if i click on second button it should take me to the same abc.mxml but with marketing data. same as for 3rd button also, how can i achieve this ?
View 2 Replies
Oct 19, 2011
I've never extended a component class in AS2, and I'm having problems with it now.
Here's my class file:
Actionscript Code:
import mx.video.FLVPlayback;import mx.video.*;class AkamaiFLVPlayback extends FLVPlayback{
public function AkamaiFLVPlayback(){
super()}}
Here's how I'm trying to instantiate it from the FLA:
Actionscript Code:
import AkamaiFLVPlaybackvar g = new AkamaiFLVPlayback()this.attachMovie(g,myVid,1)g.contentPath = "[URL]"
Now this does not work at all. I can see that the super class FLVPlayback is creating variables, but it's not loading to the stage or initializing.
View 1 Replies
Sep 10, 2010
I get this error starting up Flash Professional CS5. I don't even have to create/open a Flash file. I already re-installed, but to no avail.
View 4 Replies
Oct 16, 2009
I am creating a flash object that does some heavy image lifting. What I am looking to do is load many flash objects onto the same page to take an image, modify it, and display it within the flash object.The problem I am running into is that when I try to add 100 flex objects to the page, the browser freezes as it tries to re-load/initialize each instance.Once they are all loaded, the processing of the images goes by quick.Does anyone know how to duplicate the flash piece without having to reload everything?
View 2 Replies
May 4, 2010
I have three lists and a button. Depending up on the selected items in first two list and after clicking the button I have to display the items in details list.
-In first list I am displaying names of employees
-In second list displaying managers names
-Then if I select one employee name and one managers name then after clicking button corresponding employee and managers details should be displayed in the third list.
The problem is with initializing the details list and dynamically changing it.
View 1 Replies
May 4, 2010
I have an applicon that needs to render about 100 flash graphs (as well as other DOM stuff) in a series of rows that vertically extend many times beyond the current visible window - in other words, the users have to scroll down see see all the different graphs.This application is also dynamic and when a user changes a value in the DOM (anywhere on the page) it will need to propagate that change to all the Flash graphs at the same time.So I setup all the externalInterface callbacks and was careful to not let any JS start going until the ever-so-important "flashIsReady" call and...it worked great until I tried to update() the existing swf's with new data.
Here was the behavior:- All the swfs load (initially) in both IE/Fox = good.- Updating swfs with new content works in Fox --ONLY IF-- I scrolled down to the bottom of the page, then back to the top -- BEFORE -- I triggered an update().So then I started tracing out each time a swf called the JS to say "flash is ready" and I realized, Firfox only renders swfs as they become visible. And To be honest - that's fine and actually, I am pretty sure that IE does this too. But the problem is that not only does Firefox not initialize the swf, Firefox doesn't even acknowledge the swf exists (expect for after onload) if it has not yet been visible.
View 3 Replies
Jun 22, 2011
In a current Flex project, i have an issue where a certain child component must be initialized and ready when the user clicks a button. the button is a mouseClick Event.
//mouseClick Event
protected function tableSearch_searchClickHandler(event:MouseEvent):void
{
[code]......
View 1 Replies
Jul 17, 2011
AS3
Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
Is there a way to temporarily suppress this on a specific block of code? I am creating a HUGE dynamic 3d array of objects, 1000x1000x1000 and need the build to actually finish the initializing.
View 4 Replies
May 18, 2011
I've been trying to create a custom mxml component that extends another custom mxml component (i.e.MyMXMLComponent -> BaseMXMLComponent -> Group). I've been reading that trying to add visual children to MyMXMLComponent caused error with Flex 3 but that's no longer the case with Flex 4.
What I want to know is whether this is a supported/fixed/documented feature of Flex 4? or just some undefined behavior in Flex 4 that may get changed with future updates?
if this is supported and documented feature, does anyone have link pointing to adobe document stating it as such?
View 1 Replies
Jul 15, 2010
i got a .fla file about 2xx mb (contain number of actionscript and layers) on another using Flash CS3 Professional and i use it ( Flash CS3 Professional) too ,
i can open the fla successfully , but when i try to export the fla to the swf
it appear the message : "Error initializing Java Runtime Environment , You may need to reinstall Flash."
result : the swf is gen but the frames move "non-stop" automatically
i had tried use different OS (winXP , Win7 ) and JRE
[Code]...
View 6 Replies